/* Quiz Anatman — moteur maison façon Typeform, thème Classic Blue */
:root {
  --q-color: #000000;
  --a-color: #0445AF;
  --a-bg: rgba(4, 69, 175, 0.1);
  --a-bg-hover: rgba(4, 69, 175, 0.18);
  --a-bg-selected: rgba(4, 69, 175, 0.28);
  --btn-bg: #0445AF;
  --btn-fg: #FFFFFF;
  --bg: #FFFFFF;
  --err: #af0404;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--q-color);
  -webkit-font-smoothing: antialiased;
}
#progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: var(--btn-bg); transition: width .4s ease; z-index: 50;
}
#app {
  min-height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 20px 110px;
}
.screen {
  width: 100%; max-width: 720px;
  animation: slideIn .35s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.q-number { color: var(--a-color); font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.q-number svg { width: 14px; height: 14px; }
.q-title { font-size: 24px; font-weight: 400; line-height: 1.35; white-space: pre-line; }
.q-title strong { font-weight: 700; }
.q-desc { font-size: 18px; color: #555; margin-top: 10px; line-height: 1.4; white-space: pre-line; }
.q-req { color: var(--err); }
.q-media { margin: 18px 0 0; }
.q-media img { max-width: 100%; max-height: 320px; border-radius: 6px; }
.q-body { margin-top: 26px; }

/* Texte / email / téléphone / date */
input[type=text], input[type=email], input[type=tel], input[type=date], textarea, select {
  width: 100%;
  font-size: 26px; font-family: inherit;
  color: var(--a-color);
  background: transparent;
  border: none; border-bottom: 2px solid var(--a-bg-selected);
  padding: 8px 0; outline: none;
  transition: border-color .2s;
}
input::placeholder, textarea::placeholder { color: rgba(4,69,175,.35); }
input:focus, textarea:focus, select:focus { border-bottom-color: var(--a-color); }
textarea { resize: none; min-height: 40px; max-height: 40vh; overflow-y: auto; }
.hint { font-size: 13px; color: #777; margin-top: 10px; }
.hint kbd { font-weight: 700; }

/* Choix */
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; max-width: 460px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--a-color);
  background: var(--a-bg);
  color: var(--a-color);
  border-radius: 4px; padding: 10px 14px;
  font-size: 19px; cursor: pointer; text-align: left;
  transition: background .15s, box-shadow .15s;
  min-height: 44px;
}
.choice:hover { background: var(--a-bg-hover); }
.choice.selected { background: var(--a-bg-selected); box-shadow: 0 0 0 1px var(--a-color) inset; font-weight: 600; }
.choice .key {
  flex: 0 0 auto; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--a-color); border-radius: 3px;
  background: #fff; font-size: 12px; font-weight: 700;
}
.choice input.other-input { font-size: 19px; border-bottom: 1px solid var(--a-color); padding: 2px 0; }

/* Échelle d'opinion */
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale button {
  flex: 1 0 44px; min-width: 44px; height: 54px;
  border: 1px solid var(--a-color); border-radius: 4px;
  background: var(--a-bg); color: var(--a-color);
  font-size: 19px; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.scale button:hover { background: var(--a-bg-hover); }
.scale button.selected { background: var(--btn-bg); color: #fff; }
.scale-labels { display: flex; justify-content: space-between; font-size: 13px; color: #777; margin-top: 8px; }

/* Étoiles */
.stars { display: flex; gap: 10px; }
.stars .star { cursor: pointer; width: 44px; height: 44px; color: var(--a-bg-selected); transition: transform .1s, color .1s; }
.stars .star:hover { transform: scale(1.15); }
.stars .star.lit { color: var(--a-color); }
.stars .star svg { width: 100%; height: 100%; fill: currentColor; }

/* Oui / Non */
.yesno { display: flex; gap: 10px; max-width: 300px; }
.yesno .choice { flex: 1; justify-content: flex-start; }

/* Groupes (contact_info / inline_group) */
.subfields { display: flex; flex-direction: column; gap: 26px; }
.subfield label { display: block; font-size: 16px; color: #444; margin-bottom: 4px; }
.subfield .yesno { margin-top: 6px; }
.subfield .yesno .choice { font-size: 16px; padding: 7px 12px; min-height: 36px; }

/* Boutons */
.actions { margin-top: 30px; display: flex; align-items: center; gap: 14px; }
button.ok, a.ok {
  text-decoration: none;
}
button.ok, a.ok {
  background: var(--btn-bg); color: var(--btn-fg);
  border: none; border-radius: 4px;
  font-size: 20px; font-weight: 700; font-family: inherit;
  padding: 10px 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: opacity .15s, transform .05s;
}
button.ok:hover { opacity: .9; }
button.ok:active { transform: scale(.98); }
button.ok:disabled { opacity: .4; cursor: default; }
.enter-hint { font-size: 13px; color: #777; }
.err-msg {
  display: none; margin-top: 14px;
  background: #fde8e8; color: var(--err);
  font-size: 15px; padding: 8px 12px; border-radius: 4px; width: fit-content;
}
.err-msg.show { display: block; }

/* Écrans bienvenue / merci */
.center { text-align: center; }
.center .q-media { display: flex; justify-content: center; }
.center .actions { justify-content: center; }
.thankyou .q-title { font-size: 26px; }
.sent-note { margin-top: 26px; font-size: 14px; color: #2e7d32; }
.sent-note.err { color: var(--err); }

/* Navigation bas droite */
#navbar {
  position: fixed; right: 18px; bottom: 18px;
  display: flex; gap: 2px; z-index: 40;
}
#navbar button {
  background: var(--btn-bg); color: #fff; border: none;
  width: 40px; height: 36px; cursor: pointer; font-size: 18px;
}
#navbar button:first-child { border-radius: 4px 0 0 4px; }
#navbar button:last-child { border-radius: 0 4px 4px 0; }
#navbar button:disabled { opacity: .4; cursor: default; }
#brand {
  position: fixed; left: 18px; bottom: 18px; z-index: 40;
  font-size: 13px; color: #999; text-decoration: none;
}
#brand:hover { color: var(--a-color); }

@media (max-width: 600px) {
  .q-title { font-size: 20px; }
  .q-desc { font-size: 16px; }
  input[type=text], input[type=email], input[type=tel], input[type=date], textarea { font-size: 20px; }
  .choice { font-size: 17px; }
  #app { padding-bottom: 90px; }
}
