:root {
  --fond: #f6f5f1;
  --carte: #ffffff;
  --texte: #1c1f24;
  --doux: #5b6370;
  --ligne: #e2e0d8;
  --accent: #1f3a5f;
  --accent-clair: #e7edf5;
  --ok: #2f6b3a;
  --ok-clair: #e6f1e7;
  --alerte: #8a3b12;
  --alerte-clair: #fbeee4;
  --rayon: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #15181c;
    --carte: #1e2227;
    --texte: #e9eaec;
    --doux: #a3aab4;
    --ligne: #30353c;
    --accent: #8db4e8;
    --accent-clair: #233247;
    --ok: #8fcf98;
    --ok-clair: #1f3324;
    --alerte: #f0a77c;
    --alerte-clair: #3a2619;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.55rem; line-height: 1.25; margin: .2em 0 .5em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1em 0 .3em; }
p { margin: .5em 0; }
.conteneur { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.entete { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .entete { background: #10233d; } }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.entete a { color: #fff; text-decoration: none; }
.marque { font-weight: 700; font-size: 1.1rem; }
.nav { display: flex; gap: 14px; font-size: .95rem; flex-wrap: wrap; }
.nav a { opacity: .9; }
.nav a:hover { opacity: 1; text-decoration: underline; }

main { padding: 18px 0 40px; }
.pied { border-top: 1px solid var(--ligne); color: var(--doux); font-size: .9rem; padding: 18px 0 40px; }
.pied a { color: var(--doux); }

.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; margin: 12px 0; }
.promesse { font-size: 1.25rem; line-height: 1.4; }
.doux { color: var(--doux); }
.petit { font-size: .88rem; }
.centre { text-align: center; }

.bouton, button {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer; text-align: center;
}
@media (prefers-color-scheme: dark) { .bouton, button { color: #10233d; } }
.bouton.large, button.large { display: block; width: 100%; }
.bouton.secondaire, button.secondaire { background: var(--accent-clair); color: var(--accent); }
.bouton.danger, button.danger { background: var(--alerte-clair); color: var(--alerte); }
.bouton.lien, button.lien { background: none; color: var(--accent); padding: 0; font-weight: 400; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=date], input[type=search], select {
  width: 100%; padding: 12px; font: inherit; border: 1px solid var(--ligne); border-radius: 10px;
  background: var(--carte); color: var(--texte);
}
.aide { color: var(--doux); font-size: .88rem; margin: 2px 0; }
.erreur, .errorlist { color: var(--alerte); font-size: .92rem; margin: 4px 0; padding: 0; list-style: none; }
.choix { list-style: none; padding: 0; margin: 0; }
.choix label { font-weight: 400; display: flex; gap: 10px; align-items: center; padding: 12px; margin: 8px 0;
  border: 1px solid var(--ligne); border-radius: 10px; background: var(--carte); cursor: pointer; }
.choix input { width: 20px; height: 20px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin: 10px 0 2px; }

.progression { display: flex; gap: 6px; margin: 4px 0 14px; }
.progression span { flex: 1; height: 6px; border-radius: 3px; background: var(--ligne); }
.progression span.fait { background: var(--accent); }

.messages { list-style: none; padding: 0; margin: 0 0 10px; }
.messages li { padding: 10px 14px; border-radius: 10px; margin: 6px 0; background: var(--accent-clair); }
.messages li.success { background: var(--ok-clair); color: var(--ok); }
.messages li.error { background: var(--alerte-clair); color: var(--alerte); }

.code { font: 700 1.6rem/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; text-align: center;
  padding: 16px; border: 2px dashed var(--accent); border-radius: var(--rayon); background: var(--accent-clair);
  word-break: break-all; user-select: all; }

.frise { list-style: none; padding: 0; margin: 0; position: relative; }
.frise li { position: relative; padding: 0 0 18px 34px; }
.frise li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--ligne); }
.frise li:last-child::before { display: none; }
.frise .point { position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ligne); background: var(--carte); }
.frise li.franchie .point { background: var(--ok); border-color: var(--ok); }
.frise li.franchie::before { background: var(--ok); }
.frise .titre { font-weight: 600; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 6px 0; }

.chiffre { font-size: 1.35rem; font-weight: 700; }
.fourchette { color: var(--doux); }
.rappel { font-size: .88rem; color: var(--doux); border-left: 3px solid var(--ligne); padding-left: 10px; margin: 10px 0; }
.vide { color: var(--doux); font-style: italic; }
.etiquette { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-clair); color: var(--accent); }

.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th, .tableau td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-size: .82rem; color: var(--doux); font-weight: 600; }
.tableau td.nombre, .tableau th.nombre { text-align: right; white-space: nowrap; }
.defile { overflow-x: auto; }

.barre { height: 10px; border-radius: 5px; background: var(--accent-clair); overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--accent); }
.histogramme { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.histogramme span { flex: 1; background: var(--accent); min-height: 1px; border-radius: 2px 2px 0 0; }
