:root {
  --encre: #1c2430;
  --doux: #6b7280;
  --fond: #f6f4f1;
  --carte: #ffffff;
  --trait: #e5e1db;
  --orange: #e8590c;
  --vert: #2f9e44;
  --rouge: #c92a2a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --encre: #f1f3f5;
    --doux: #a6adb6;
    --fond: #16181c;
    --carte: #22252b;
    --trait: #353a42;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--encre); }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.marque { font-weight: 800; color: var(--orange); font-size: 20px; }
.langues { display: flex; gap: 4px; }
.langues button {
  border: 1px solid var(--trait); background: var(--carte); color: var(--encre);
  border-radius: 8px; padding: 4px 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.langues button[aria-pressed="true"] { background: var(--orange); color: #fff; border-color: var(--orange); }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 14px; }
h2 { font-size: 19px; margin: 26px 0 10px; }
.petit { color: var(--doux); font-size: 14px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 6px 14px; margin: 14px 0; }
.ligne { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.ligne:last-child { border-bottom: 0; }
.ligne span { color: var(--doux); }
.ligne strong { text-align: right; overflow-wrap: anywhere; }
.bouton {
  display: block; width: 100%; margin: 16px 0 8px; padding: 15px 18px; border: 0; border-radius: 14px;
  background: var(--orange); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer;
}
.bouton:disabled { opacity: .55; cursor: default; }
.bouton.gris { background: #868e96; }
.lien { background: none; border: 0; color: var(--orange); font-size: 15px; font-weight: 700; padding: 8px 0; cursor: pointer; text-decoration: underline; }
.lien.bloc { display: inline-block; margin-top: 8px; }
.code {
  width: 100%; font-size: 30px; letter-spacing: 10px; text-align: center; padding: 12px;
  border: 2px solid var(--trait); border-radius: 14px; background: var(--carte); color: var(--encre);
}
.champ { display: block; margin: 10px 0; }
.champ span { display: block; font-size: 14px; color: var(--doux); margin-bottom: 4px; }
.champ input, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--trait); border-radius: 12px;
  background: var(--carte); color: var(--encre);
}
.case { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.case input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--orange); }
.pdf { background: #d0d3d8; border-radius: 12px; padding: 8px; max-height: 70vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.pdf canvas { display: block; width: 100%; height: auto; background: #fff; margin: 0 auto 8px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pad-cadre { background: #fff; border: 2px dashed var(--trait); border-radius: 14px; }
#s-pad { display: block; width: 100%; height: 190px; touch-action: none; }
.refus { margin-top: 22px; }
.refus summary { color: var(--doux); cursor: pointer; }
.refus textarea { margin-top: 10px; }
.coche { width: 64px; height: 64px; border-radius: 50%; background: var(--vert); color: #fff; font-size: 38px; display: grid; place-items: center; margin: 20px 0 8px; }
.message { position: sticky; bottom: 12px; background: var(--rouge); color: #fff; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.message.ok { background: var(--vert); }
.pied { margin-top: 36px; font-size: 12.5px; color: var(--doux); }
.roue { width: 36px; height: 36px; margin: 60px auto; border: 4px solid var(--trait); border-top-color: var(--orange); border-radius: 50%; animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
