/* L’Assemblée Lucide – Mouton Lucide */
:root{
  --deep:#46066D;
  --purple:#B02CCC;
  --magenta:#CC44DD;
  --lavender:#EA92F9;
  --yellow:#FCF201;
  --cream:#FCFBD3;
  --ink:#1A0A22;
  --black:#050305;
  --g:var(--deep);
  --g2:var(--purple);
  --l:#F3E2FA;
  --s:#F8EEFC;
  --t:var(--ink);
  --muted:#6B4F7A;
  --line:rgba(70,6,109,.14);
  --shadow:0 2px 10px rgba(70,6,109,.10);
  --danger:#9b2c2c;
  --card:#fff;
  --exemple:#1A0A22;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:var(--t);
  background:var(--s);
  line-height:1.55;
  min-height:100%;
}
button,select,textarea,input{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--g)}
img{max-width:100%}

.wrap{max-width:920px;margin:0 auto;padding:0 16px}
body.page{display:flex;flex-direction:column;min-height:100vh}

header.top{
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;background:#fff;border-bottom:1px solid var(--line);
}
header.top img.logo{width:48px;height:48px;border-radius:10px;object-fit:cover;background:var(--deep)}
header.top .brand{flex:1;min-width:0}
header.top h1{font-size:1.05rem;color:var(--g);font-weight:800;line-height:1.2}
header.top .sub{font-size:.78rem;color:var(--g2);font-weight:600}
nav.main{display:flex;gap:6px;flex-wrap:wrap}
nav.main a{
  font-size:.82rem;font-weight:700;color:var(--g);
  text-decoration:none;padding:6px 10px;border-radius:999px;
  border:1px solid transparent;
}
nav.main a:hover,nav.main a[aria-current="page"]{background:var(--l);border-color:var(--line)}

main{flex:1}
.hero{padding:36px 0 12px}
.hero h2{font-size:1.7rem;color:var(--g);line-height:1.25;margin-bottom:10px}
.hero p.lead{font-size:1.05rem;color:var(--muted);max-width:640px}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0 8px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--g);color:#fff;border:0;border-radius:12px;
  padding:12px 18px;font-weight:700;text-decoration:none;box-shadow:var(--shadow);
}
.btn:hover{background:var(--g2);color:#fff}
.btn.ghost{background:#fff;color:var(--g);border:1px solid var(--line)}
.btn.ghost:hover{background:var(--l)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.btn.soon{position:relative}

.card{
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:20px 22px;box-shadow:var(--shadow);margin:16px 0;
}
.card h3{color:var(--g);font-size:1.05rem;margin-bottom:8px}
.muted{color:var(--muted)}
.small{font-size:.88rem}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0 8px}
.step{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:var(--shadow)}
.step b{display:block;color:var(--g);margin-bottom:4px}
.badge{
  display:inline-block;font-size:.72rem;font-weight:800;letter-spacing:.02em;
  text-transform:uppercase;padding:2px 8px;border-radius:999px;
  background:var(--yellow);color:var(--ink);
}
.badge.theme{background:var(--l);color:var(--g);text-transform:none;letter-spacing:0;font-size:.78rem}
.perks{display:flex;flex-direction:column;gap:6px;margin:10px 0;padding:0;list-style:none}
.perks li::before{content:"✓ ";color:var(--g2);font-weight:800}

/* Form */
form.besoin label{display:block;font-weight:700;color:var(--g);margin:14px 0 6px;font-size:.92rem}
form.besoin input,form.besoin select,form.besoin textarea{
  width:100%;background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:10px 12px;outline:none;
}
form.besoin textarea{resize:vertical;min-height:128px}
form.besoin input:focus,form.besoin select:focus,form.besoin textarea:focus{border-color:var(--g2)}
.counter{float:right;font-weight:600;color:var(--muted);font-size:.8rem}
.counter.warn{color:var(--danger)}
.form-msg{margin:12px 0 0;font-weight:600}
.form-msg.ok{color:var(--g)}
.form-msg.err{color:var(--danger)}
.hint{font-size:.82rem;color:var(--muted);font-weight:500;margin-top:4px}

/* Besoin list */
.filters{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
.filters select{background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.besoin-list{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}
.besoin-card{
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:14px 16px;box-shadow:var(--shadow);
}
.besoin-card .meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:6px}
.besoin-card p{overflow-wrap:anywhere}
.besoin-card .who{font-size:.8rem;color:var(--muted);margin-top:6px}
.vote{
  display:flex;flex-direction:column;align-items:center;gap:4px;min-width:72px;
}
.vote button{
  background:var(--l);color:var(--g);border:1px solid var(--line);
  border-radius:12px;padding:8px 10px;font-weight:800;min-width:64px;
}
.vote button:hover{border-color:var(--g2);background:#e4efe3}
.vote button[disabled]{opacity:.7;cursor:default}
.vote button.done{background:var(--g);color:#fff;border-color:var(--g)}
.vote .n{font-size:.78rem;color:var(--muted);font-weight:700}

/* Chat shell */
body.chat-page,#app{
  height:100%;
}
html,body.chat-page{height:100%}
body.chat-page{overflow:hidden}
#app{
  display:flex;flex-direction:column;max-width:920px;margin:0 auto;background:var(--s);height:100%;
}
#thread{
  flex:1;overflow-y:auto;padding:20px 16px 8px;
  display:flex;flex-direction:column;gap:14px;
}
#thread:has(.empty){justify-content:center}
.empty{margin:0 auto;text-align:center;color:var(--muted);max-width:420px;padding:16px 8px}
.empty b{display:block;color:var(--g);font-size:1.1rem;margin-bottom:6px}
.empty p{margin:0 0 16px}
.examples{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:560px;margin:0 auto}
.example{
  background:#fff;border:1px solid var(--line);color:var(--g);
  border-radius:20px;padding:8px 14px;font-weight:600;font-size:.88rem;
  text-align:left;box-shadow:var(--shadow);max-width:100%;
}
.example:hover{background:var(--l);border-color:var(--g2)}
.msg{
  max-width:min(760px,92%);padding:12px 16px;border-radius:16px;
  box-shadow:var(--shadow);overflow-wrap:anywhere;
}
.msg.user{align-self:flex-end;background:var(--g);color:#fff;border-bottom-right-radius:6px;white-space:pre-wrap}
.msg.assistant{align-self:flex-start;background:#fff;border-bottom-left-radius:6px}
.msg.assistant.pending{color:var(--muted);font-style:italic}
.msg .md > *:first-child{margin-top:0}
.msg .md > *:last-child{margin-bottom:0}
.msg .md p,.msg .md ul,.msg .md ol,.msg .md pre,.msg .md blockquote{margin:0.5em 0}
.msg .md ul,.msg .md ol{padding-left:1.3em}
.msg .md code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em;
  background:var(--l);padding:.1em .35em;border-radius:4px;
}
.msg .md a{color:var(--g);font-weight:600}
.msg .md h1,.msg .md h2,.msg .md h3{color:var(--g);font-size:1.05em;margin:0.7em 0 0.3em}

.composer{flex-shrink:0;padding:10px 16px 6px;background:linear-gradient(180deg,transparent,var(--s) 20%)}
.composer form{
  display:flex;gap:8px;align-items:flex-end;background:#fff;
  border:1px solid var(--line);border-radius:18px;padding:8px 8px 8px 14px;box-shadow:var(--shadow);
}
#input{flex:1;border:0;resize:none;outline:none;background:transparent;min-height:24px;max-height:160px;line-height:1.4;padding:8px 0}
.btn-send{width:42px;height:42px;border:0;border-radius:50%;background:var(--g);color:#fff;display:grid;place-items:center;flex-shrink:0}
.btn-send:hover{background:var(--g2)}
.btn-send[disabled]{opacity:.45;cursor:not-allowed}
.btn-send svg{width:18px;height:18px}
.quota{font-size:.75rem;color:var(--muted);text-align:right;padding:4px 8px 0}

.paywall{
  position:fixed;inset:0;background:rgba(26,16,32,.45);
  display:none;align-items:center;justify-content:center;padding:16px;z-index:20;
}
.paywall.show{display:flex}
.paywall .panel{
  background:#fff;border-radius:18px;max-width:440px;width:100%;padding:24px;
  box-shadow:0 10px 40px rgba(31,77,51,.2);
}
.paywall h3{color:var(--g);margin-bottom:8px}
.paywall .note{font-size:.82rem;color:var(--muted);margin-top:10px}

.synthese-body{white-space:pre-wrap;overflow-wrap:anywhere}
.date-meta{font-size:.8rem;color:var(--muted);margin-top:8px}

@media(max-width:720px){
  .steps{grid-template-columns:1fr}
  header.top{flex-wrap:wrap}
  nav.main{width:100%}
  .hero h2{font-size:1.4rem}
  .hero{padding-top:24px}
}
