:root {
  --fond: #f4f5f9; --carte: #fff; --texte: #1d2030; --doux: #646a80; --ligne: #e2e4ee;
  --accent: #3b4fd8; --accent-clair: #eceffe; --vert: #1f8a4c; --rouge: #c23b3b; --orange: #b86e00;
  --rayon: 14px; --ombre: 0 1px 2px rgba(20, 25, 60, .06), 0 4px 16px rgba(20, 25, 60, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--ligne); background: var(--carte); border-radius: 10px; padding: .5em .9em; }
button:hover { border-color: #c5c9db; }
button.principal { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.principal:hover { filter: brightness(1.08); }
button.principal:disabled { opacity: .5; cursor: default; }
button.discret { border-color: transparent; background: transparent; color: var(--doux); }
button.discret:hover { background: var(--accent-clair); color: var(--accent); }
button.danger { color: var(--rouge); }
input[type=text], input[type=password], input[type=number], select, textarea {
  border: 1px solid var(--ligne); border-radius: 10px; padding: .55em .75em; background: #fff; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
label { display: block; font-size: .88rem; color: var(--doux); margin: .8em 0 .3em; }
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.3rem 1.4rem; }
.muet { color: var(--doux); font-size: .9rem; }
.erreur { color: var(--rouge); }
.pastille { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15em .6em; border-radius: 99px; background: var(--accent-clair); color: var(--accent); }
.pastille.ok { background: #e3f4ea; color: var(--vert); }
.pastille.non { background: #fbe9e9; color: var(--rouge); }
header.barre { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.2rem; background: var(--carte); border-bottom: 1px solid var(--ligne); position: sticky; top: 0; z-index: 5; }
header.barre h1 { font-size: 1.05rem; margin: 0; flex: 1; }
header.barre .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* contenu des réponses */
.md p { margin: .45em 0; }
.md ul, .md ol { margin: .4em 0; padding-left: 1.4em; }
.md table { border-collapse: collapse; margin: .6em 0; font-size: .95em; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--ligne); padding: .3em .6em; text-align: center; }
.md th { background: #f6f7fb; }
.md code { background: #f1f2f7; border-radius: 5px; padding: .05em .3em; font-size: .9em; }
.md pre { background: #f1f2f7; padding: .7em; border-radius: 8px; overflow-x: auto; }
.md h1, .md h2, .md h3 { font-size: 1.05em; margin: .8em 0 .3em; }
.md .katex-display { margin: .5em 0; overflow-x: auto; overflow-y: hidden; padding: .2em 0; }
.md strong { color: #0f1330; }
