/* ===============================================================
   bq.css — Blind & Quiz, styles communs aux 4 pages
   Palette et polices reprises de dickangular.fr
   =============================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #000;
  --paper: #fdfbf3;
  --red: #e63946;
  --red-deep: #c2293a;
  --blue: #0a7ad9;
  --blue-deep: #0560ad;
  --yellow: #ffd60a;
  --grey: #8a8a8a;
  --line: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --display: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --text: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--text);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}

.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.5px; line-height: 1; }

/* Trames Ben-Day */
.dots   { background-image: radial-gradient(rgba(0,0,0,.14) 1.5px, transparent 1.8px); background-size: 11px 11px; }
.dots-w { background-image: radial-gradient(rgba(255,255,255,.22) 1.5px, transparent 1.8px); background-size: 11px 11px; }

.bg-yellow { background-color: var(--yellow); }
.bg-red    { background-color: var(--red); }
.bg-blue   { background-color: var(--blue); }
.bg-ink    { background-color: var(--ink); }
/* Le texte reste noir par défaut : les cartes blanches posées sur un fond de couleur
   doivent rester lisibles. Le blanc se met explicitement (.blanc, titres). */
.bg-paper  { background-color: var(--paper); }

/* Cartes et boutons */
.card {
  background: #fff;
  border: var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 20px;
  font-family: var(--display); font-size: 20px; letter-spacing: 0.5px; line-height: 1.1;
  color: var(--ink); background: #fff;
  border: var(--line); box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; text-decoration: none; text-align: center;
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.btn-red    { background: var(--red); color: #fff; }
.btn-blue   { background: var(--blue); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-ink    { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--grey); }
.btn-big    { min-height: 74px; font-size: 28px; }
.btn-small  { min-height: 44px; font-size: 15px; padding: 6px 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn-block  { display: flex; width: 100%; }

.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px;
}

/* Champs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 800; font-size: 15px; }
.field input, .field select {
  height: 54px; width: 100%;
  border: 3px solid var(--ink); background: #fff;
  padding: 0 14px; font-size: 18px; font-family: var(--text); color: var(--ink);
  border-radius: 0; -webkit-appearance: none; appearance: none;
}
.hint { font-size: 13px; color: #444; }

/* Choix à deux boutons */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seg .btn { font-size: 18px; box-shadow: none; }
.seg .btn[aria-pressed="true"] { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 4px 12px;
  background: #fff; border: 2px solid var(--ink);
  font-weight: 800; font-size: 15px; color: var(--ink); font-family: var(--text);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--yellow); }
.chip[aria-pressed="false"] { color: #555; text-decoration: line-through; }

.pill {
  display: inline-block; padding: 4px 12px;
  border: 3px solid var(--ink); background: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
}

.error {
  background: var(--red); color: #fff; border: 3px solid var(--ink);
  padding: 10px 14px; font-weight: 700;
}
.error:empty { display: none; }

.sign { font-size: 13px; text-align: center; color: #333; }
.sign a { color: inherit; font-weight: 800; }

.hidden { display: none !important; }

/* QR code en grand sur le téléphone */
.qr-voile { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; overflow: auto; }
.qr-voile .qr-titre { font-family: var(--display); font-size: clamp(28px, 7vw, 54px); line-height: 1; }
.qr-voile .qr-img { width: min(80vw, 62vh, 540px); }
.qr-voile .qr-url { font-weight: 800; font-size: 16px; word-break: break-all; }
.qr-voile .qr-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.qr svg, .qr-img svg, .imp-qr svg { display: block; width: 100%; height: auto; }

/* Affichette : invisible à l'écran, seule chose imprimée */
#impression { display: none; }
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: #fff !important; }
  body > *:not(#impression) { display: none !important; }
  #impression { display: flex !important; flex-direction: column; align-items: center; gap: 6mm; text-align: center; color: #000; border: 1.2mm solid #000; padding: 10mm; }
  .imp-titre { font-family: var(--display); font-size: 40pt; line-height: 1; }
  .imp-sous { font-weight: 800; font-size: 18pt; }
  .imp-appel { font-weight: 800; font-size: 16pt; }
  .imp-qr { width: 125mm; }
  .imp-url { font-weight: 800; font-size: 13pt; word-break: break-all; }
  .imp-sign { font-size: 10pt; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
