/* Couleurs et polices BRAVA : à ajuster avec la charte graphique. */
:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6b6760;
  --line: #d9d5cd;
  --accent: #ff5b14;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6da;
  --note-bg: #fff6e8;
  --note-line: #f2c27d;
  --danger: #c4321b;
  --radius: 10px;
  --font-title: 'Inter Tight', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Barre du haut ───────────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px 12px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.progress { position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line); }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.brand { font-family: var(--font-title); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.brand span { color: var(--accent); }
.section-label { font-size: 13px; color: var(--muted); text-align: right; max-width: 60%; }

/* ── Scène ──────────────────────────────────── */
.stage {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 96px 24px 120px;
}
.screen { width: 100%; max-width: 720px; }
.screen.enter { animation: enter .45s cubic-bezier(.2,.7,.2,1) both; }
.screen.enter-back { animation: enterBack .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.enter, .screen.enter-back { animation: none; } }

.eyebrow { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.eyebrow .arrow { font-size: 13px; }
h1, h2 { font-family: var(--font-title); font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; }
h2 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.2; }
.req { color: var(--accent); }
.help { color: var(--muted); margin: 0 0 22px; }
.lead { font-size: 19px; color: var(--muted); max-width: 620px; }
.lead p { margin: 0 0 12px; }

/* Note de réunion */
.note {
  background: var(--note-bg); border-left: 3px solid var(--note-line);
  padding: 12px 16px; border-radius: 6px; margin: 0 0 22px; font-size: 15px;
}
.note strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8a5a12; margin-bottom: 2px; }
.note p { margin: 0; white-space: pre-line; }

/* ── Champs ─────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 19px; color: var(--ink);
  background: transparent; border: none; border-bottom: 2px solid var(--line);
  padding: 8px 2px; outline: none; border-radius: 0;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-bottom-color: var(--accent); }
textarea { resize: vertical; min-height: 52px; line-height: 1.45; }
textarea.big { min-height: 120px; }
::placeholder { color: #b1aca3; }
.field.invalid input, .field.invalid textarea { border-bottom-color: var(--danger); }
.error { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 1em; }

/* Choix type Typeform */
.choices { display: flex; flex-direction: column; gap: 10px; max-width: 460px; margin-bottom: 18px; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.choice:hover { border-color: var(--ink); }
.choice:active { transform: scale(.99); }
.choice .key {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; border: 1.5px solid var(--line); border-radius: 5px; color: var(--muted);
}
.choice .rank { margin-left: auto; font-weight: 600; color: var(--accent); }
.choice[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.choice[aria-pressed=true] .key { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Tableaux */
.rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.row {
  display: grid; gap: 10px; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
}
.row .row-name { font-weight: 600; align-self: center; }
.row input, .row select { font-size: 16px; padding: 6px 2px; }
.row .remove { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 6px; align-self: center; }
.row .cell label { font-size: 12px; margin: 0; color: var(--muted); }

/* Fichiers */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center;
  color: var(--muted); cursor: pointer; background: var(--surface); margin-bottom: 10px; transition: border-color .15s, background .15s;
}
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { color: var(--ink); }
.file-list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 15px; }
.file-list li.missing { color: var(--muted); font-style: italic; }
.file-list button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; }

/* Consentement */
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; cursor: pointer; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.consent input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 3px; flex: none; }

/* ── Actions ────────────────────────────────── */
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  font: inherit; font-weight: 600; font-size: 17px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius);
  padding: 11px 22px; transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; }
.hint { font-size: 13px; color: var(--muted); }
.hint kbd { font-family: inherit; font-weight: 600; }
.skip { display: flex; gap: 8px; margin-left: auto; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer; color: var(--muted);
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed=true] { color: var(--ink); background: var(--note-bg); border-color: var(--note-line); }
.link-btn { font: inherit; font-size: 15px; background: none; border: none; color: var(--ink); text-decoration: underline; cursor: pointer; padding: 0; }

.nav[hidden] { display: none; }
.nav { position: fixed; right: 24px; bottom: 22px; display: flex; gap: 6px; align-items: center; z-index: 10; }
.nav-btn { width: 40px; height: 40px; display: grid; place-items: center; border: none; border-radius: 8px; background: var(--ink); color: var(--bg); cursor: pointer; }
.nav-btn:disabled { opacity: .3; cursor: default; }
.saved { font-size: 12px; color: var(--muted); margin-right: 8px; opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }

.overlay { position: fixed; inset: 0; background: rgba(245,243,239,.92); display: grid; place-items: center; z-index: 20; text-align: center; padding: 24px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding: 14px 16px 10px; }
  .stage { padding: 80px 16px 110px; align-items: flex-start; }
  .skip { margin-left: 0; width: 100%; }
  .hint { display: none; }
  .row { grid-template-columns: 1fr !important; }
  .nav { right: 16px; bottom: 16px; }
}
