:root {
  --fond: #F4F5F8; --carte: #FFFFFF; --encre: #14171F; --discret: #566070; --texte2: #3C4553;
  --trait: #DDE1E8; --trait-fort: #C9CFDA; --accent: #0F6B4F; --accent-clair: #E3F3EC;
  --ok-fond: #DDF3EA; --ok-texte: #0B5540; --alerte-fond: #FFE4D6; --alerte-texte: #8A3310;
  --rouge: #C4321F; --danger: #A12A1A;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.page { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px 20px 32px; }
h1 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 19px; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent); }
.discret { color: var(--discret); font-size: 14px; }
.petit { font-size: 13px; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pousse { margin-top: auto; }

.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
a.carte { color: inherit; text-decoration: none; }
.une { background: var(--accent); color: #fff; border: none; }
.une .discret { color: #fff; opacity: .9; }
.etiquette { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--alerte-fond); color: var(--alerte-texte); }
.etiquette.ok { background: var(--ok-fond); color: var(--ok-texte); }
.etiquette.neutre { background: #E6E9EF; color: var(--texte2); }

.bouton, button.bouton {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 18px;
  border: none; border-radius: 14px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; width: 100%;
}
.bouton.second { background: var(--carte); color: var(--encre); border: 1.5px solid var(--trait-fort); }
.bouton.danger { background: transparent; color: var(--danger); min-height: 44px; font-size: 16px; }
.bouton.petit-bouton { min-height: 44px; font-size: 15px; width: auto; }
.retour { align-self: flex-start; min-height: 44px; display: flex; align-items: center; color: var(--discret); font-weight: 500; text-decoration: none; }

.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > label, .champ > .titre-champ { font-weight: 600; font-size: 15px; }
input[type=text], input[type=password], input[type=search], input[type=datetime-local], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--trait-fort); border-radius: 12px;
  background: #fff; color: var(--encre); font: inherit;
}
textarea { resize: vertical; }
.erreur, .errorlist { color: var(--danger); font-size: 14px; font-weight: 500; margin: 0; padding: 0; list-style: none; }
.message { padding: 12px 14px; border-radius: 12px; background: var(--ok-fond); color: var(--ok-texte); font-weight: 500; }
.message.error { background: var(--alerte-fond); color: var(--alerte-texte); }

/* Réponses d'un vote : toute la carte est cliquable. */
.choix { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 2px solid var(--trait-fort); border-radius: 14px; background: #fff; font-weight: 500; cursor: pointer; }
.choix input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.choix:has(input:checked) { border-color: var(--accent); background: var(--accent-clair); }
.choix-liste ul, .choix-liste > div { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.choix-liste label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.choix-liste input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Jugement majoritaire : une rangée de mentions par proposition. */
.mentions { display: flex; flex-wrap: wrap; gap: 6px; }
.mentions label { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--trait-fort); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.mentions input { position: absolute; opacity: 0; }
.mentions label:has(input:checked) { border-color: var(--accent); background: var(--accent); color: #fff; }
.mentions label:has(input:focus-visible) { outline: 2px solid var(--encre); outline-offset: 2px; }

.barre { height: 10px; border-radius: 999px; background: #E6E9EF; overflow: hidden; }
.barre > span { display: block; height: 100%; border-radius: 999px; background: #8A93A3; }
.en-tete .barre > span { background: var(--accent); }
.en-tete .intitule { font-weight: 600; }
.empile { display: flex; height: 16px; border-radius: 6px; overflow: hidden; background: #E6E9EF; }
.m6 { background: #0F6B4F; } .m5 { background: #4FA873; } .m4 { background: #A9D49B; } .m3 { background: #E9DD9A; }
.m2 { background: #F2BC6B; } .m1 { background: #E27F45; } .m0 { background: #B4321F; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--discret); }
.legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; background: var(--c); }

.onglets { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--trait); }
.onglets a { position: relative; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--discret); font-size: 13px; font-weight: 600; text-decoration: none; }
.onglets a.actif { color: var(--accent); }
.onglets svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pastille { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rouge); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.point { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rouge); margin-right: 6px; }

.bandeau-orga { background: var(--encre); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bandeau-orga a { color: #fff; font-weight: 600; font-size: 14px; }
.provisoire { font: 700 28px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .08em; text-align: center; padding: 16px; background: var(--accent-clair); border-radius: 12px; }
ul.simple { margin: 0; padding-left: 20px; color: var(--texte2); font-size: 15px; }
