/* Plumr — un bureau d'étude le soir : prune, rose thé, abricot. */

@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap;
  src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap;
  src: url("fonts/young-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --prune: #3a2238;
  --prune-2: #4b2e48;
  --prune-ink: #2b1a29;
  --abricot: #ee9b5b;
  --abricot-soft: #f8d8bd;
  --the: #fbf1ec;
  --papier: #fffaf7;
  --trait: #ebd9d0;
  --muet: #7a6474;
  --sauge: #4f8060;
  --sauge-soft: #dfeadf;
  --miel: #b97a12;
  --miel-soft: #f6e6c4;
  --grenat: #b0413a;
  --grenat-soft: #f5d9d4;
  --bg: var(--the);
  --surface: var(--papier);
  --ink: var(--prune-ink);
  --on-accent: var(--prune-ink);
  --focus: #c4621f;
  --shadow: 0 1px 0 rgba(58, 34, 56, .06), 0 8px 24px -12px rgba(58, 34, 56, .22);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* Sombre : selon le système, sauf si un thème est choisi dans Réglages. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="rose"]) {
    --bg: #221520;
    --surface: #2e1e2b;
    --ink: #f6e9e4;
    --trait: #4a3346;
    --muet: #bba5b5;
    --the: #2a1a27;
    --papier: #2e1e2b;
    --abricot-soft: #5a3a2c;
    --sauge: #8fc19d;
    --sauge-soft: #233a2a;
    --miel: #e3b25a;
    --miel-soft: #3f3018;
    --grenat: #ec8a80;
    --grenat-soft: #4a2420;
    --focus: #f3b07a;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 10px 28px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #221520;
  --surface: #2e1e2b;
  --ink: #f6e9e4;
  --trait: #4a3346;
  --muet: #bba5b5;
  --the: #2a1a27;
  --papier: #2e1e2b;
  --abricot-soft: #5a3a2c;
  --sauge: #8fc19d;
  --sauge-soft: #233a2a;
  --miel: #e3b25a;
  --miel-soft: #3f3018;
  --grenat: #ec8a80;
  --grenat-soft: #4a2420;
  --focus: #f3b07a;
  --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 10px 28px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* Rose poudré : un thème clair tout en douceur, choisi dans Réglages > Affichage. */
:root[data-theme="rose"] {
  --prune: #9c5368;
  --prune-2: #b0677c;
  --prune-ink: #4a2632;
  --abricot: #e9a3b4;
  --abricot-soft: #f8dbe2;
  --the: #fbeef1;
  --papier: #fff8f9;
  --trait: #f0d4db;
  --muet: #8a6572;
  --sauge: #4f8060;
  --sauge-soft: #e2ece2;
  --miel: #a86f12;
  --miel-soft: #f7e7cc;
  --grenat: #b0413a;
  --grenat-soft: #f8dcd9;
  --bg: var(--the);
  --surface: var(--papier);
  --ink: var(--prune-ink);
  --on-accent: var(--prune-ink);
  --focus: #c0577a;
  --shadow: 0 1px 0 rgba(156, 83, 104, .07), 0 8px 24px -12px rgba(156, 83, 104, .28);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: -.005em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muet); }
.small { font-size: .875rem; }

/* --- Boutons et champs --- */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .65em 1.25em; cursor: pointer;
  background: var(--abricot); color: var(--on-accent); font-weight: 650;
  transition: transform .12s ease, filter .12s ease; white-space: nowrap;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--trait); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muet); }
.btn.danger { background: transparent; color: var(--grenat); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.small { padding: .4em .9em; font-size: .875rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muet); cursor: pointer;
}
.icon-btn:hover { background: var(--abricot-soft); color: var(--ink); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }

label.field { display: grid; gap: .35rem; font-weight: 600; font-size: .925rem; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--trait); border-radius: var(--radius-s);
  background: var(--surface); padding: .7em .85em; font-weight: 400; font-size: 1rem;
}
.input:focus { border-color: var(--abricot); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--abricot) 30%, transparent); }
.hint { font-weight: 400; font-size: .85rem; color: var(--muet); }
.error-text { color: var(--grenat); font-size: .925rem; min-height: 1.4em; margin: 0; }

/* --- Connexion --- */
.login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(238, 155, 91, .28), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(238, 155, 91, .14), transparent 60%),
    var(--prune);
  color: #f6e9e4;
}
.login-card {
  width: min(100%, 400px); background: var(--papier); color: var(--prune-ink);
  border-radius: var(--radius-l); padding: 36px 32px 28px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="rose"]) .login-card { color: var(--ink); } }
:root[data-theme="dark"] .login-card { color: var(--ink); }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card .brand img { width: 44px; height: 44px; }
.login-card h1 { font-size: 1.75rem; }
.login-card form { display: grid; gap: 16px; }
.login-card .btn { width: 100%; padding: .8em; margin-top: 4px; }
.login-foot { margin-top: 18px; font-size: .85rem; color: var(--muet); text-align: center; }
.login-foot svg { width: 14px; height: 14px; vertical-align: -2px; }

/* --- Coque de l'application --- */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; height: 100dvh; }
.side {
  background: var(--prune); color: #f3e3e8; display: flex; flex-direction: column;
  padding: 22px 14px 16px; gap: 6px;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.side .brand img { width: 34px; height: 34px; }
.side .brand span { font-family: var(--serif); font-size: 1.45rem; color: #fff4ec; }
.nav { display: grid; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: transparent; color: #e6cfd9; padding: .7em .85em; border-radius: 12px;
  cursor: pointer; font-weight: 550;
}
.nav button svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav button:hover { background: var(--prune-2); color: #fff; }
.nav button[aria-current="page"] { background: var(--abricot); color: var(--prune-ink); }
.nav button[aria-current="page"] svg { opacity: 1; }
.side .who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--abricot-soft); color: var(--prune-ink); font-family: var(--serif);
}
.side .who .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .who .icon-btn { color: #cbb0bf; }
.side .who .icon-btn:hover { background: var(--prune-2); color: #fff; }
.main { min-width: 0; height: 100%; overflow: auto; }
.page { max-width: 980px; margin: 0 auto; padding: 40px 32px 64px; }
.page-head { margin-bottom: 26px; }
.page-head p { color: var(--muet); margin: .4em 0 0; max-width: 60ch; }

.card {
  background: var(--surface); border-radius: var(--radius-m); padding: 22px 24px;
  box-shadow: var(--shadow);
}

/* --- Chat --- */
.chat { display: grid; grid-template-columns: 260px 1fr; height: 100%; }
.convs { border-right: 1px solid var(--trait); display: flex; flex-direction: column; min-height: 0; background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.convs-head { padding: 22px 16px 12px; }
.convs-head .btn { width: 100%; }
.convs ul { list-style: none; margin: 0; padding: 4px 10px 16px; overflow: auto; flex: 1; }
.convs li { display: flex; align-items: center; border-radius: 10px; }
.convs li button.open {
  flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: .55em .7em;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 10px; color: var(--ink);
}
.convs li .icon-btn { width: 30px; height: 30px; opacity: 0; }
.convs li:hover .icon-btn, .convs li:focus-within .icon-btn { opacity: 1; }
.convs li:hover { background: var(--abricot-soft); }
.convs li.active { background: var(--abricot-soft); }
.convs li.active button.open { font-weight: 650; }
.convs .group { font-size: .8rem; color: var(--muet); padding: 14px 10px 4px; }

.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.thread-scroll { flex: 1; overflow: auto; padding: 32px 24px 12px; }
.thread-inner { max-width: 760px; margin: 0 auto; }
.msg { margin: 0 0 26px; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble {
  background: var(--prune); color: #fbeff3; padding: .75em 1.05em; border-radius: 18px 18px 4px 18px;
  max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.assistant .body { overflow-wrap: anywhere; }
.msg.assistant .body > *:last-child { margin-bottom: 0; }
.msg.assistant .body h1, .msg.assistant .body h2, .msg.assistant .body h3 { font-size: 1.15rem; margin: 1.1em 0 .5em; }
.msg.assistant .body ul, .msg.assistant .body ol { padding-left: 1.3em; margin: 0 0 .8em; }
.msg.assistant .body li { margin: .2em 0; }
.msg.assistant .body code { background: var(--abricot-soft); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.msg.assistant .body pre { background: var(--surface); padding: 12px 14px; border-radius: var(--radius-s); overflow: auto; box-shadow: var(--shadow); }
.msg.assistant .body pre code { background: none; padding: 0; }
.cite {
  display: inline-grid; place-items: center; min-width: 1.45em; height: 1.45em; padding: 0 .3em;
  border-radius: 999px; background: var(--abricot-soft); color: var(--ink); font-size: .75em; font-weight: 700;
  border: 0; cursor: pointer; vertical-align: .15em; margin: 0 1px;
}
.cite:hover { background: var(--abricot); }
.sources { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.source {
  display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; text-align: left;
  border: 1.5px solid var(--trait); background: var(--surface); border-radius: 10px; padding: .35em .7em;
  font-size: .85rem; cursor: pointer;
}
.source b { font-weight: 700; }
.source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.source.flash { border-color: var(--abricot); background: var(--abricot-soft); }
.source-detail { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--abricot); background: var(--surface); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: .925rem; white-space: pre-wrap; }
.source-detail .src-title { font-weight: 700; display: block; margin-bottom: 4px; white-space: normal; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muet); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.welcome { padding: 8vh 0 24px; }
.welcome h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.welcome p { color: var(--muet); max-width: 52ch; margin-top: .6em; }
.ideas { display: grid; gap: 10px; margin-top: 26px; max-width: 560px; }
.ideas button {
  text-align: left; border: 1.5px solid var(--trait); background: var(--surface); border-radius: 14px;
  padding: .8em 1em; cursor: pointer; color: var(--ink);
}
.ideas button:hover { border-color: var(--abricot); }

.composer { padding: 10px 24px 22px; }
.composer form {
  max-width: 760px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 10px 10px 10px 18px; border: 1.5px solid var(--trait);
}
.composer form:focus-within { border-color: var(--abricot); }
.composer textarea {
  width: 100%; border: 0; resize: none; background: transparent; padding: 8px 0; max-height: 40vh;
  outline: none; line-height: 1.5;
}
.composer .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer .row .spacer { flex: 1; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 36px; height: 22px; border-radius: 999px; background: var(--trait); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--sauge); }
.toggle input:checked::after { transform: translateX(14px); }
.composer select.input { width: auto; padding: .35em .6em; font-size: .875rem; border-radius: 999px; }
.send { width: 42px; height: 42px; border-radius: 50%; padding: 0; }
.composer .note { max-width: 760px; margin: 8px auto 0; text-align: center; font-size: .8rem; color: var(--muet); }
.mobile-only { display: none; }

/* --- Cours --- */
.drop {
  display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 20px;
  border: 2px dashed var(--trait); border-radius: var(--radius-m); background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop svg { width: 34px; height: 34px; color: var(--abricot); }
.drop.over { border-color: var(--abricot); background: var(--abricot-soft); }
.drop strong { font-size: 1.05rem; }
.upload-subject { margin-bottom: 18px; max-width: 420px; }
.lib { margin-top: 34px; display: grid; gap: 28px; }
.lib h2 { font-size: 1.25rem; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.lib h2 small { font-family: var(--sans); font-size: .85rem; color: var(--muet); }
.doc-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.doc-list li { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px 12px 16px; }
.doc-list li + li { border-top: 1px solid var(--trait); }
.doc-ico { width: 40px; height: 48px; border-radius: 6px 12px 6px 6px; background: var(--abricot-soft); display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: var(--prune-ink); }
.doc-meta { min-width: 0; }
.doc-meta .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta .s { font-size: .85rem; color: var(--muet); }
.pill { font-size: .8rem; font-weight: 650; padding: .25em .7em; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--sauge-soft); color: var(--sauge); }
.pill.wait { background: var(--miel-soft); color: var(--miel); }
.pill.err { background: var(--grenat-soft); color: var(--grenat); }
.pill.neutral { background: color-mix(in srgb, var(--trait) 70%, transparent); color: var(--muet); }
.empty { text-align: center; padding: 28px 12px; color: var(--muet); }

/* --- Vérifier un texte --- */
.analyse-form { display: grid; gap: 14px; }
.analyse-form textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
.analyse-form .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.analyse-form .row .spacer { flex: 1; }
.analyse-form select.input { width: auto; max-width: 100%; }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; align-items: start; }
.result h2 { font-size: 1.2rem; margin-bottom: 4px; }
.result .sub { color: var(--muet); font-size: .9rem; margin-bottom: 18px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muet); padding: 18px 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--trait); border-top-color: var(--abricot); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.score .pct { font-family: var(--serif); font-size: 4.2rem; line-height: 1; }
.score .pct small { font-size: .45em; }
.score .lbl { font-weight: 650; font-size: 1.05rem; max-width: 22ch; }

/* La bande : de « plutôt humain » à « plutôt IA », avec la marge d'incertitude. */
.spectrum { margin: 26px 0 8px; position: relative; padding-top: 26px; }
.spectrum .track {
  height: 14px; border-radius: 999px;
  background: linear-gradient(90deg, var(--sauge) 0%, color-mix(in srgb, var(--sauge) 45%, var(--miel)) 30%, var(--miel) 50%, color-mix(in srgb, var(--miel) 40%, var(--grenat)) 70%, var(--grenat) 100%);
  opacity: .85;
}
.spectrum .band {
  position: absolute; top: 20px; height: 26px; border-radius: 10px;
  left: var(--low); width: calc(var(--high) - var(--low));
  border: 2px solid var(--ink); background: color-mix(in srgb, var(--surface) 35%, transparent);
  min-width: 10px; transform: translateX(-1px);
}
.spectrum .mark {
  position: absolute; top: 0; left: var(--p); transform: translateX(-50%);
  display: grid; justify-items: center; font-weight: 750; font-size: .8rem;
}
.spectrum .mark::after { content: ""; width: 3px; height: 34px; background: var(--ink); border-radius: 2px; margin-top: 2px; }
.spectrum .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muet); margin-top: 12px; }
.spectrum.animate .band, .spectrum.animate .mark { transition: left .7s cubic-bezier(.2, .8, .2, 1), width .7s cubic-bezier(.2, .8, .2, 1); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.fact { font-size: .85rem; background: var(--bg); padding: .3em .75em; border-radius: 999px; }
.fact b { font-weight: 700; }
.notes { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9rem; }
.notes li { padding-left: 1.2em; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--miel); }

.claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.claim { border-radius: var(--radius-s); padding: 12px 14px; background: var(--bg); border-left: 4px solid var(--trait); }
.claim.confirme { border-left-color: var(--sauge); }
.claim.nuance { border-left-color: var(--miel); }
.claim.contredit { border-left-color: var(--grenat); }
.claim.absent { border-left-color: var(--trait); }
.claim .v { font-size: .8rem; font-weight: 750; margin-bottom: 3px; }
.claim.confirme .v { color: var(--sauge); }
.claim.nuance .v { color: var(--miel); }
.claim.contredit .v { color: var(--grenat); }
.claim.absent .v { color: var(--muet); }
.claim .c { font-weight: 600; margin-bottom: 4px; }
.claim .e { font-size: .925rem; color: color-mix(in srgb, var(--ink) 80%, var(--muet)); }
.tally { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

details.explain { margin-top: 28px; }
details.explain summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
details.explain .card { margin-top: 12px; }
details.explain ul { padding-left: 1.2em; margin: 0; }
details.explain li { margin: .45em 0; }

/* --- Réglages --- */
.settings { display: grid; gap: 22px; }
.settings form { display: grid; gap: 14px; max-width: 460px; }
.settings form.inline { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; align-items: end; }
.settings form.inline .full { grid-column: 1 / -1; }
.users { list-style: none; padding: 0; margin: 0 0 18px; }
.users li { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.users li + li { border-top: 1px solid var(--trait); }
.users .grow { flex: 1; min-width: 140px; }
.status-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .925rem; }
.status-grid dt { color: var(--muet); }
.status-grid dd { margin: 0; font-weight: 600; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { accent-color: var(--prune); }

/* --- Toast --- */
/* Notifications : couleurs du thème en cours (fond de carte, texte normal), lisibles partout. */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--surface); color: var(--ink); border: 1px solid var(--trait); border-left: 4px solid var(--abricot);
  box-shadow: var(--shadow), 0 10px 30px rgba(0, 0, 0, .14); padding: .7em 1.2em; border-radius: 14px;
  font-size: .925rem; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--grenat-soft); color: var(--ink); border-color: var(--grenat); border-left-color: var(--grenat); }

/* --- Mobile --- */
@media (max-width: 960px) {
  .results { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { order: 2; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 0; }
  .side .brand, .side .who .name, .side .who .avatar { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; flex: 1; gap: 2px; }
  .nav button { flex-direction: column; gap: 3px; font-size: .72rem; padding: .5em .2em; justify-content: center; text-align: center; }
  .side .who { margin: 0; padding: 0 0 0 4px; border: 0; }
  .page { padding: 24px 16px 40px; }
  h1 { font-size: 1.6rem; }
  .chat { grid-template-columns: 1fr; position: relative; }
  .convs { position: absolute; inset: 0 25% 0 0; z-index: 10; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); background: var(--surface); }
  .chat.show-convs .convs { transform: none; }
  .chat::after { content: ""; position: absolute; inset: 0; z-index: 5; background: rgba(43, 26, 41, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .chat.show-convs::after { opacity: 1; pointer-events: auto; }
  .shell { height: 100vh; height: 100dvh; }
  .main { overflow: auto; }
  .mobile-only { display: inline-grid; }
  .thread-scroll { padding: 16px 16px 8px; }
  .thread-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; }
  .composer { padding: 8px 12px 12px; }
  .doc-list li { grid-template-columns: 36px 1fr auto; }
  .doc-list li .pill { grid-column: 2; justify-self: start; }
  .settings form.inline { grid-template-columns: 1fr; }
  .score .pct { font-size: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Photos --- */
.composer form.over, .drop.over { border-color: var(--abricot); }
.icon-btn.attach { margin-left: -6px; }
.tray { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 8px; }
.tray[hidden] { display: none; }
.thumb {
  position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none;
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--trait);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.uploading img, .thumb.waiting img { opacity: .45; }
.thumb.error { box-shadow: inset 0 0 0 2px var(--grenat); }
.thumb.error img { opacity: .35; }
.thumb .spinner { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; }
.thumb .remove {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; background: rgba(43, 26, 41, .72); color: #fff; cursor: pointer;
}
.thumb .remove svg { width: 12px; height: 12px; }
.user-col { display: grid; justify-items: end; gap: 8px; max-width: 85%; }
.user-col .bubble { max-width: 100%; }
.photos { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.photo { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; line-height: 0; }
.photo img { width: 132px; height: 100px; object-fit: cover; display: block; }
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(30, 18, 28, .86); cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: default; }
.lightbox .lb-close { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(255, 255, 255, .12); }
.lightbox .lb-close:hover { background: rgba(255, 255, 255, .24); color: #fff; }

.batch { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-m); background: var(--bg); display: grid; gap: 14px; }
.batch-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.batch-head h3 { font-size: 1.1rem; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.batch .field { max-width: 460px; }
.batch-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-ico.photos svg { width: 22px; height: 22px; }
.doc-actions { display: flex; }
.icon-btn.on { background: var(--abricot-soft); color: var(--ink); }
.transcript { grid-column: 1 / -1; display: grid; gap: 12px; padding: 6px 0 4px; border-top: 1px dashed var(--trait); }
.tpage { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding-top: 10px; }
.tthumb { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; line-height: 0; }
.tthumb img { width: 96px; height: 72px; object-fit: cover; }
.tlabel { font-weight: 700; font-size: .85rem; color: var(--muet); margin-bottom: 2px; }
.ttext { white-space: pre-wrap; font-size: .925rem; }
@media (max-width: 760px) {
  .doc-list li .doc-actions { grid-row: 1; grid-column: 3; }
  .tpage { grid-template-columns: 72px 1fr; }
  .tthumb img { width: 72px; height: 54px; }
  .photo img { width: 104px; height: 80px; }
}
.tpage.no-thumb { grid-template-columns: 1fr; }
.fact.local { display: inline-flex; align-items: center; gap: 5px; background: var(--sauge-soft); color: var(--sauge); font-weight: 650; }
.fact.local svg { width: 13px; height: 13px; }

/* --- Cours ------------------------------------------------------------------------- */
.upload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.course-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.course-list li + li { border-top: 1px solid var(--trait); }
.course-row {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center;
  padding: 14px 18px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink);
}
.course-row:hover { background: color-mix(in srgb, var(--abricot-soft) 45%, transparent); }
.course-name { font-weight: 650; font-size: 1.02rem; }
.course-meta { grid-column: 1; font-size: .875rem; color: var(--muet); }
.course-row .pill { grid-column: 2; grid-row: 1 / span 2; }
.pill.due { background: var(--abricot-soft); color: var(--ink); }

.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muet); cursor: pointer; padding: 4px 6px 4px 0; margin-bottom: 14px; font-weight: 600; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }
.course-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.course-head p { margin: .35em 0 0; }
.head-actions { display: flex; gap: 2px; flex: none; }
.actions-card { display: grid; gap: 10px; }
.actions-card > p { margin: 0; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notes-panel { display: grid; gap: 12px; padding-top: 8px; border-top: 1px dashed var(--trait); }
.notes-panel[hidden] { display: none; }
.course-section { margin-top: 32px; }
.course-section h2 { font-size: 1.25rem; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.course-section h2 small { font-family: var(--sans); font-size: .85rem; color: var(--muet); }
.course-section .doc-list { margin-bottom: 14px; }
.drop.compact { grid-template-columns: auto 1fr; justify-items: start; text-align: left; padding: 16px 18px; gap: 2px 14px; }
.drop.compact svg { grid-row: span 2; width: 26px; height: 26px; align-self: center; }
.doc-ico.notes { background: var(--sauge-soft); color: var(--sauge); }
.doc-ico.notes svg { width: 20px; height: 20px; }

.prod-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prod { background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); overflow: hidden; }
.prod-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.prod-title { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { font-size: .78rem; font-weight: 700; padding: .2em .65em; border-radius: 999px; background: var(--bg); color: var(--muet); flex: none; }
.kind.fiche { background: var(--abricot-soft); color: var(--ink); }
.kind.explication { background: var(--sauge-soft); color: var(--sauge); }
.kind.notes { background: var(--miel-soft); color: var(--miel); }
.prod-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.prod-body { padding: 4px 22px 20px; border-top: 1px solid var(--trait); max-width: 75ch; }
.prod-body h3 { font-size: 1.1rem; margin: 1.1em 0 .4em; }
.prod-body ul, .prod-body ol { padding-left: 1.3em; }
.cards-summary { display: grid; gap: 10px; }
.cards-summary p { margin: 0; }

/* --- Cours entier dans le chat ------------------------------------------------------ */
.focus-bar { max-width: 760px; margin: 0 auto 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .875rem; }
.focus-pick {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--trait); background: transparent; color: var(--muet);
  border-radius: 999px; padding: .35em .85em; cursor: pointer; font-weight: 600;
}
.focus-pick:hover { border-color: var(--abricot); color: var(--ink); }
.focus-pick.small { border-style: solid; padding: .25em .7em; }
.focus-pick svg, .focus-label svg { width: 15px; height: 15px; }
.focus-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--sauge); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--sauge-soft); color: var(--ink); border-radius: 999px; padding: .25em .4em .25em .8em; font-weight: 600; }
.chip button { border: 0; background: none; color: var(--muet); cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.chip button:hover { background: rgba(0, 0, 0, .08); color: var(--ink); }
.chip svg { width: 12px; height: 12px; }
.picker { width: 100%; background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); border: 1.5px solid var(--trait); padding: 14px 16px; display: grid; gap: 10px; }
.picker p { margin: 0; }
.picker-list { max-height: 260px; overflow: auto; display: grid; gap: 10px; }
.picker fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.picker legend { font-weight: 700; font-size: .8rem; color: var(--muet); padding: 0 0 4px; }
.msg-notes { margin-top: 10px; display: grid; gap: 4px; }
.msg-note { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muet); }
.msg-note svg { width: 15px; height: 15px; flex: none; }
.msg-note.saved { color: var(--sauge); }
.msg-note a { color: inherit; font-weight: 650; }
.msg-tools { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--muet); font-size: .8rem; padding: .3em .5em; border-radius: 8px; cursor: pointer; }
.tool:hover { background: var(--abricot-soft); color: var(--ink); }
.tool svg { width: 14px; height: 14px; }
.small-select { width: auto; padding: .3em .5em; font-size: .85rem; }

/* --- Réviser ------------------------------------------------------------------------ */
.nav button { position: relative; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--abricot); color: var(--prune-ink); font-size: .75rem; font-weight: 800; display: inline-grid; place-items: center; }
.nav button[aria-current="page"] .badge { background: var(--prune); color: #fff; }
.review-bar { margin-bottom: 18px; max-width: 360px; }
.review-stage { display: grid; justify-items: center; gap: 16px; }
.review-count { justify-self: start; margin: 0; }
.flashcard {
  width: 100%; max-width: 640px; min-height: 240px; background: var(--surface); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 36px 34px; display: grid; align-content: center; gap: 18px; text-align: center;
  border-top: 6px solid var(--abricot);
}
.flashcard .q { font-family: var(--serif); font-size: 1.45rem; line-height: 1.3; margin: 0; }
.flashcard .a { margin: 0; padding-top: 18px; border-top: 1.5px dashed var(--trait); font-size: 1.05rem; }
.flashcard.revealed { border-top-color: var(--sauge); }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 640px; }
.grade { padding: .8em .5em; }
.grade.again { background: var(--grenat-soft); color: var(--grenat); }
.grade.hard { background: var(--miel-soft); color: var(--miel); }
.grade.good { background: var(--sauge-soft); color: var(--sauge); }
.grade.easy { background: var(--abricot); color: var(--on-accent); }
.keys { margin: 0; }
.review-empty { text-align: center; padding: 30px 12px; display: grid; gap: 10px; justify-items: center; }
.review-empty p { max-width: 46ch; margin: 0; }

/* --- Réglages : mémoire et fiabilité --------------------------------------------------- */
.memory-list { list-style: none; margin: 0 0 14px; padding: 0; }
.memory-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.memory-list li + li { border-top: 1px solid var(--trait); }
.settings form.inline-add { display: flex; gap: 8px; max-width: 620px; }
.settings form.inline-add .input { flex: 1; }
.reliab-score { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.reliab-score .big { font-family: var(--serif); font-size: 3.4rem; line-height: 1; }
.reliab-line { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--sauge-soft); color: var(--ink); font-size: .9rem; max-width: 72ch; }
.reliab-line svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--sauge); }
.reliab-line[hidden] { display: none; }
.reliab-line a { color: var(--sauge); font-weight: 650; }
.inline-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--trait); border-top-color: var(--abricot); animation: spin .9s linear infinite; margin-right: 6px; vertical-align: -1px; }

@media (max-width: 760px) {
  .upload-fields { grid-template-columns: 1fr; }
  .course-head { flex-direction: column; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .flashcard { padding: 26px 20px; min-height: 200px; }
  .flashcard .q { font-size: 1.2rem; }
  .badge { position: absolute; top: 2px; right: 6px; margin: 0; min-width: 18px; height: 18px; font-size: .65rem; }
  .settings form.inline-add { flex-direction: column; }
}

/* === Nouveautés : activité, usage, bibliothèque, QCM, progrès, agenda ====================== */

/* --- Bandeau d'activité --- */
.activity { position: fixed; top: 0; left: 232px; right: 0; z-index: 40; pointer-events: none; display: grid; justify-items: center; }
.activity[hidden] { display: none; }
.activity-line { width: 100%; height: 3px; background: linear-gradient(90deg, transparent, var(--abricot), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.activity-pill {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; max-width: min(92%, 640px);
  background: var(--prune); color: #fbeff3; border-radius: 999px; padding: .38em .95em .38em .75em;
  font-size: .85rem; box-shadow: 0 10px 24px -12px rgba(43, 26, 41, .55); pointer-events: auto;
}
.activity-pill.warn { background: var(--miel); color: var(--prune-ink); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--abricot); flex: none; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .6; } }
.activity-label { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-detail { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.activity-detail::before { content: "·"; margin-right: 8px; opacity: .6; }
.activity-time { font-variant-numeric: tabular-nums; opacity: .8; flex: none; }
.activity-more { flex: none; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 0 .5em; font-weight: 700; }

/* --- Barre du haut du chat et anneau d'usage --- */
.thread-top { display: flex; align-items: center; gap: 8px; padding: 12px 24px 0; }
.thread-top strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thread-top .spacer { flex: 1; }
.usage-ring { position: relative; flex: none; }
.usage-ring[hidden] { display: none; }
.ring-btn { position: relative; width: 38px; height: 38px; border: 0; padding: 2px; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.ring-btn:hover { background: var(--abricot-soft); }
.ring-btn svg { position: absolute; inset: 2px; }
.ring-track { stroke: var(--trait); }
.ring-fill { stroke: var(--sauge); transition: stroke-dashoffset .6s ease; }
.ring-fill.high { stroke: var(--miel); }
.ring-fill.full { stroke: var(--grenat); }
.ring-fill.unlimited { stroke: transparent; }
.ring-center { position: relative; font-size: .68rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.usage-pop { position: absolute; right: 0; top: 46px; z-index: 30; width: 290px; padding: 16px 18px; display: grid; gap: 10px; }
.usage-pop[hidden] { display: none; }
.usage-pop p { margin: 0; }
.pop-head { display: grid; gap: 2px; }
.pop-detail { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .875rem; }
.pop-detail li { display: flex; justify-content: space-between; gap: 10px; }
.meter { height: 8px; border-radius: 999px; background: var(--trait); overflow: hidden; margin: 6px 0; }
.meter.wide { height: 10px; max-width: 420px; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--sauge); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.meter-fill.high { background: var(--miel); }
.meter-fill.full { background: var(--grenat); }
.meter-fill.score { background: var(--abricot); }

/* --- Chat : fichiers joints, statut, rangement --- */
.doc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: .35em .5em .35em .65em; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--trait); font-size: .85rem; }
.doc-chip svg { width: 16px; height: 16px; flex: none; color: var(--abricot); }
.doc-chip .spinner { width: 14px; height: 14px; border-width: 2px; }
.doc-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-chip.error { box-shadow: inset 0 0 0 2px var(--grenat); }
.doc-chip .remove { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; background: transparent; color: var(--muet); cursor: pointer; }
.doc-chip .remove svg { width: 12px; height: 12px; color: inherit; }
.msg.user .doc-chip { background: var(--surface); }
.pending-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pending-status { color: var(--muet); font-size: .9rem; }
.msg-pre { display: grid; gap: 10px; margin-bottom: 12px; }
.msg-note.err { color: var(--grenat); }
.chip svg { width: 13px; height: 13px; flex: none; }
.chip.reading { background: var(--miel-soft); }
.chip.doc { background: var(--abricot-soft); }
.chip.course { background: var(--sauge-soft); }
.chip-note { color: var(--muet); font-weight: 500; }
.chip { gap: 5px; }
.source.reading { border-style: dashed; }
.source svg { width: 13px; height: 13px; flex: none; align-self: center; color: var(--miel); }
.file-card { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: var(--shadow); border-left: 4px solid var(--abricot); display: grid; gap: 8px; }
.file-card p { margin: 0; }
.file-card-head { display: flex; align-items: center; gap: 8px; font-size: .95rem; min-width: 0; }
.file-card-head svg { width: 18px; height: 18px; color: var(--abricot); flex: none; }
.file-card-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-other { display: grid; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--trait); }
.file-other[hidden] { display: none; }
.file-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.file-fields [hidden] { display: none; }
.file-fields .input { max-width: 260px; }
.welcome-sugg { margin-top: 30px; max-width: 620px; }
.welcome-sugg:empty { display: none; }
.welcome-sugg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.welcome-sugg-head h2 { font-size: 1.15rem; }

/* --- Onglets --- */
.tabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1.5px solid var(--trait); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: .55em .9em; text-decoration: none; color: var(--muet); font-weight: 650; border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--abricot); }
.tab-count:not(:empty) { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--abricot); color: var(--prune-ink); font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.badge.soft { background: var(--sauge-soft); color: var(--sauge); }
.nav button[aria-current="page"] .badge.soft { background: var(--prune); color: #fff; }

/* --- Mes cours --- */
.manual-target { margin-top: 14px; }
.manual-target summary { cursor: pointer; color: var(--muet); font-weight: 600; font-size: .9rem; }
.manual-target .upload-fields { margin: 12px 0 0; }
.subject-block { display: grid; gap: 10px; }
.subject-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subject-head h2 { margin: 0; }
.subject-head .head-actions { align-items: center; gap: 4px; }
.lib-foot { display: flex; justify-content: flex-start; }
.inbox-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-m); background: var(--abricot-soft); color: var(--ink); text-decoration: none; font-weight: 600; }
.inbox-note svg { width: 20px; height: 20px; flex: none; }
.inbox-list { display: grid; gap: 14px; margin-top: 8px; }
.inbox-item { display: grid; gap: 12px; }
.inbox-item .file-card { box-shadow: none; padding: 0 0 0 14px; }
.inbox-head { display: flex; align-items: center; gap: 10px; }
.inbox-head .muted { flex: 1; }
.reading-list { display: grid; gap: 14px; margin-top: 26px; }
.reading { display: grid; gap: 12px; }
.reading-head { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; }
.reading-ico { background: var(--miel-soft); color: var(--miel); }
.reading-ico svg { width: 20px; height: 20px; }
.reading-body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-left: 54px; }
.year-field { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--muet); font-weight: 600; }
.year-input { width: 92px; padding: .35em .6em; }
.reading-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reading-links .small-select { max-width: 240px; }
.pill svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.kind.diff-facile { background: var(--sauge-soft); color: var(--sauge); }
.kind.diff-moyen { background: var(--abricot-soft); color: var(--ink); }
.kind.diff-difficile { background: var(--miel-soft); color: var(--miel); }

/* --- QCM --- */
.card-title { font-size: 1.15rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 18px; height: 18px; color: var(--abricot); }
.quiz-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: end; }
.quiz-form .input { width: 100%; }
.quiz-list { display: grid; gap: 24px; margin-top: 28px; }
.group-title { font-size: 1.2rem; margin-bottom: 10px; }
.quiz-rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.quiz-rows li { display: flex; align-items: center; }
.quiz-rows li + li { border-top: 1px solid var(--trait); }
.quiz-row { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.quiz-row:hover { background: color-mix(in srgb, var(--abricot-soft) 45%, transparent); }
.quiz-title { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quiz-row .muted { grid-column: 1; }
.quiz-row .quiz-best, .quiz-row .pill { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.quiz-best { font-family: var(--serif); font-size: 1.3rem; }
.quiz-rows .icon-btn { margin-right: 8px; }
.quiz-page { max-width: 760px; }
.quiz-stage { display: grid; gap: 18px; }
.quiz-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.quiz-name { font-size: 1.5rem; }
.quiz-top p { margin: 4px 0 0; }
.quiz-count { font-family: var(--serif); font-size: 1.2rem; color: var(--muet); white-space: nowrap; }
.quiz-progress { display: flex; gap: 4px; }
.quiz-progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--trait); }
.quiz-progress span.ok { background: var(--sauge); }
.quiz-progress span.miss { background: var(--miel); }
.quiz-progress span.now { background: var(--abricot); }
.question-card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 28px 28px 24px; display: grid; gap: 18px; }
.notion { margin: 0; font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--abricot); }
.question { font-size: 1.35rem; line-height: 1.35; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--trait); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 1rem; line-height: 1.4;
  transition: border-color .15s, background .15s, transform .1s;
}
.option:hover:not([disabled]) { border-color: var(--abricot); }
.option:active:not([disabled]) { transform: translateY(1px); }
.option[disabled] { cursor: default; }
.option .letter { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: .85rem; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--trait); }
.option > span:nth-child(2) { flex: 1; }
.option svg { width: 20px; height: 20px; flex: none; }
.option.right { border-color: var(--sauge); background: var(--sauge-soft); }
.option.right .letter { background: var(--sauge); color: #fff; box-shadow: none; }
.option.wrong { border-color: var(--miel); background: var(--miel-soft); }
.option.wrong .letter { background: var(--miel); color: #fff; box-shadow: none; }
.option.dim { opacity: .55; }
.feedback { border-radius: 12px; padding: 12px 16px; display: grid; gap: 4px; }
.feedback p { margin: 0; }
.feedback.good { background: var(--sauge-soft); }
.feedback.good strong { color: var(--sauge); }
.feedback.learn { background: var(--miel-soft); }
.quiz-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.result-card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 34px 30px 28px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.result-card p { margin: 0; }
.big-score { font-family: var(--serif); line-height: 1; }
.big-score span { font-size: 4.6rem; }
.big-score small { font-size: 2rem; color: var(--muet); }
.result-card .meter { width: 100%; }
.encourage { font-size: 1.1rem; max-width: 46ch; }
.notions { display: grid; gap: 8px; justify-items: center; margin-top: 6px; }
.notions h3 { font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: inherit; }
.notion-chip { border: 0; cursor: pointer; background: var(--abricot-soft); color: var(--ink); }
.notion-chip:hover { background: var(--abricot); }
.actions-row.center { justify-content: center; margin-top: 8px; }

/* --- Progrès --- */
.progress-body { display: grid; gap: 22px; margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.tile svg { grid-row: span 2; width: 26px; height: 26px; color: var(--abricot); }
.tile b { font-family: var(--serif); font-size: 1.8rem; font-weight: 400; line-height: 1.1; }
.tile span { color: var(--muet); font-size: .875rem; }
.subject-progress { display: grid; gap: 18px; }
.sp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sp-head p { margin: 4px 0 0; }
.sp-mastery { display: grid; justify-items: end; gap: 4px; }
.sp-pct { font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.sp-pct small { font-size: .5em; color: var(--muet); }
.level { font-size: .78rem; font-weight: 750; padding: .2em .7em; border-radius: 999px; }
.level.lvl-1 { background: var(--abricot-soft); color: var(--ink); }
.level.lvl-2 { background: var(--miel-soft); color: var(--miel); }
.level.lvl-3, .level.lvl-4 { background: var(--sauge-soft); color: var(--sauge); }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; }
.sp-label { margin: 0 0 8px; font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muet); }
.spark { width: 100%; height: auto; max-height: 96px; overflow: visible; }
.spark-grid { stroke: var(--trait); stroke-width: 1; stroke-dasharray: 3 4; }
.spark-base { stroke: var(--trait); stroke-width: 1; }
.spark-line { fill: none; stroke: var(--abricot); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-pt .dot { fill: var(--abricot); stroke: var(--surface); stroke-width: 2; }
.spark-pt .hit { fill: transparent; }
.spark-pt:hover .dot { r: 5.5; }
.sp-note { margin: 6px 0 0; font-size: .9rem; }
.sp-note strong { color: var(--sauge); }
.sp-courses ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-courses li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 10px; align-items: center; font-size: .9rem; }
.sp-courses li a, .sp-courses li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.sp-courses li .small { text-align: right; font-variant-numeric: tabular-nums; color: var(--muet); }
.mastery { height: 8px; border-radius: 999px; background: var(--trait); overflow: hidden; }
.mastery-fill { display: block; height: 100%; width: 0; background: var(--abricot); border-radius: 999px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.sp-notions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sp-notions > div { display: grid; gap: 8px; align-content: start; justify-items: start; }
.chip.strong { background: var(--sauge-soft); }
.chip.strong svg { color: var(--sauge); }
.chip.consolidate { background: var(--abricot-soft); }
.chip.strong, .chip.consolidate { padding: .25em .8em; }

/* --- Réglages : abonnement, thème, détecteur --- */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.plan-badge { font-weight: 750; font-size: .85rem; padding: .3em .9em; border-radius: 999px; background: var(--abricot-soft); }
.plan-badge.plan-max { background: var(--miel-soft); color: var(--miel); }
.plan-badge.plan-ultra { background: var(--prune); color: #fbeff3; }
.plan-usage p { margin: 0; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 12px; }
.plan { border: 1.5px solid var(--trait); border-radius: var(--radius-s); padding: 10px 12px; display: grid; gap: 2px; font-size: .9rem; }
.plan.current { border-color: var(--abricot); background: color-mix(in srgb, var(--abricot-soft) 40%, transparent); }
.theme-choice { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); margin: 4px 0 10px; flex-wrap: wrap; }
.theme-choice button, .seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muet); padding: .45em .95em; border-radius: 999px; cursor: pointer; font-weight: 650; }
.theme-choice button svg { width: 16px; height: 16px; }
.theme-choice button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.era-table table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.era-table th, .era-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--trait); }
.era-table th { color: var(--muet); font-weight: 650; }
.notice { background: var(--miel-soft); border-radius: var(--radius-s); padding: 12px 14px; display: grid; gap: 4px; margin: 12px 0; }
.notice p { margin: 0; }
.settings .users li .small-select { width: auto; }

/* --- Agenda --- */
.agenda-page { max-width: 1200px; }
.agenda-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.agenda-main { display: grid; gap: 22px; min-width: 0; }
.agenda-side { display: grid; gap: 22px; position: sticky; top: 16px; }
.cal-card { display: grid; gap: 14px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { font-size: 1.35rem; min-width: 10ch; text-align: center; }
.icon-btn.flip svg { transform: scaleX(-1); }
.cal-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); }
.seg button { padding: .3em .8em; font-size: .875rem; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { font-size: .75rem; font-weight: 700; color: var(--muet); text-align: center; padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.day {
  position: relative; min-height: 92px; border: 0; border-radius: 10px; background: var(--bg); padding: 6px; text-align: left;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--ink); min-width: 0;
}
.day:hover { box-shadow: inset 0 0 0 1.5px var(--abricot); }
.day.out { opacity: .45; }
.day.selected { box-shadow: inset 0 0 0 2px var(--abricot); }
.day .num { font-weight: 700; font-size: .85rem; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day.today .num { background: var(--abricot); color: var(--prune-ink); }
.class-dot { position: absolute; top: 10px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--sauge); }
.evs { display: grid; gap: 3px; min-width: 0; }
.ev { display: block; font-size: .72rem; font-weight: 650; line-height: 1.25; padding: .15em .45em; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; text-align: left; color: var(--ink); background: color-mix(in srgb, var(--trait) 70%, transparent); }
.ev.more { background: none; color: var(--muet); }
.k-examen { background: var(--abricot); color: var(--prune-ink); }
.k-oral { background: var(--prune-2); color: #fbeff3; }
.k-rendu { background: var(--miel-soft); color: var(--miel); }
.k-revision { background: var(--sauge-soft); color: var(--sauge); }
.k-perso, .k-autre, .k-cours { background: color-mix(in srgb, var(--trait) 70%, transparent); color: var(--ink); }
.cal-hint { margin: 0; }
.day-panel { border-top: 1px dashed var(--trait); padding-top: 12px; display: grid; gap: 10px; }
.day-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.day-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.day-items li { display: flex; align-items: center; gap: 10px; font-size: .925rem; }
.class-item { padding: 6px 10px; border-radius: 8px; background: var(--sauge-soft); }
.time { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; color: var(--muet); font-size: .875rem; }
.ev-row { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 4px; border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); }
.ev-row:hover { background: color-mix(in srgb, var(--abricot-soft) 45%, transparent); }
.ev-row .grow { flex: 1; min-width: 0; }
.ev-kind { font-size: .72rem; font-weight: 750; padding: .2em .6em; border-radius: 999px; white-space: nowrap; }
.week { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; }
.wscale { position: relative; }
.hour { position: absolute; right: 4px; transform: translateY(-50%); font-size: .7rem; color: var(--muet); }
.whead-spacer { height: 52px; }
.wcols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wday { display: grid; grid-template-rows: 52px 32px auto; gap: 2px; min-width: 0; }
.whead { height: 52px; border: 0; background: none; display: grid; justify-items: center; padding: 2px 0; cursor: pointer; color: var(--muet); font-size: .75rem; border-radius: 8px; }
.whead b { font-size: 1.05rem; color: var(--ink); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.whead.today b { background: var(--abricot); color: var(--prune-ink); }
.whead:hover { background: var(--bg); }
.allday { display: grid; gap: 2px; align-content: start; overflow: hidden; }
.wcol { position: relative; border-radius: 8px; background: repeating-linear-gradient(to bottom, var(--bg) 0 47px, color-mix(in srgb, var(--trait) 50%, var(--bg)) 47px 48px); }
.wcol.today { box-shadow: inset 0 0 0 1.5px var(--abricot-soft); }
.block { position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 3px 5px; font-size: .7rem; line-height: 1.2; overflow: hidden; display: grid; align-content: start; gap: 1px; border: 0; text-align: left; cursor: default; }
.block strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.block span { opacity: .8; }
.block.class { background: var(--sauge-soft); color: var(--ink); border-left: 3px solid var(--sauge); }
.block.ev { cursor: pointer; z-index: 1; box-shadow: 0 0 0 2px var(--surface); }
.suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sugg { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--bg); border-left: 3px solid var(--trait); justify-items: start; }
.sugg.tone-exam { border-left-color: var(--abricot); }
.sugg.tone-plan { border-left-color: var(--sauge); }
.sugg.tone-class { border-left-color: var(--miel); }
.sugg.tone-cheer { border-left-color: var(--sauge); background: var(--sauge-soft); }
.sugg-text p { margin: 2px 0 0; font-size: .9rem; color: color-mix(in srgb, var(--ink) 80%, var(--muet)); }
.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.up-date { width: 42px; flex: none; display: grid; justify-items: center; line-height: 1.05; background: var(--bg); border-radius: 8px; padding: 4px 0; }
.up-date b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.up-date span { font-size: .68rem; color: var(--muet); text-transform: uppercase; }
.up-title { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tt-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tt-day h3 { font-size: 1rem; text-transform: capitalize; margin-bottom: 6px; }
.tt-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tt-day li { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 10px; border-radius: 8px; background: var(--bg); }
.tt-day li .grow { flex: 1; min-width: 0; display: grid; }
.tt-day li strong { font-weight: 650; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-day .icon-btn { width: 30px; height: 30px; }
.slot-form-holder:not(:empty) { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--trait); }
.slot-form, .event-form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: 1.2fr 1fr 1fr; }
.import-review { display: grid; gap: 12px; }
.import-review > p { margin: 0; }
.import-list { display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.import-row { display: grid; grid-template-columns: auto 150px minmax(0, 1fr) minmax(0, .8fr); gap: 8px; align-items: center; }
.import-row .input { padding: .4em .6em; font-size: .9rem; }
.import-exams { display: grid; gap: 4px; }
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(30, 18, 28, .55); }
.modal-card { width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow: auto; }
.event-form h2 { font-size: 1.3rem; }

@media (max-width: 1100px) {
  .agenda-grid { grid-template-columns: 1fr; }
  .agenda-side { position: static; grid-row: 1; }
}
@media (max-width: 760px) {
  .activity { left: 0; }
  .thread-top { padding: 10px 12px 0; }
  .quiz-form { grid-template-columns: 1fr 1fr; }
  .quiz-form .grow { grid-column: 1 / -1; }
  .quiz-form .btn { grid-column: 1 / -1; }
  .question-card { padding: 22px 18px 18px; }
  .question { font-size: 1.15rem; }
  .tiles { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .tile { grid-template-columns: 1fr; padding: 12px; justify-items: start; }
  .tile svg { grid-row: auto; width: 20px; height: 20px; }
  .tile b { font-size: 1.4rem; }
  .tile span { font-size: .75rem; }
  .sp-grid, .sp-notions { grid-template-columns: 1fr; }
  .sp-courses li { grid-template-columns: minmax(0, 1fr) 80px 40px; }
  .plans { grid-template-columns: 1fr; }
  .reading-head { grid-template-columns: 36px 1fr auto; }
  .reading-head .pill { grid-column: 2; grid-row: 2; justify-self: start; }
  .reading-body { padding-left: 0; }
  .day { min-height: 54px; padding: 4px; }
  .day .ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .day .ev.more { display: none; }
  .wcols { gap: 2px; }
  .block { font-size: .6rem; padding: 2px 3px; }
  .block span { display: none; }
  .week { grid-template-columns: 30px minmax(0, 1fr); }
  .hour { font-size: .6rem; }
  .import-row { grid-template-columns: auto 1fr; }
  .import-row .input { grid-column: 2; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .nav button { font-size: .66rem; }
  .usage-pop { right: -8px; width: min(290px, calc(100vw - 24px)); }
}

/* --- Retouches --- */
.lbl-short { display: none; }
.avatar { color: var(--ink); }
.level { white-space: nowrap; }
.subject-head h2 { flex-wrap: wrap; row-gap: 0; }
@media (max-width: 760px) {
  .nav .lbl { display: none; }
  .nav .lbl-short { display: inline; font-size: .7rem; }
  .side .who .theme-btn { display: none; }
  .composer select.input { display: none; }
  .composer .toggle { font-size: .82rem; gap: 6px; }
  .subject-head h2 { font-size: 1.15rem; }
  .subject-head .btn.small { padding: .35em .6em; }
  .agenda-grid, .agenda-main, .agenda-side { display: contents; }
  .agenda-page .cal-card { order: 1; }
  .agenda-side > * { order: 2; }
  #emploi-du-temps { order: 3; }
  .agenda-page { display: flex; flex-direction: column; gap: 18px; }
  .agenda-page > .page-head { order: 0; margin-bottom: 4px; }
}

/* --- Détecteur : passages, jeu de test --------------------------------------------- */
.passages { margin-top: 18px; border-top: 1px solid var(--trait); padding-top: 12px; }
.passages summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
.passages > p { margin: 6px 0 10px; }
.psg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.psg { border-left: 4px solid var(--trait); background: color-mix(in srgb, var(--trait) 28%, transparent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 10px 14px; }
.psg p { margin: .35em 0 0; font-size: .925rem; line-height: 1.55; }
.psg-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.psg-tag { font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.psg.ia { border-left-color: var(--grenat); background: var(--grenat-soft); }
.psg.ia .psg-tag { color: var(--grenat); }
.psg.humain { border-left-color: var(--sauge); background: var(--sauge-soft); }
.psg.humain .psg-tag { color: var(--sauge); }
.psg.grey-ia { border-left-color: var(--miel); background: var(--miel-soft); }
.psg.grey-ia .psg-tag { color: var(--miel); }
.psg.grey .psg-tag, .psg.court .psg-tag { color: var(--muet); }
.score .lbl .pill { margin-right: 4px; vertical-align: 2px; }

.sample-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 6px; }
.sample-goals > div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: var(--radius-s); }
.goal { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 650; margin-top: 6px; }
.goal-bar { flex: 1; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--trait) 80%, transparent); overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--abricot); }
.goal.done .goal-bar span { background: var(--sauge); }
.card details.explain { margin-top: 14px; }
.prompt-list { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.prompt-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; padding: 10px 12px;
  border: 1px solid var(--trait); border-radius: var(--radius-s); margin: 0 !important; }
.prompt-list p { margin: .2em 0 0; white-space: pre-line; }
.sample-list { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; gap: 2px; }
.sample-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 10px 0;
  border-top: 1px solid var(--trait); }
.sample-list .pill { margin-top: 2px; }
.sample-title { font-weight: 650; }
.sample-excerpt { font-size: .875rem; color: var(--muet); margin-top: 2px; overflow-wrap: anywhere; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: .925rem; font-weight: 600; }
.check-line input { margin-top: .25em; width: 18px; height: 18px; accent-color: var(--abricot); flex: none; }
@media (max-width: 640px) {
  .sample-goals { grid-template-columns: 1fr; }
}
.era-table { margin-top: 16px; overflow-x: auto; }
.score .lbl-detail { display: block; font-weight: 400; margin-top: 6px; }
.ci { display: block; color: var(--muet); font-size: .8em; font-weight: 400; white-space: nowrap; }
.status-grid .lbl-detail { display: block; margin-top: 2px; }
.status-grid .lbl-detail .ci { display: inline; }
@media (max-width: 640px) {
  .settings .status-grid { grid-template-columns: 1fr; gap: 0; }
  .settings .status-grid dd { margin-bottom: 10px; }
  .era-table th, .era-table td { padding-right: 8px; font-size: .85rem; }
}
.pill.chosen { margin-left: 8px; }

/* Vérifier un texte : document glissé, comparaison avec les cours, parties, progression */
.drop-zone { transition: box-shadow .15s, outline-color .15s; outline: 2px dashed transparent; outline-offset: -8px; }
.drop-zone.dragging { outline-color: var(--abricot); background: color-mix(in srgb, var(--abricot) 6%, var(--surface)); }
.compare-label { font-weight: 650; font-size: .925rem; }
.analyse-progress { display: grid; gap: 10px; }
.analyse-progress .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.analyse-progress .goal-bar { flex: none; height: 8px; }
.analyse-progress .goal-bar span { transition: width .9s linear; }
.goal-bar.indeterminate span { width: 35%; animation: indeterminate 1.4s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .goal-bar.indeterminate span { animation: none; width: 100%; opacity: .4; } }
.parts-list { display: flex; flex-wrap: wrap; gap: 8px; }
.part-chip { display: grid; gap: 2px; text-align: left; padding: .55em .9em; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface); color: var(--ink); cursor: pointer; }
.part-chip.active { border-color: var(--abricot); box-shadow: var(--shadow); }

/* Fenêtre « analyse terminée » */
.notify-pop { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: min(380px, calc(100vw - 32px)); display: grid; gap: 10px;
  padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow), 0 12px 40px rgba(0,0,0,.18);
  border: 1px solid var(--trait); border-left: 4px solid var(--abricot); opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.notify-pop.bad { border-left-color: var(--grenat); }
.notify-pop strong { color: var(--ink); }
.notify-pop p { color: var(--ink); }
.notify-pop .btn.ghost { color: var(--ink); }
@media (max-width: 760px) { .notify-pop { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; } }
.notify-pop.show { opacity: 1; transform: none; }
.notify-pop p { margin: 4px 0 0; font-size: .925rem; }
.notify-pop .actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
a.activity-pill { text-decoration: none; color: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .notify-pop { transition: none; } }


/* =====================================================================================
   Refonte 2026 : l'esprit de macOS / iPadOS actuels (« Liquid Glass » assagi).
   Un fond doux et coloré, des barres en verre dépoli (barre latérale, barre d'onglets flottante sur mobile,
   zone de saisie, notifications), des cartes claires aux coins généreux, des titres en gras serré.
   Cette couche vient en dernier : elle redéfinit l'apparence sans toucher à la structure des pages.
   ===================================================================================== */
:root {
  --glass: rgba(255, 250, 247, .72);
  --glass-strong: rgba(255, 250, 247, .9);
  --glass-edge: rgba(255, 255, 255, .75);
  --hairline: rgba(58, 34, 56, .1);
  --fill: rgba(58, 34, 56, .055);
  --fill-hover: rgba(58, 34, 56, .09);
  --sel: rgba(238, 155, 91, .24);
  --accent-ink: #b45a1b;
  --accent-top: #f6b27c;
  --wash-a: rgba(238, 155, 91, .32);
  --wash-b: rgba(222, 128, 166, .22);
  --wash-c: rgba(140, 110, 220, .12);
  --lift: 0 1px 1px rgba(58, 34, 56, .04), 0 14px 34px -16px rgba(58, 34, 56, .28);
  --float: 0 2px 6px rgba(58, 34, 56, .06), 0 22px 50px -18px rgba(58, 34, 56, .35);
  --bubble: linear-gradient(180deg, #55334f, #3a2238);
  --pill: var(--surface);
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 26px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Figtree", system-ui, "Segoe UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Figtree", system-ui, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="rose"]) {
  --glass: rgba(42, 27, 39, .66);
  --glass-strong: rgba(46, 30, 43, .9);
  --glass-edge: rgba(255, 255, 255, .09);
  --hairline: rgba(255, 255, 255, .08);
  --fill: rgba(255, 255, 255, .06);
  --fill-hover: rgba(255, 255, 255, .1);
  --sel: rgba(243, 176, 122, .2);
  --accent-ink: #f3b07a;
  --accent-top: #f6b27c;
  --wash-a: rgba(238, 155, 91, .14);
  --wash-b: rgba(190, 90, 150, .2);
  --wash-c: rgba(100, 80, 200, .16);
  --lift: 0 1px 0 rgba(0, 0, 0, .25), 0 16px 40px -18px rgba(0, 0, 0, .75);
  --float: 0 2px 8px rgba(0, 0, 0, .3), 0 24px 60px -20px rgba(0, 0, 0, .8);
  --bubble: linear-gradient(180deg, #6a4364, #523250);
  --pill: rgba(255, 255, 255, .15);
} }
:root[data-theme="dark"] {
  --glass: rgba(42, 27, 39, .66);
  --glass-strong: rgba(46, 30, 43, .9);
  --glass-edge: rgba(255, 255, 255, .09);
  --hairline: rgba(255, 255, 255, .08);
  --fill: rgba(255, 255, 255, .06);
  --fill-hover: rgba(255, 255, 255, .1);
  --sel: rgba(243, 176, 122, .2);
  --accent-ink: #f3b07a;
  --accent-top: #f6b27c;
  --wash-a: rgba(238, 155, 91, .14);
  --wash-b: rgba(190, 90, 150, .2);
  --wash-c: rgba(100, 80, 200, .16);
  --lift: 0 1px 0 rgba(0, 0, 0, .25), 0 16px 40px -18px rgba(0, 0, 0, .75);
  --float: 0 2px 8px rgba(0, 0, 0, .3), 0 24px 60px -20px rgba(0, 0, 0, .8);
  --bubble: linear-gradient(180deg, #6a4364, #523250);
  --pill: rgba(255, 255, 255, .15);
}
:root[data-theme="rose"] {
  --glass: rgba(255, 248, 249, .7);
  --glass-strong: rgba(255, 248, 249, .9);
  --glass-edge: rgba(255, 255, 255, .8);
  --hairline: rgba(156, 83, 104, .14);
  --fill: rgba(156, 83, 104, .06);
  --fill-hover: rgba(156, 83, 104, .1);
  --sel: rgba(233, 163, 180, .34);
  --accent-ink: #9c5368;
  --accent-top: #f2bccb;
  --wash-a: rgba(240, 168, 190, .5);
  --wash-b: rgba(250, 200, 185, .45);
  --wash-c: rgba(196, 160, 225, .26);
  --lift: 0 1px 1px rgba(156, 83, 104, .05), 0 14px 34px -16px rgba(156, 83, 104, .32);
  --float: 0 2px 6px rgba(156, 83, 104, .08), 0 22px 50px -18px rgba(156, 83, 104, .4);
  --bubble: linear-gradient(180deg, #b0677c, #9c5368);
  --pill: var(--surface);
}

/* Fond : la couleur du thème, éclairée par trois halos très diffus (comme un fond d'écran flouté). */
body {
  background:
    radial-gradient(48rem 36rem at 92% -8%, var(--wash-a), transparent 62%),
    radial-gradient(40rem 34rem at -6% 104%, var(--wash-b), transparent 60%),
    radial-gradient(34rem 28rem at 46% 58%, var(--wash-c), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: -.006em;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.022em; }
h1 { font-size: 2.15rem; letter-spacing: -.03em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; letter-spacing: -.012em; }
.welcome h1 { font-size: clamp(2.2rem, 4.4vw, 3.1rem); letter-spacing: -.035em; }
.page-head p, .welcome p { font-size: 1.02rem; }

/* Verre dépoli : réservé aux éléments qui flottent au-dessus du contenu. */
.side, .convs, .composer form, #toast, .notify-pop, .activity-pill, .usage-pop, .modal-card, .lightbox .lb-close {
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}

/* Barre latérale : bord à bord, en verre clair, texte du thème (et non plus un bloc prune). */
.side {
  background: var(--glass); color: var(--ink); border-right: 1px solid var(--hairline);
  padding: 20px 12px 14px; box-shadow: inset -1px 0 0 var(--glass-edge);
}
.side .brand { padding: 2px 10px 20px; }
.side .brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 4px 12px -4px rgba(58, 34, 56, .45); }
.side .brand span { font-family: var(--serif); color: var(--ink); font-size: 1.4rem; }
.nav { gap: 2px; }
.nav button { color: var(--ink); font-weight: 560; padding: .62em .8em; border-radius: 11px; transition: background .15s, color .15s; }
.nav button svg { color: var(--accent-ink); opacity: .9; }
.nav button:hover { background: var(--fill); }
.nav button[aria-current="page"] { background: var(--sel); color: var(--ink); font-weight: 650; }
.nav button[aria-current="page"] svg { color: var(--accent-ink); }
.nav button[aria-current="page"] .badge, .nav button[aria-current="page"] .badge.soft { background: var(--accent-ink); color: var(--surface); }
.side .who { border-top: 1px solid var(--hairline); }
.side .who .icon-btn { color: var(--muet); }
.side .who .icon-btn:hover { background: var(--fill-hover); color: var(--ink); }
.avatar { background: linear-gradient(180deg, var(--accent-top), var(--abricot)); color: var(--on-accent); font-family: var(--display); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }

/* Cartes : surface presque opaque, liseré clair, coins généreux, ombre douce. */
.card { background: var(--glass-strong); border-radius: var(--radius-m); box-shadow: var(--lift), inset 0 1px 0 var(--glass-edge);
  border: 1px solid var(--hairline); }
.ideas button, .course-row, .quiz-row, .option, .reading, .inbox-item, .prod { border-radius: 16px; }
.ideas button { background: var(--glass-strong); border: 1px solid var(--hairline); box-shadow: var(--lift); transition: transform .15s, box-shadow .15s; }
.ideas button:hover { border-color: var(--hairline); transform: translateY(-1px); box-shadow: var(--float); }

/* Boutons : capsules ; le bouton principal a un léger dégradé et un reflet en haut, comme du verre teinté. */
.btn { background: linear-gradient(180deg, var(--accent-top), var(--abricot)); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 2px rgba(0, 0, 0, .08), 0 6px 16px -8px color-mix(in srgb, var(--abricot) 80%, transparent);
  font-weight: 650; letter-spacing: -.005em; }
.btn:hover { filter: brightness(1.04); transform: translateY(-.5px); }
.btn.ghost { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 2px rgba(0, 0, 0, .04);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.ghost:hover { background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--hairline), var(--lift); }
.btn.danger { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.btn svg, .icon-btn svg { flex: none; }
.convs-head .btn { padding-inline: 1em; }
.icon-btn { border-radius: 999px; }
.icon-btn:hover { background: var(--fill-hover); }

/* Champs : remplis plutôt qu'encadrés, anneau de couleur à la saisie. */
.input, select.input, textarea.input { background: var(--fill); border: 1px solid transparent; border-radius: var(--radius-s); }
.input:hover { background: var(--fill-hover); }
.input:focus { background: var(--surface); border-color: color-mix(in srgb, var(--abricot) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--abricot) 22%, transparent); }

/* Contrôles segmentés et onglets : une piste discrète, l'élément choisi en pastille claire. */
.seg, .theme-choice { background: var(--fill); padding: 3px; }
.theme-choice button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--pill); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 3px 10px -4px rgba(0, 0, 0, .18); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); border: 0; max-width: 100%; }
.tabs a { border: 0; margin: 0; border-radius: 999px; padding: .45em 1em; }
.tabs a[aria-current="page"] { background: var(--pill); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 3px 10px -4px rgba(0, 0, 0, .18); }
.toggle input { width: 40px; height: 24px; background: var(--fill-hover); }
.toggle input::after { top: 2px; left: 2px; width: 20px; height: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle input:checked { background: #34a35a; }
.toggle input:checked::after { transform: translateX(16px); }

/* Discussion : liste des conversations en verre, bulle de l'utilisatrice en dégradé, zone de saisie flottante. */
.convs { background: color-mix(in srgb, var(--glass) 70%, transparent); border-right: 1px solid var(--hairline); }
.convs li { border-radius: 11px; }
.convs li:hover { background: var(--fill); }
.convs li.active { background: var(--sel); }
.msg.user .bubble { background: var(--bubble); color: #fff7f4; border-radius: 20px 20px 6px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px -10px rgba(43, 26, 41, .6); }
.composer form { background: var(--glass-strong); border: 1px solid var(--hairline); border-radius: 28px;
  box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); }
.composer form:focus-within { border-color: color-mix(in srgb, var(--abricot) 60%, transparent);
  box-shadow: var(--float), 0 0 0 4px color-mix(in srgb, var(--abricot) 16%, transparent); }
.send { width: 40px; height: 40px; }

/* Agenda : cases de jour plus légères, aujourd'hui en pastille pleine. */
.day { background: var(--fill); border-radius: 14px; transition: background .15s; }
.day:hover { background: var(--fill-hover); }
.day.selected { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--abricot) 85%, transparent); background: var(--sel); }
.day.today .num { background: linear-gradient(180deg, var(--accent-top), var(--abricot)); color: var(--on-accent); }
.ev { border-radius: 7px; }
.drop { background: var(--glass); border: 1.5px dashed color-mix(in srgb, var(--muet) 45%, transparent); border-radius: var(--radius-m); }

/* Notifications, bandeau d'activité, fenêtres : verre clair, ombre portée. */
#toast { background: var(--glass-strong); border: 1px solid var(--hairline); border-left: 1px solid var(--hairline); border-radius: 999px;
  box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); padding: .7em 1.3em .7em 1.1em; }
#toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--abricot); margin-right: .6em; vertical-align: .08em; }
#toast.bad { background: color-mix(in srgb, var(--grenat-soft) 88%, transparent); border-color: color-mix(in srgb, var(--grenat) 40%, transparent); }
#toast.bad::before { background: var(--grenat); }
.notify-pop { background: var(--glass-strong); border: 1px solid var(--hairline); border-radius: 22px; box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); }
.notify-pop::before { content: ""; position: absolute; left: 16px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--abricot); }
.notify-pop.bad::before { background: var(--grenat); }
.notify-pop > div:first-child { padding-left: 16px; }
.activity-pill { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--hairline); box-shadow: var(--float); }
.activity-detail, .activity-time { color: var(--muet); }
.usage-pop { background: var(--glass-strong); }
.modal { background: rgba(30, 18, 28, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-card { background: var(--glass-strong); border-radius: 24px; box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); }

/* Connexion : le même fond lumineux, une carte en verre. */
.login { background: transparent; }
.login-card { width: min(100%, 420px); background: var(--glass-strong); color: var(--ink); border: 1px solid var(--hairline); border-radius: 28px;
  box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); }
.login-card .brand img { border-radius: 12px; box-shadow: 0 6px 16px -6px rgba(58, 34, 56, .5); }

/* Mobile et tablette en portrait : la navigation devient une barre d'onglets flottante, en verre. */
@media (max-width: 760px) {
  .side { margin: 0 10px calc(8px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 28px; border: 1px solid var(--hairline);
    box-shadow: var(--float), inset 0 1px 0 var(--glass-edge); }
  .nav button { border-radius: 22px; padding: .45em .1em; font-size: .7rem; gap: 2px; font-weight: 600; }
  .nav button[aria-current="page"] { background: var(--sel); }
  .nav .lbl-short { font-size: .68rem; }
  .side .who { border-top: 0; padding: 0 0 0 2px; }
  .side .who .icon-btn { width: 40px; height: 40px; }
  h1 { font-size: 1.85rem; }
  .welcome h1 { font-size: 2.3rem; }
  .convs { background: var(--glass-strong); }
  .composer form { border-radius: 24px; }
  .notify-pop { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* Sans transparence (réglage d'accessibilité) : des surfaces pleines. */
@media (prefers-reduced-transparency: reduce) {
  .side, .convs, .composer form, #toast, .notify-pop, .activity-pill, .usage-pop, .modal-card, .login-card, .card, .btn.ghost {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}

/* Page « Confidentialité et mentions légales » (/confidentialite). */
.legal-page { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; display: grid; gap: 18px; }
.legal-page .lead { color: var(--muet); margin: 0; font-size: 1.05rem; }
.legal-page .card { display: grid; gap: 8px; }
.legal-page .card p, .legal-page .card ul { margin: 0; }
.legal-page .card ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-page h3 { margin-top: 6px; }
.legal-page .back { text-decoration: none; color: var(--accent-ink); font-weight: 600; }
.login-foot a, .legal-link { color: var(--muet); }
.legal-link { display: block; text-align: center; font-size: .85rem; margin-top: 18px; }
