@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/polices/BricolageGrotesque.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  --nuit: #111935; --encre: #1a2447; --ardoise: #26325c; --craie: #eef1fb;
  --brume: #8e99c4; --ambre: #ffc24b; --menthe: #4fd1a5; --corail: #ff7070;
  color-scheme: dark;
}
html, body { margin: 0; background: var(--nuit); color: var(--craie); }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
.qz { min-height: 100vh; padding: 16px 14px 48px; padding-top: max(16px, env(safe-area-inset-top)); }
.qz-wrap { max-width: 520px; margin: 0 auto; }
.qz-wrap.large { max-width: 1040px; }
h1, h2, h3 { font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: 30px; } h2 { font-size: 23px; } h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
a { color: var(--ambre); }
.qz-sous { color: var(--brume); font-size: 14px; }
.qz-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.qz-retour { background: none; border: 0; color: var(--brume); font-size: 15px; padding: 6px 2px; cursor: pointer; font-family: inherit; }
.qz-retour:hover { color: var(--craie); }
.qz-carte { background: var(--encre); border: 1px solid var(--ardoise); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.qz-btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 15px 16px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; background: var(--ambre); color: #241a00; margin-top: 10px; }
.qz-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qz-btn.second { background: var(--ardoise); color: var(--craie); font-weight: 600; }
.qz-btn.discret { background: transparent; color: var(--brume); border: 1px solid var(--ardoise); font-weight: 600; }
.qz-btn.danger { background: transparent; color: var(--corail); border: 1px solid rgba(255, 112, 112, 0.4); }
.qz-btn.petit { width: auto; margin-top: 0; padding: 9px 13px; font-size: 14px; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }
input, textarea, select { width: 100%; background: var(--nuit); border: 1px solid var(--ardoise); border-radius: 10px; padding: 12px; color: var(--craie); font-size: 16px; font-family: inherit; margin-top: 6px; }
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 14px; color: var(--brume); margin-top: 14px; }
.qz-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.qz-theme { text-align: left; background: var(--encre); border: 1px solid var(--ardoise); border-radius: 12px; padding: 11px; color: var(--craie); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; }
.qz-theme small { display: block; color: var(--brume); font-weight: 400; font-size: 12px; margin-top: 3px; line-height: 1.3; }
.qz-theme[aria-pressed="true"] { border-color: var(--ambre); background: #22305c; }
.qz-rangee { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qz-etiq { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--ardoise); color: var(--craie); }
.qz-etiq.ok { background: rgba(79, 209, 165, 0.16); color: var(--menthe); }
.qz-etiq.alerte { background: rgba(255, 194, 75, 0.16); color: var(--ambre); }
.qz-etiq.stop { background: rgba(255, 112, 112, 0.16); color: var(--corail); }
.qz-choix { display: flex; gap: 12px; width: 100%; text-align: left; background: var(--encre); border: 2px solid var(--ardoise); border-radius: 14px; padding: 16px 14px; color: var(--craie); font-size: 17px; font-family: inherit; cursor: pointer; margin-bottom: 10px; align-items: center; min-height: 64px; }
.qz-choix:disabled { cursor: default; }
.qz-choix .lettre { flex: 0 0 30px; height: 30px; border-radius: 9px; background: var(--ardoise); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.qz-choix.choisi { border-color: var(--ambre); }
.qz-choix.choisi .lettre { background: var(--ambre); color: #241a00; }
.qz-choix.juste { border-color: var(--menthe); background: rgba(79, 209, 165, 0.12); }
.qz-choix.juste .lettre { background: var(--menthe); color: #03231a; }
.qz-choix.faux { border-color: rgba(255, 112, 112, 0.6); }
.qz-jauge { height: 8px; border-radius: 99px; background: var(--ardoise); overflow: hidden; margin: 12px 0 6px; }
.qz-jauge span { display: block; height: 100%; background: var(--ambre); border-radius: 99px; }
.qz-chrono { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.qz-chrono.urgent { color: var(--ambre); }
.qz-jeton { border: 1px solid var(--ardoise); background: var(--encre); color: var(--craie); border-radius: 11px; padding: 9px 12px; font-size: 15px; font-family: inherit; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.qz-jeton.fait { border-color: var(--menthe); color: var(--menthe); background: rgba(79, 209, 165, 0.1); }
.qz-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--ardoise); }
.qz-ligne:last-child { border-bottom: 0; }
.qz-rang { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 18px; color: var(--brume); min-width: 26px; }
.qz-pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.qz-lecon { font-size: 17px; line-height: 1.65; }
.qz-vide { color: var(--brume); font-size: 15px; padding: 6px 0 2px; }
.qz-note { font-size: 13px; color: var(--brume); line-height: 1.45; margin-top: 8px; }
.qz-erreur { color: var(--corail); font-size: 14px; margin-top: 8px; }
.qz-source { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ardoise); }
.qz-lien { display: block; color: var(--ambre); font-size: 14px; margin-top: 8px; word-break: break-all; text-underline-offset: 3px; }
.qz-coche { display: flex; gap: 10px; align-items: flex-start; color: var(--craie); margin-top: 10px; }
.qz-coche input { width: 22px; height: 22px; flex: 0 0 22px; margin: 2px 0 0; }
.qz-voile { position: fixed; inset: 0; background: rgba(9, 13, 28, 0.94); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.qz-modale { background: var(--encre); border: 1px solid var(--ardoise); border-radius: 16px; padding: 18px; width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; }
.qz-bandeau { position: sticky; top: 0; z-index: 20; background: var(--corail); color: #2a0808; font-weight: 700; font-size: 14px; text-align: center; padding: 8px; border-radius: 10px; margin-bottom: 12px; }
.qz-code { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 44px; font-weight: 800; letter-spacing: 0.12em; }
.qz-qr { background: #fff; border-radius: 14px; padding: 10px; width: 100%; max-width: 260px; }
.qz-qr svg { display: block; width: 100%; height: auto; }
.qz-grille { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .qz-grille { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.qz-grand-enonce { font-size: 21px; font-weight: 600; line-height: 1.35; }
.qz-barre { height: 10px; border-radius: 99px; background: var(--ardoise); overflow: hidden; margin-top: 6px; }
.qz-barre span { display: block; height: 100%; background: var(--menthe); }
.qz-verdict { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 34px; font-weight: 800; }
@media (prefers-reduced-motion: no-preference) {
  .qz-fete { animation: qzpop 0.45s ease-out; }
  @keyframes qzpop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
