/* PLUTON / BabelSpace — feuille de style */
:root {
  --fond: #f4f6f8;
  --carte: #ffffff;
  --texte: #1c2733;
  --texte-doux: #5b6b7b;
  --bordure: #dbe2e8;
  --accent: #2563eb;
  --accent-fonce: #1d4ed8;
  --accent-doux: #eff6ff;
  --danger: #dc2626;
  --ok: #16a34a;
  --rayon: 12px;
  --ombre: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --serif: "Georgia", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0f1420;
    --carte: #1a2230;
    --texte: #e6edf5;
    --texte-doux: #93a4b8;
    --bordure: #2c3a4d;
    --accent: #60a5fa;
    --accent-fonce: #3b82f6;
    --accent-doux: #18283f;
    --ombre: 0 1px 3px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 1.5rem 1rem 4rem;
}
.enveloppe {
  max-width: 860px;
  margin: 0 auto;
}
header.tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  margin-bottom: 1.5rem;
}
header.tete .marque {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--texte);
}
header.tete .marque .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
}
header.tete nav a {
  color: var(--texte-doux);
  text-decoration: none;
  margin-left: 1rem;
  font-size: .95rem;
}
header.tete nav a:hover { color: var(--accent); }
main {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.6rem 1.8rem;
}
h1 {
  margin: 0 0 1.1rem;
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.3;
}
h1.titre-fil { font-family: var(--serif); font-size: 1.7rem; }
.retour {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: .92rem;
  margin-bottom: 1.2rem;
}
.retour:hover { text-decoration: underline; }
a { color: var(--accent); }
a:hover { text-decoration: none; }

/* Liste des sujets */
ul.sujets {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.sujets li {
  border-top: 1px solid var(--bordure);
}
ul.sujets li:first-child { border-top: none; }
ul.sujets a {
  display: block;
  padding: .85rem .35rem;
  color: var(--texte);
  text-decoration: none;
  font-size: 1.02rem;
  transition: background .12s ease;
}
ul.sujets a:hover {
  background: var(--accent-doux);
  color: var(--accent-fonce);
  border-radius: 6px;
}

/* Fil threadé */
.fil { display: block; }
article.commentaire {
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: .8rem;
  background: var(--carte);
}
article.commentaire.niv-1 { margin-left: 1.2rem; }
article.commentaire.niv-2 { margin-left: 2.4rem; }
article.commentaire.niv-3 { margin-left: 3.6rem; }
article.commentaire.niv-4 { margin-left: 4.8rem; }
article.commentaire.niv-5,
article.commentaire.niv-6,
article.commentaire.niv-7,
article.commentaire.niv-8,
article.commentaire.niv-9,
article.commentaire.niv-10 { margin-left: 4rem; }
.corps {
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.corps p { margin: 0 0 .7em; }
.corps p:last-child { margin-bottom: 0; }
.corps pre {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: .9rem;
  overflow-x: auto;
  font-size: .9rem;
}
.corps code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.corps blockquote {
  margin: .5em 0;
  padding: .4em 1em;
  border-left: 3px solid var(--accent);
  background: var(--accent-doux);
  border-radius: 0 8px 8px 0;
}
.corps img { max-width: 100%; height: auto; border-radius: 8px; }

details.plie { margin-bottom: .6rem; }
details.plie summary {
  cursor: pointer;
  color: var(--accent);
  font-size: .9rem;
  padding: .2rem 0;
}

/* Formulaires */
form {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
label { font-size: .92rem; color: var(--texte-doux); }
input[type=text],
input[type=email],
input[type=password],
textarea,
select {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  background: var(--carte);
  color: var(--texte);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
textarea { min-height: 120px; resize: vertical; }
button {
  align-self: flex-start;
  padding: .6rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease;
}
button:hover { background: var(--accent-fonce); }

/* Messages utilitaires */
.erreur, .info {
  padding: .8rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: .95rem;
}
.erreur { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.info { background: var(--accent-doux); color: var(--accent-fonce); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

/* Pied de page */
footer.pied {
  text-align: center;
  color: var(--texte-doux);
  font-size: .82rem;
  margin-top: 2rem;
}

/* Accessibilité / réduit */
@media (max-width: 640px) {
  body { padding: .8rem .5rem 3rem; }
  main { padding: 1rem 1.1rem; }
  header.tete { flex-direction: column; align-items: flex-start; }
  article.commentaire.niv-1 { margin-left: .6rem; }
  article.commentaire.niv-2,
  article.commentaire.niv-3,
  article.commentaire.niv-4,
  article.commentaire.niv-5 { margin-left: .9rem; }
  h1 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
