
:root {
  --bg: #07080c; --ink: #eef0f6; --mut: #8d93a6; --dim: #5b6173;
  --glass: rgba(255,255,255,.035); --glass2: rgba(255,255,255,.06); --stroke: rgba(255,255,255,.075); --stroke2: rgba(255,255,255,.12);
  --acc: #a5b4fc; --acc2: #f0abfc; --grad: linear-gradient(135deg, #c4b5fd 0%, #f0abfc 50%, #fcd5b5 100%);
  --r: 18px; --side: 284px; --chatw: 380px;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Helvetica Neue', system-ui, sans-serif; --serif: var(--sans);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 35% at 15% 10%, rgba(124,58,237,.22), transparent 70%),
              radial-gradient(35% 30% at 90% 15%, rgba(236,72,153,.13), transparent 70%),
              radial-gradient(45% 40% at 70% 95%, rgba(20,184,166,.12), transparent 70%),
              radial-gradient(30% 30% at 5% 85%, rgba(59,130,246,.10), transparent 70%);
  filter: blur(20px); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(2%, -2%, 0) scale(1.05); } }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc); text-decoration: none; }
::selection { background: rgba(165,180,252,.35); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

.glass { background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 60px -30px rgba(0,0,0,.6); }
.muted { color: var(--mut); font-size: 12.5px; }

button { background: var(--glass2); border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 14px; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
button:hover { background: rgba(255,255,255,.09); border-color: var(--stroke2); }
button:active { transform: scale(.97); }
button.primary { background: var(--ink); color: #0b0c12; border-color: transparent; font-weight: 600; }
button.primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--glass2); }
button.icon { padding: 0; width: 38px; height: 38px; justify-content: center; border-radius: 12px; }
button.icon.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
button.icon.on { color: var(--acc); border-color: rgba(165,180,252,.4); }
button.danger { color: #fda4af; }
input, select, textarea { background: rgba(0,0,0,.25); border: 1px solid var(--stroke); border-radius: 11px; padding: 9px 11px; min-width: 0; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: rgba(165,180,252,.55); box-shadow: 0 0 0 3px rgba(165,180,252,.15); }
input[type=number] { width: 84px; } input[type=color] { padding: 3px; width: 40px; height: 38px; cursor: pointer; }
input[type=file] { padding: 7px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 14px; padding: 14px; height: 100vh; height: 100dvh; }
.shell.with-chat { grid-template-columns: var(--side) minmax(0, 1fr) var(--chatw); }
.side { border-radius: var(--r); padding: 20px 18px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.chat { display: none; border-radius: var(--r); min-height: 0; flex-direction: column; overflow: hidden; }
.shell.with-chat .chat { display: flex; animation: slidein .3s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
.tabbar { display: none; }

/* ---------- Sidebar ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 26px; letter-spacing: .2px; }
.brand.big { font-size: 34px; justify-content: center; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); box-shadow: 0 0 24px rgba(240,171,252,.35); position: relative; flex: none; }
.logo::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.greet { font-family: var(--serif); font-size: 24px; line-height: 1.15; margin: 18px 0 10px; }
.greet span { font-family: var(--sans); font-size: 12.5px; color: var(--mut); }
.nowcard { position: relative; border-radius: 16px; padding: 14px 16px; background: linear-gradient(140deg, color-mix(in srgb, var(--c, #a5b4fc) 30%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c, #a5b4fc) 35%, transparent); display: grid; gap: 2px; overflow: hidden; }
.nowcard::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--c, #a5b4fc); opacity: .25; filter: blur(30px); }
.nowcard small { color: rgba(255,255,255,.65); font-size: 11.5px; letter-spacing: .3px; }
.nowcard strong { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.nowcard strong.sm { font-size: 14px; margin-bottom: 0; }
.side h4 { margin: 18px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); font-weight: 600; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.agenda li { display: flex; gap: 9px; align-items: center; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.agenda li:hover { background: var(--glass2); }
.agenda li span { color: var(--mut); font-variant-numeric: tabular-nums; font-size: 12px; width: 38px; flex: none; }
.agenda li i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.agenda li.done { opacity: .4; }
.agenda li.cur { background: var(--glass2); }
.goals { display: grid; gap: 11px; }
.goal .gl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; gap: 8px; }
.goal .gl span { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal .gl b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gbar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.06); overflow: hidden; }
.gbar div { height: 100%; border-radius: 9px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.stat { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mut); }
.stat b { color: var(--ink); font-weight: 500; }

/* ---------- Header ---------- */
.top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 4px 4px 12px; }
.nav, .actions { display: flex; gap: 6px; align-items: center; }
.nav h2 { margin: 0 0 0 10px; font-weight: 400; font-size: 30px; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.t-serif { font-family: var(--serif); }
.t-serif::first-letter { text-transform: uppercase; }
.t-mut { font-size: 14px; color: var(--mut); font-family: var(--sans); }
.chip-ai { border-radius: 99px; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.chip-ai svg { color: #f0abfc; }
.chip-ai.on, .chip-ai:hover { background: linear-gradient(#1e142d, #1e142d) padding-box, var(--grad) border-box; border-color: transparent; }
.banners { display: grid; gap: 6px; margin-bottom: 10px; }
.banners:empty { display: none; }
.banner { padding: 9px 10px 9px 14px; border-radius: 13px; background: rgba(165,180,252,.08); border: 1px solid rgba(165,180,252,.2); display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 13px; }
.banner.warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); }
.banner.soft { background: transparent; border-style: dashed; border-color: var(--stroke2); color: var(--mut); }
.banner button { padding: 5px 12px; font-size: 12.5px; }

/* ---------- Calendrier ---------- */
.calwrap { border-radius: var(--r); overflow: auto; flex: 1; min-height: 0; position: relative; }
.cal { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); padding: 0 10px 14px 0; }
.corner, .dayhead { position: sticky; top: 0; z-index: 10; background: rgba(12,13,19,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.dayhead { display: flex; flex-direction: column; align-items: center; padding: 12px 0 10px; border-bottom: 1px solid var(--stroke); gap: 2px; }
.dayhead span { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 500; }
.dayhead b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.dayhead.today b { background: var(--grad); color: #140f1c; box-shadow: 0 0 28px rgba(240,171,252,.35); }
.dayhead.today span { color: var(--ink); }
.hours { position: relative; margin-top: 10px; }
.hours div { position: absolute; right: 10px; transform: translateY(-7px); font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.col { position: relative; border-left: 1px solid rgba(255,255,255,.045); margin-top: 10px; cursor: cell; }
.col.is-today { background: linear-gradient(180deg, rgba(165,180,252,.045), rgba(240,171,252,.02)); }
.line { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.045); pointer-events: none; }
.now { position: absolute; left: -4px; right: 0; height: 2px; background: linear-gradient(90deg, #fb7185, rgba(251,113,133,.2)); z-index: 6; pointer-events: none; box-shadow: 0 0 12px rgba(251,113,133,.7); }
.now::before { content: ''; position: absolute; left: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 4px rgba(251,113,133,.2); }

.block { position: absolute; border-radius: 10px; padding: 6px 9px 5px 11px; overflow: hidden; cursor: grab; user-select: none; z-index: 2;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 34%, #0d0e14) 0%, color-mix(in srgb, var(--c) 20%, #0d0e14) 100%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 14px -6px color-mix(in srgb, var(--c) 60%, transparent);
  transition: box-shadow .15s, filter .15s; }
.block::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); box-shadow: 0 0 10px var(--c); }
.block:hover { z-index: 4; filter: brightness(1.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 24px -8px color-mix(in srgb, var(--c) 80%, transparent); }
.block .bt { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.1px; }
.block .bm { color: rgba(255,255,255,.6); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.block.tiny { padding-top: 2px; padding-bottom: 0; display: flex; gap: 6px; align-items: baseline; } .block.tiny::before { top: 4px; bottom: 4px; }
.block.tiny .bm { font-size: 10.5px; }
.block.micro { padding: 0 6px 0 9px; display: flex; align-items: center; } .block.micro .bt { font-size: 10.5px; } .block.micro .bm { display: none; } .block.micro::before { top: 2px; bottom: 2px; }
.block.locked .bt::after { content: ' •'; color: var(--c); }
.block.fixed { cursor: pointer; }
.block.cours { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 42%, #0d0e14), color-mix(in srgb, var(--c) 26%, #0d0e14)); }
.block.sommeil { background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 6px, transparent 6px 12px); border-color: rgba(255,255,255,.05); box-shadow: none; }
.block.sommeil::before { display: none; } .block.sommeil .bt { color: var(--dim); font-weight: 500; } .block.sommeil .bm { color: var(--dim); }
.block.transport { background: rgba(255,255,255,.035); border-style: dashed; border-color: rgba(255,255,255,.12); box-shadow: none; }
.block.transport::before { background: #94a3b8; box-shadow: none; }
.block.copine { background: linear-gradient(160deg, rgba(236,72,153,.38), rgba(244,114,182,.16)); }
.block.past { opacity: .55; filter: saturate(.7); }
.block.missed { opacity: .35; } .block.missed .bt { text-decoration: line-through; }
.block.dragging { z-index: 50; cursor: grabbing; opacity: .95; box-shadow: 0 20px 40px -10px rgba(0,0,0,.7), 0 0 0 1px var(--c); }
.foot { padding: 10px 4px 0; font-size: 12px; color: var(--dim); text-align: center; }

/* ---------- Assistante ---------- */
.chat-head { display: flex; align-items: center; gap: 11px; padding: 16px 14px 14px 18px; border-bottom: 1px solid var(--stroke); }
.chat-head b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 400; line-height: 1; }
.chat-head small { color: var(--mut); font-size: 12px; }
.chat-head .sp { flex: 1; }
.orb { width: 34px; height: 34px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, #c4b5fd, #f0abfc, #fcd5b5, #67e8f9, #c4b5fd); box-shadow: 0 0 24px rgba(240,171,252,.45), inset 0 0 12px rgba(255,255,255,.5); animation: spin 8s linear infinite; position: relative; }
.orb::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(255,255,255,0) 60%); }
.orb.busy { animation: spin 1.4s linear infinite, pulse 1.2s ease-in-out infinite; }
.orb.lg { width: 64px; height: 64px; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 40px rgba(240,171,252,.8), inset 0 0 12px rgba(255,255,255,.5); } }
.msgs { flex: 1; overflow: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; animation: pop .2s ease; word-wrap: break-word; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.user { align-self: flex-end; background: var(--ink); color: #0d0e14; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); border-bottom-left-radius: 6px; }
.msg.err { border-color: rgba(251,113,133,.4); color: #fecdd3; }
.msg.typing { display: flex; gap: 5px; align-items: center; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mut); animation: dot 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
.msg.typing small { color: var(--mut); margin-left: 6px; font-size: 12px; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
.empty { margin: auto 0; text-align: center; padding: 10px; }
.empty p { font-family: var(--serif); font-size: 21px; line-height: 1.25; margin: 0 0 18px; }
.empty p span { font-family: var(--sans); font-size: 13px; }
.sugg { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.pill { border-radius: 99px; font-size: 12.5px; padding: 7px 13px; background: rgba(255,255,255,.04); white-space: normal; text-align: left; }
.pad { padding: 0 18px; }
.composer { display: flex; align-items: flex-end; gap: 8px; margin: 12px; padding: 6px; border-radius: 22px; background: rgba(0,0,0,.3); border: 1px solid var(--stroke2); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: rgba(240,171,252,.45); box-shadow: 0 0 0 4px rgba(240,171,252,.1); }
.composer textarea { flex: 1; resize: none; background: transparent; border: 0; box-shadow: none !important; padding: 9px 4px; max-height: 140px; }
.micbtn, .sendbtn { width: 38px; height: 38px; border-radius: 50%; padding: 0; justify-content: center; flex: none; }
.sendbtn { background: var(--ink); color: #0d0e14; border: 0; }
.micbtn.rec { background: #fb7185; color: #fff; border-color: transparent; animation: rec 1.2s ease-in-out infinite; }
@keyframes rec { 50% { box-shadow: 0 0 0 10px rgba(251,113,133,.18); } }

/* ---------- Modales ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4,5,8,.6); backdrop-filter: blur(6px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: rgba(18,19,27,.94); border-radius: 22px; padding: 22px; width: min(660px, 100%); max-height: 88vh; overflow: auto; animation: rise .25s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sheet h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.sheet > .muted { margin: 0 0 6px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: 0 0 14px var(--c); flex: none; }
.grid { display: grid; gap: 12px; }
.grid label, .row label { display: grid; gap: 5px; color: var(--mut); font-size: 12px; font-weight: 500; }
.row { display: flex; gap: 10px; align-items: end; }
.row > label { flex: 1; } .row.wrap { flex-wrap: wrap; } .row.wrap > label { flex: 0 1 auto; }
.grow { flex: 1 1 140px; }
label.check { display: flex !important; gap: 9px; align-items: center; color: var(--ink) !important; font-size: 13px !important; font-weight: 400 !important; }
label.inl { display: flex !important; align-items: center; gap: 6px; }
fieldset { border: 1px solid var(--stroke); border-radius: 16px; padding: 12px 14px 14px; display: grid; gap: 10px; background: rgba(255,255,255,.015); }
legend { padding: 0 6px; font-family: var(--serif); font-size: 18px; }
.seg { display: flex; padding: 4px; background: rgba(0,0,0,.3); border-radius: 12px; border: 1px solid var(--stroke); }
.seg label { flex: 1; display: block !important; cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 7px; border-radius: 9px; color: var(--mut); font-size: 13px; transition: background .15s; }
.seg input:checked + span { background: rgba(255,255,255,.1); color: var(--ink); }
.btns { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.btns span { flex: 1; }
.btns.sticky { position: sticky; bottom: -22px; background: linear-gradient(transparent, rgba(18,19,27,.98) 30%); padding: 18px 0 4px; margin-bottom: -6px; }
.step { font-weight: 600; margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; }
.step span { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #140f1c; display: grid; place-items: center; font-size: 12px; }
.list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 14px; background: linear-gradient(90deg, rgba(236,72,153,.16), rgba(236,72,153,.04)); border: 1px solid rgba(236,72,153,.25); border-radius: 12px; }
.list li.empty-li { background: transparent; border-style: dashed; border-color: var(--stroke2); padding: 10px 14px; }
.donut { display: flex; gap: 22px; align-items: center; margin: 14px 0 6px; flex-wrap: wrap; }
.dn { width: 150px; height: 150px; flex: none; }
.dn-n { fill: var(--ink); font-family: var(--serif); font-size: 24px; } .dn-l { fill: var(--mut); font-size: 9px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12.5px; color: var(--mut); flex: 1; min-width: 220px; }
.legend i, .review i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 7px; }
.legend b { color: var(--ink); font-weight: 500; margin-left: 4px; }
.review { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.review td, .review th { padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.review th { color: var(--dim); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.review .bar { width: 32%; }
.review .bar > div { height: 6px; background: rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; }
.review .bar > div > div { height: 100%; border-radius: 6px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: rgba(30,31,42,.95); backdrop-filter: blur(14px); border: 1px solid var(--stroke2); padding: 11px 16px; border-radius: 14px; z-index: 200; max-width: 90vw; font-size: 13px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); animation: fade .25s ease; }
.login { max-width: 400px; margin: 16vh auto; padding: 36px 30px; text-align: center; border-radius: 26px; }
.login h1 { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.05; margin: 22px 0 8px; }
.login h1 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login form { display: grid; gap: 10px; margin-top: 20px; }
.login button { justify-content: center; padding: 11px; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) { :root { --side: 240px; --chatw: 340px; } }
@media (max-width: 860px) {
  .shell, .shell.with-chat { grid-template-columns: 1fr; padding: 0; gap: 0; height: auto; min-height: 100dvh; }
  .side { display: none; }
  .main { padding: max(10px, env(safe-area-inset-top)) 10px 104px; min-height: 100dvh; }
  .calwrap { overflow: visible; border-radius: 16px; }
  .top { padding: 4px 2px 10px; }
  .nav h2 { font-size: 26px; margin-left: 6px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .nav h2 .t-mut { font-size: 12.5px; }
  .hide-sm { display: none !important; }
  .actions button.primary { padding: 8px 12px; font-size: 13px; }
  .cal { grid-template-columns: 48px minmax(0, 1fr); padding-right: 8px; }
  .block .bt { font-size: 13.5px; } .block .bm { font-size: 12px; }
  .chat { display: flex; position: fixed; inset: 0; z-index: 60; border-radius: 0; background: rgba(9,10,15,.97); padding-top: env(safe-area-inset-top); padding-bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); border: 0; }
  .chat.open { transform: none; }
  .tabbar { display: flex; position: fixed; z-index: 70; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); border-radius: 24px; padding: 6px; justify-content: space-around; align-items: center; background: rgba(18,19,27,.85); }
  .tabbar button { flex-direction: column; gap: 2px; border: 0; background: transparent; padding: 6px 8px; font-size: 10.5px; color: var(--mut); border-radius: 14px; }
  .tabbar button.on { color: var(--ink); }
  .tabbar .micbig { width: 56px; height: 56px; border-radius: 50%; background: var(--grad); color: #140f1c; margin-top: -24px; box-shadow: 0 10px 30px -6px rgba(240,171,252,.6), 0 0 0 5px var(--bg); justify-content: center; }
  .tabbar .micbig:hover { background: var(--grad); }
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 24px 24px 0 0; max-height: 92dvh; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .toast { bottom: 104px; }
}


/* =====================================================================
   Thème « Liquid Glass » : typographie système Apple, verre translucide
   ===================================================================== */
:root {
  --bg: #05060a; --ink: #f5f5f7; --mut: rgba(235,235,245,.6); --dim: rgba(235,235,245,.32);
  --glass: rgba(255,255,255,.07); --glass2: rgba(255,255,255,.11); --stroke: rgba(255,255,255,.14); --stroke2: rgba(255,255,255,.22);
  --acc: #0a84ff; --grad: linear-gradient(135deg, #64d2ff 0%, #0a84ff 45%, #bf5af2 100%);
  --blur: blur(40px) saturate(180%); --r: 24px;
}
html, body { font-family: var(--sans); letter-spacing: -.01em; font-feature-settings: normal; }
body::before { inset: -10%; filter: blur(60px); opacity: 1;
  background:
    radial-gradient(38% 42% at 12% 8%, rgba(10,132,255,.55), transparent 70%),
    radial-gradient(34% 38% at 88% 12%, rgba(191,90,242,.45), transparent 70%),
    radial-gradient(40% 45% at 75% 92%, rgba(255,55,95,.30), transparent 70%),
    radial-gradient(36% 40% at 8% 88%, rgba(48,209,88,.28), transparent 70%),
    radial-gradient(30% 30% at 50% 50%, rgba(255,159,10,.12), transparent 70%); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: rgba(5,6,10,.35); }

/* Verre : fond translucide + flou + liseré lumineux + reflet en haut */
.glass, .sheet, .tabbar, .toast, .corner, .dayhead {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04)) !important;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: .5px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.04), 0 30px 80px -30px rgba(0,0,0,.65);
}
.corner, .dayhead { box-shadow: none; border-width: 0 0 .5px; background: rgba(18,20,28,.86) !important; z-index: 20; }

/* Typo : plus de serif, titres SF bold serrés */
.brand, .greet, .nav h2, .t-serif, .sheet h3, .chat-head b, legend, .empty p, .login h1, .dayhead b, .dn-n { font-family: var(--sans) !important; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.greet { font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.nav h2 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.nav h2 .t-mut { font-weight: 500; letter-spacing: -.01em; }
.sheet h3 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; }
.chat-head b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
legend { font-size: 15px; font-weight: 600; }
.empty p { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.login h1 { font-weight: 700; letter-spacing: -.035em; }
.side h4 { font-size: 11px; letter-spacing: .06em; color: var(--dim); }
.logo { border-radius: 9px; background: var(--grad); box-shadow: 0 4px 16px rgba(10,132,255,.45); }
.logo::after { inset: 8px; background: rgba(255,255,255,.95); border-radius: 3px; }

/* Boutons façon iOS : pilules en verre */
button { border-radius: 999px; border: .5px solid var(--stroke); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-weight: 500; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
button:hover { background: rgba(255,255,255,.14); }
button.primary { background: var(--acc); color: #fff; border-color: transparent; box-shadow: 0 6px 20px -6px rgba(10,132,255,.8), inset 0 1px 0 rgba(255,255,255,.3); }
button.primary:hover { background: #2b95ff; box-shadow: 0 8px 26px -6px rgba(10,132,255,.9), inset 0 1px 0 rgba(255,255,255,.3); }
button.ghost { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
button.icon { border-radius: 50%; }
.chip-ai { background: rgba(255,255,255,.08) padding-box !important; border: .5px solid var(--stroke) !important; }
.chip-ai svg { color: #bf5af2; }
.chip-ai.on { background: rgba(191,90,242,.22) padding-box !important; border-color: rgba(191,90,242,.5) !important; }
input, select, textarea { border-radius: 12px; background: rgba(255,255,255,.06); border: .5px solid var(--stroke); }
input:focus, select:focus, textarea:focus { border-color: rgba(10,132,255,.8); box-shadow: 0 0 0 4px rgba(10,132,255,.22); }

/* Bandeaux */
.banner { border-radius: 16px; background: rgba(10,132,255,.14); border: .5px solid rgba(10,132,255,.35); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.banner.warn { background: rgba(255,159,10,.14); border-color: rgba(255,159,10,.35); }
.banner.soft { background: rgba(255,255,255,.04); border: .5px dashed var(--stroke2); }

/* Calendrier */
.calwrap { border-radius: var(--r); }
.dayhead span { letter-spacing: .04em; font-weight: 600; font-size: 11px; }
.dayhead b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.dayhead.today b { background: #ff453a; color: #fff; box-shadow: 0 4px 14px rgba(255,69,58,.5); }
.col { border-left: .5px solid rgba(255,255,255,.08); }
.line { border-top: .5px solid rgba(255,255,255,.07); }
.col.is-today { background: rgba(255,255,255,.035); }
.now { height: 1.5px; background: #ff453a; box-shadow: none; }
.now::before { background: #ff453a; box-shadow: none; width: 9px; height: 9px; top: -4px; left: -1px; }

/* Blocs : verre teinté, liseré coloré à gauche, très lisible */
.block { border-radius: 11px; padding: 5px 9px 4px 12px; border: .5px solid color-mix(in srgb, var(--c) 55%, rgba(255,255,255,.2));
  background: color-mix(in srgb, var(--c) 30%, rgba(30,32,42,.55));
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 18px -10px color-mix(in srgb, var(--c) 70%, transparent); }
.block::before { top: 4px; bottom: 4px; left: 3px; width: 3px; border-radius: 3px; box-shadow: none; }
.block:hover { filter: brightness(1.12); }
.block .bt { font-weight: 600; font-size: 12.5px; letter-spacing: -.01em; }
.block .bm { color: rgba(255,255,255,.72); font-size: 11px; }
.block.cours { background: color-mix(in srgb, var(--c) 38%, rgba(30,32,42,.55)); }
.block.copine { background: color-mix(in srgb, #ff375f 34%, rgba(30,32,42,.55)); }
.block.sommeil { background: rgba(255,255,255,.03); border: .5px solid rgba(255,255,255,.06); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.block.transport { background: rgba(255,255,255,.05); border: .5px dashed rgba(255,255,255,.2); box-shadow: none; }
.kind { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; padding: 1px 5px; margin-right: 5px; border-radius: 5px; background: rgba(255,255,255,.18); vertical-align: 1px; text-transform: uppercase; }
.block.tiny .kind, .block.micro .kind { display: none; }

/* Panneau latéral */
.nowcard { border-radius: 18px; border: .5px solid color-mix(in srgb, var(--c, #0a84ff) 50%, rgba(255,255,255,.2));
  background: linear-gradient(160deg, color-mix(in srgb, var(--c, #0a84ff) 35%, rgba(255,255,255,.06)), rgba(255,255,255,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.nowcard::after { opacity: .35; }
.agenda li { border-radius: 10px; }
.gbar { height: 6px; background: rgba(255,255,255,.1); }

/* Assistante */
.orb { background: conic-gradient(from 0deg, #64d2ff, #0a84ff, #bf5af2, #ff375f, #ff9f0a, #64d2ff); box-shadow: 0 0 22px rgba(10,132,255,.5), inset 0 0 10px rgba(255,255,255,.55); }
.msg { border-radius: 20px; font-size: 14.5px; }
.msg.user { background: var(--acc); color: #fff; }
.msg.assistant { background: rgba(255,255,255,.10); border: .5px solid var(--stroke); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.composer { border-radius: 26px; background: rgba(255,255,255,.07); border: .5px solid var(--stroke2); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.composer:focus-within { border-color: rgba(10,132,255,.7); box-shadow: 0 0 0 4px rgba(10,132,255,.18); }
.sendbtn { background: var(--acc); color: #fff; }
.pill { background: rgba(255,255,255,.08); }

/* Modales, segments */
.overlay { background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet { border-radius: 28px; background: linear-gradient(180deg, rgba(40,42,54,.72), rgba(28,30,40,.72)) !important; }
.btns.sticky { background: linear-gradient(transparent, rgba(28,30,40,.95) 35%); }
.seg { border-radius: 12px; background: rgba(118,118,128,.24); border: 0; padding: 2px; }
.seg span { border-radius: 10px; font-weight: 500; }
.seg input:checked + span { background: rgba(255,255,255,.22); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.step span { background: var(--acc); color: #fff; }
fieldset { border-radius: 18px; border: .5px solid var(--stroke); background: rgba(255,255,255,.04); }
.list li { border-radius: 14px; background: rgba(255,55,95,.16); border: .5px solid rgba(255,55,95,.35); }

/* Barre d'onglets mobile */
.tabbar { border-radius: 30px; }
.tabbar .micbig { background: var(--acc); color: #fff; box-shadow: 0 10px 28px -6px rgba(10,132,255,.8), 0 0 0 5px rgba(5,6,10,.6); border: 0; }
.tabbar .micbig:hover { background: #2b95ff; }
.tabbar button { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.tabbar button.on { color: var(--acc); }
@media (max-width: 860px) { .chat { background: rgba(10,11,16,.72) !important; -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); } }

.side > * { flex-shrink: 0; }

.block.routine { background: color-mix(in srgb, var(--c) 22%, rgba(30,32,42,.55)); }


/* =====================================================================
   Thème « Solide » : aucun flou ni transparence (performances)
   ===================================================================== */
:root { --bg: #000; --s1: #1c1c1e; --s2: #2c2c2e; --s3: #3a3a3c; --stroke: #38383a; --stroke2: #48484a; }
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body::before, body::after { display: none !important; animation: none !important; }
html, body { background: var(--bg); }
.glass, .sheet, .tabbar, .toast { background: var(--s1) !important; border: 1px solid var(--stroke); box-shadow: none; }
.corner, .dayhead { background: var(--s1) !important; border: 0; border-bottom: 1px solid var(--stroke); box-shadow: none; }
.calwrap { background: var(--s1) !important; }
.col.is-today { background: #222225; }
.line { border-top: 1px solid #2a2a2c; }
.col { border-left: 1px solid #2a2a2c; }
button { background: var(--s2); border: 1px solid var(--stroke); box-shadow: none; }
button:hover { background: var(--s3); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--s2); }
button.primary { background: var(--acc); border-color: var(--acc); box-shadow: none; }
button.primary:hover { background: #2b95ff; box-shadow: none; }
.chip-ai, .chip-ai.on { background: var(--s2) !important; border: 1px solid var(--stroke) !important; }
input, select, textarea { background: #000; border: 1px solid var(--stroke); }
.banner { background: #0a2540; border: 1px solid #12406b; }
.banner.warn { background: #3a2a0a; border-color: #6b4a12; }
.banner.soft { background: transparent; border: 1px dashed var(--stroke2); }
.overlay { background: rgba(0,0,0,.6); }
.sheet { background: var(--s1) !important; }
.btns.sticky { background: var(--s1); }
fieldset { background: #232325; border: 1px solid var(--stroke); }
.seg { background: #000; }
.seg input:checked + span { background: var(--s3); box-shadow: none; }
.msg.assistant { background: var(--s2); border: 1px solid var(--stroke); }
.composer { background: #000; border: 1px solid var(--stroke2); }
.nowcard { background: color-mix(in srgb, var(--c, #0a84ff) 28%, var(--s2)); border: 1px solid color-mix(in srgb, var(--c, #0a84ff) 50%, var(--s2)); box-shadow: none; }
.nowcard::after { display: none; }
.orb { animation: none; box-shadow: none; }
.orb.busy { animation: spin 1.2s linear infinite; }
.logo { box-shadow: none; }
.dayhead.today b { box-shadow: none; }
/* Blocs : couleurs pleines, pas d'ombre ni de flou */
.block { background: color-mix(in srgb, var(--c) 32%, #1c1c1e); border: 1px solid color-mix(in srgb, var(--c) 55%, #1c1c1e); box-shadow: none; transition: none; filter: none; }
.block:hover { filter: none; background: color-mix(in srgb, var(--c) 42%, #1c1c1e); box-shadow: none; }
.block.cours { background: color-mix(in srgb, var(--c) 40%, #1c1c1e); }
.block.copine { background: color-mix(in srgb, #ff375f 34%, #1c1c1e); }
.block.routine { background: color-mix(in srgb, var(--c) 24%, #1c1c1e); }
.block.libre { background: #1f2a28; border-color: #2d4a45; }
.block.sommeil { background: #141416; border: 1px solid #222224; }
.block.transport { background: #232325; border: 1px dashed #48484a; }
.block.past { opacity: .5; filter: none; }
.block.dragging { box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.block::before { box-shadow: none; }
.gbar div { transition: none; }
.msg, .sheet, .overlay, .toast, .shell.with-chat .chat { animation: none !important; }
@media (max-width: 860px) { .chat { background: #000 !important; } .tabbar { background: var(--s1) !important; } .tabbar .micbig { box-shadow: 0 0 0 5px #000; } }

.tasks { display: grid; gap: 6px; margin: 4px 0 8px 18px; padding-left: 10px; border-left: 2px solid var(--stroke); }
.task input[type=time] { width: 96px; }
button.sm-btn { padding: 4px 10px; font-size: 12px; justify-self: start; }

.pplan { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.pday { display: grid; gap: 4px; font-size: 12.5px; }
.seg.mini span { padding: 5px 2px; font-size: 11.5px; }
.wins { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.win { display: inline-flex; gap: 3px; align-items: center; }
details summary { cursor: pointer; margin: 6px 0; }

.pcustom { display: flex; gap: 4px; align-items: center; } .pcustom input { width: 90px; padding: 5px 6px; }
.pday select { width: 100%; }
