/* Questionnaire du stand, pensé pour un iPad tenu à la main ou posé sur un pied.
   Palette fermée du design system TMB (mêmes tokens que le showcase), Modak réservé à la marque. */
:root {
  --petrol: #264C6E;
  --petrol-dark: #1A3550;
  --ivory: #FDF8EF;
  --coral: #F27B70;
  --sage: #A3C9A8;
  --sage-light: #E8F2EA;
  --sage-deep: #3D6B47;
  --yellow: #FFD882;
  --yellow-light: #FFF4D6;
  --fg1: #1F2937;
  --fg2: #4B5563;
  --line: #E3DED3;

  --f-brand: 'Modak', 'Nunito Sans', system-ui, sans-serif;
  --f-head: 'Nunito Sans', system-ui, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --tap: 72px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ivory); }
body {
  font-family: var(--f-body); color: var(--fg1); font-size: 21px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: none;
}

main {
  position: fixed; inset: 0; overflow-y: auto;
  padding: max(56px, env(safe-area-inset-top)) 32px max(32px, env(safe-area-inset-bottom));
}
.screen { max-width: 760px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; animation: enter .45s var(--ease-out); }
.screen.center { justify-content: center; align-items: center; text-align: center; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

.brand { margin: 0; font: 400 96px/1 var(--f-brand); color: var(--petrol); }
.brand.small { font-size: 44px; }
.hello { margin: 0 0 18px; font: 800 26px var(--f-head); color: var(--fg2); }
h1 { margin: 0; font: 800 clamp(30px, 4.4vw, 42px)/1.15 var(--f-head); color: var(--petrol); text-wrap: balance; }
.lead { margin: 0; color: var(--fg2); }
.notice {
  margin: 0; padding: 18px 22px; border-radius: var(--radius); background: var(--yellow-light);
  border-left: 6px solid var(--yellow); color: var(--fg1);
}
.q-head { display: grid; gap: 10px; }
.q-count { margin: 0; font: 800 16px var(--f-head); letter-spacing: .08em; color: var(--coral); }
.hint { margin: 0; font-size: 17px; color: var(--fg2); }

.progress { position: fixed; z-index: 2; top: 0; left: 0; right: 0; height: 8px; background: var(--sage-light); }
.progress::after {
  content: ''; position: absolute; inset: 0; background: var(--sage-deep);
  transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .5s var(--ease-out);
}

/* Options : grosses tuiles tactiles */
.options { display: grid; gap: 12px; }
.options.multi { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.opt {
  min-height: var(--tap); padding: 16px 22px; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--fg1); font: 600 21px var(--f-body); text-align: left; cursor: pointer;
  transition: transform .15s var(--ease-out), background-color .2s, border-color .2s;
}
.opt:active { transform: scale(.98); }
.opt[aria-pressed="true"] { background: var(--sage-light); border-color: var(--sage-deep); color: var(--sage-deep); box-shadow: inset 0 0 0 1px var(--sage-deep); }
.options.multi .opt[aria-pressed="true"]::before { content: '✓  '; font-weight: 700; }

.langs { display: grid; gap: 14px; width: min(420px, 100%); }
.opt.lang { text-align: center; font: 800 26px var(--f-head); color: var(--petrol); min-height: 84px; }

.scale { display: grid; gap: 12px; }
.scale-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.opt.dot { text-align: center; font: 800 30px var(--f-head); min-height: 96px; color: var(--petrol); }
.scale-ends { display: flex; justify-content: space-between; font-size: 17px; color: var(--fg2); }

.text {
  width: 100%; padding: 18px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff;
  font: 400 21px var(--f-body); color: var(--fg1); -webkit-user-select: text; user-select: text; resize: none;
}
.text:focus { outline: none; border-color: var(--petrol); }
.consent { display: flex; gap: 16px; align-items: flex-start; font-size: 17px; color: var(--fg2); -webkit-user-select: none; }
.consent input {
  flex: none; width: 36px; height: 36px; margin: 0; -webkit-appearance: none; appearance: none;
  border: 2px solid var(--sage-deep); border-radius: 9px; background: #fff center / 24px no-repeat;
}
.consent input:checked {
  background-color: var(--sage-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDF8EF' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.error { min-height: 1.4em; margin: 0; color: #B4372D; font-weight: 600; }

.nav { display: flex; gap: 12px; margin-top: auto; padding-top: 16px; }
.btn {
  min-height: 64px; padding: 0 28px; border: 0; border-radius: 14px; font: 700 20px var(--f-body); cursor: pointer;
  transition: transform .15s var(--ease-out), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; }
.btn.primary { margin-left: auto; background: var(--petrol); color: var(--ivory); }
.btn.ghost { background: transparent; color: var(--petrol); border: 2px solid var(--line); }
.btn.danger { background: #fff; color: #B4372D; border: 2px solid #B4372D; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* Espace équipe */
.hotspot { position: fixed; z-index: 3; top: 0; left: 0; width: 88px; height: 88px; opacity: 0; border: 0; background: none; }
.admin { border: 0; border-radius: 22px; padding: 32px; width: min(560px, 92vw); color: var(--fg1); font-family: var(--f-body); }
.admin::backdrop { background: rgba(26, 53, 80, .5); }
.admin h2 { margin: 0 0 8px; font: 800 28px var(--f-head); color: var(--petrol); }
.persist { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--sage-light); color: var(--sage-deep); font-weight: 600; }
.persist.warn { background: #FBE3E0; color: #B4372D; }
.admin-actions { display: grid; gap: 10px; margin-top: 20px; }
.admin-actions .btn.primary { margin-left: 0; }
.storage-error { position: fixed; z-index: 4; left: 16px; right: 16px; bottom: 16px; padding: 16px 20px; border-radius: 14px; background: #B4372D; color: #fff; font-weight: 600; }

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