/* ============ Recoword — maquette ============ */
/* Thème : pro discret. Blanc pur, encre dense, vert profond de marque.
   Le rouge est réservé à l'enregistrement. Écran REC en sombre. */

:root {
  --bg: oklch(100% 0 0);
  --backdrop: oklch(94.5% 0.004 150);
  --surface: oklch(96.8% 0.005 150);
  --surface-press: oklch(94% 0.007 150);
  --line: oklch(91.5% 0.005 150);
  --line-strong: oklch(84% 0.007 150);
  --ink: oklch(20% 0.015 155);
  --muted: oklch(44% 0.02 155);
  --faint: oklch(55% 0.018 155);

  --green: oklch(41% 0.105 148);
  --green-deep: oklch(34% 0.095 148);
  --green-tint: oklch(95.5% 0.028 148);
  --green-tint-ink: oklch(34% 0.09 148);

  --amber-ink: oklch(46% 0.10 72);
  --amber-tint: oklch(94.5% 0.05 88);

  --rec: oklch(54% 0.19 27);
  --rec-deep: oklch(47% 0.17 27);
  --rec-tint: oklch(95.5% 0.022 27);
  --rec-ink: oklch(46% 0.16 27);

  /* Écran d'enregistrement (sombre, neutre pur) */
  --dk-bg: oklch(13.5% 0 0);
  --dk-surface: oklch(19% 0 0);
  --dk-line: oklch(27% 0 0);
  --dk-ink: oklch(94% 0 0);
  --dk-muted: oklch(66% 0 0);

  --r-ctl: 12px;
  --r-card: 16px;

  --z-nav: 10;
  --z-toast: 20;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--backdrop);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---------- Cadre téléphone (desktop) ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: 424px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 700px) {
  body { display: grid; place-items: center; padding: 28px 0; }
  .phone {
    height: min(880px, calc(100dvh - 56px));
    border-radius: 28px;
    box-shadow: 0 24px 80px oklch(20% 0.01 150 / 0.18), 0 0 0 1px var(--line);
  }
}

/* ---------- Écrans ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  padding-bottom: 92px; /* place pour la nav */
}
.screen.is-active { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .screen.is-active { animation: screen-in 0.24s var(--ease); }
  @keyframes screen-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

.screen-pad { padding-left: 20px; padding-right: 20px; }

/* ---------- En-têtes ---------- */
.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 10px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark svg { display: block; }
.brand-name { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.app-head .avatar {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-tint-ink);
  font-size: 13px; font-weight: 650;
  display: grid; place-items: center;
}

.sub-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 10px;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.sub-head h1 {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted);
  flex: none;
}
.icon-btn:active { background: var(--surface-press); }

/* ---------- Sections & listes ---------- */
.section { margin-top: 26px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.section-head h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.section-head .count { font-size: 13px; color: var(--faint); font-weight: 500; }
.section-head .link { margin-left: auto; }

.link {
  color: var(--green);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 15px; font-weight: 550; letter-spacing: -0.005em; }
.row .meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.row .chev { color: var(--faint); flex: none; }
.row:active { background: var(--surface); }

/* ---------- Chips & statuts ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.chip-green { background: var(--green-tint); color: var(--green-tint-ink); }
.chip-amber { background: var(--amber-tint); color: var(--amber-ink); }
.chip-gray  { background: var(--surface); color: var(--muted); }
.chip-rec   { background: var(--rec-tint); color: var(--rec-ink); }

/* ---------- Boutons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border-radius: var(--r-ctl);
  background: var(--green);
  color: white;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s;
}
.btn:active { background: var(--green-deep); }
.btn-quiet { background: var(--surface); color: var(--ink); }
.btn-quiet:active { background: var(--surface-press); }
.btn-sm { min-height: 42px; font-size: 14px; width: auto; }

.rec-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--green);
  color: white;
  text-align: left;
  transition: background 0.15s;
}
.rec-cta:active { background: var(--green-deep); }
.rec-cta .rec-cta-ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.16);
  display: grid; place-items: center;
  flex: none;
}
.rec-cta strong { display: block; font-size: 16.5px; font-weight: 650; }
.rec-cta span { display: block; font-size: 12.5px; color: oklch(96% 0.02 148 / 0.85); margin-top: 1px; }

/* ---------- Cases à cocher (tâches) ---------- */
.task { align-items: flex-start; }
.task .box {
  width: 22px; height: 22px;
  margin-top: 1px;
  border: 1.8px solid var(--line-strong);
  border-radius: 7px;
  flex: none;
  display: grid;
  place-items: center;
  color: white;
  transition: background 0.15s, border-color 0.15s;
}
.task .box svg { opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.18s var(--ease); }
.task.done .box { background: var(--green); border-color: var(--green); }
.task.done .box svg { opacity: 1; transform: none; }
.task.done .title { color: var(--faint); text-decoration: line-through; }
.task.done .meta { color: var(--faint); }

/* ---------- Carte "à classer" ---------- */
.inbox-card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 16px;
  margin-top: 10px;
}
.inbox-card .head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 550;
}
.inbox-card blockquote {
  margin: 12px 0;
  font-size: 14.5px;
  color: var(--ink);
  border: 0;
  padding: 0;
}
.inbox-card .suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}
.inbox-card .suggest strong { font-weight: 650; }
.inbox-card .actions { display: flex; flex-direction: column; gap: 8px; }
.inbox-card .btn-quiet { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.inbox-card .btn-quiet:active { background: var(--surface-press); }

/* ---------- Fiche projet ---------- */
.summary {
  font-size: 15px;
  line-height: 1.58;
  max-width: 62ch;
}
.updated-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--green-tint-ink);
  background: var(--green-tint);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 14px 0 4px;
}

.decision { align-items: flex-start; }
.decision .chip { margin-top: 1px; flex: none; min-width: 74px; justify-content: center; }

.question-row { align-items: flex-start; }
.q-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px; font-weight: 650;
  display: grid; place-items: center;
  flex: none;
  margin-top: 1px;
}

.export-zone { display: flex; gap: 8px; margin-top: 24px; }
.export-zone .btn { font-size: 13.5px; min-height: 44px; white-space: nowrap; padding: 0 10px; }

/* ---------- Écran enregistrement (sombre) ---------- */
.screen-rec {
  background: var(--dk-bg);
  color: var(--dk-ink);
  padding-bottom: 0;
  justify-content: space-between;
}
.rec-top {
  display: flex;
  align-items: center;
  padding: 20px;
}
.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--dk-ink);
  background: var(--dk-surface);
  border-radius: 99px;
  padding: 7px 14px;
}
.rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rec);
}
@media (prefers-reduced-motion: no-preference) {
  .recording .rec-dot { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.25; } }
}
.rec-project-hint { margin-left: auto; font-size: 12.5px; color: var(--dk-muted); }

.rec-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 0 24px;
}
.rec-timer {
  font-size: 62px;
  font-weight: 250;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rec-timer .sec { color: var(--dk-muted); }

.wave { display: flex; align-items: center; gap: 4px; height: 44px; }
.wave i {
  width: 3.5px;
  height: 8px;
  border-radius: 3px;
  background: var(--dk-muted);
}
@media (prefers-reduced-motion: no-preference) {
  .recording .wave i { animation: wave 1.1s ease-in-out infinite alternate; }
  .recording .wave i:nth-child(3n)   { animation-duration: 0.9s; animation-delay: -0.3s; }
  .recording .wave i:nth-child(3n+1) { animation-duration: 1.3s; animation-delay: -0.6s; }
  .recording .wave i:nth-child(4n)   { animation-duration: 0.7s; animation-delay: -0.15s; }
  .recording .wave i:nth-child(5n)   { animation-duration: 1.5s; animation-delay: -0.8s; }
  @keyframes wave { from { height: 6px; } to { height: 38px; } }
}
.paused .wave i { height: 8px; }
.paused .rec-dot { background: var(--dk-muted); animation: none; }

.rec-save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dk-muted);
}
.rec-save-state .ok { color: oklch(72% 0.11 148); }

.rec-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 10px 0 26px;
}
.rec-ctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--dk-muted);
  font-weight: 550;
}
.rec-ctl .disc {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--dk-surface);
  color: var(--dk-ink);
  transition: transform 0.12s;
}
.rec-ctl:active .disc { transform: scale(0.94); }
.rec-ctl.stop .disc {
  width: 74px; height: 74px;
  background: var(--rec);
  color: white;
}
.rec-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--dk-muted);
  padding: 0 32px 28px;
}

/* ---------- Écran traitement ---------- */
.proc-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px 60px;
  gap: 28px;
}
.proc-steps { display: flex; flex-direction: column; gap: 0; }
.proc-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  font-size: 15px;
  color: var(--faint);
  transition: color 0.2s;
}
.proc-step .st-ico {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.8px solid var(--line-strong);
  flex: none;
  display: grid; place-items: center;
  color: white;
  transition: background 0.2s, border-color 0.2s;
}
.proc-step .st-ico svg { opacity: 0; }
.proc-step.doing { color: var(--ink); font-weight: 550; }
.proc-step.doing .st-ico { border-color: var(--green); border-top-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .proc-step.doing .st-ico { animation: spin 0.9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
.proc-step.did { color: var(--muted); }
.proc-step.did .st-ico {
  background: var(--green);
  border-color: var(--green);
  animation: none;
}
.proc-step.did .st-ico svg { opacity: 1; }

.proc-note { font-size: 13px; color: var(--muted); text-align: center; }

.proc-result { display: none; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.proc-result.show { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .proc-result.show { animation: screen-in 0.3s var(--ease); }
}
.result-check {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.proc-result h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; }
.proc-result .extract { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 16px; }
.proc-result .btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* ---------- Détail RDV ---------- */
.player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin-top: 14px;
}
.player .play {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: grid; place-items: center;
  flex: none;
}
.player .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; }
.player .bar i {
  position: absolute; inset: 0 73% 0 0;
  background: var(--green);
  border-radius: 2px;
}
.player .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.keypoints { list-style: none; }
.keypoints li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 14.5px;
}
.keypoints li::before {
  content: '';
  position: absolute;
  left: 4px; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.utt { padding: 9px 0; }
.utt .who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 2px;
}
.utt .who b { font-weight: 650; color: var(--ink); }
.utt .who time { color: var(--faint); font-variant-numeric: tabular-nums; }
.utt p { font-size: 14.5px; color: var(--muted); max-width: 62ch; }
.utt.me .who b { color: var(--green); }

/* ---------- Réglages ---------- */
.set-group { margin-top: 24px; }
.set-group > h2 {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 4px;
}
.quota { padding: 13px 2px; border-bottom: 1px solid var(--line); }
.quota .q-top { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 550; }
.quota .q-top span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.quota .q-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-press);
  margin-top: 9px;
  overflow: hidden;
}
.quota .q-bar i { display: block; height: 100%; width: 64%; background: var(--green); border-radius: 3px; }

select.inline {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 6px 8px;
  background: var(--bg);
}

.switch {
  position: relative;
  width: 46px; height: 28px;
  border-radius: 99px;
  background: var(--line-strong);
  flex: none;
  transition: background 0.18s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.25);
  transition: transform 0.18s var(--ease);
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }

.token {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
}

.danger-link { color: var(--rec-ink); font-weight: 550; }

/* ---------- Navigation basse ---------- */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: stretch;
  height: 76px;
  padding-bottom: 10px;
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--faint);
}
.tab.active { color: var(--green); }
.tab .badge-wrap { position: relative; }
.tab .badge {
  position: absolute;
  top: -4px; right: -8px;
  min-width: 16px; height: 16px;
  border-radius: 99px;
  background: var(--rec);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.tab .badge:empty { display: none; }
.tab-rec { flex: 0 0 84px; position: relative; }
.tab-rec .disc {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px oklch(41% 0.105 148 / 0.35);
  transition: transform 0.12s;
}
.tab-rec:active .disc { transform: translateX(-50%) scale(0.94); }

.tabbar.hidden { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 550;
  padding: 11px 18px;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Divers ---------- */
.hint { font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.spacer { height: 10px; }

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

/* ============ Ajouts app réelle ============ */

/* ---------- Auth ---------- */
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px 40px;
  gap: 20px;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 8px; }
.auth-brand .brand-mark { width: 52px; height: 52px; border-radius: 15px; }
.auth-brand h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.auth-brand p { font-size: 13.5px; color: var(--muted); text-align: center; max-width: 30ch; }
.auth-tabs { display: flex; background: var(--surface); border-radius: 11px; padding: 3px; }
.auth-tabs button {
  flex: 1; min-height: 38px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.auth-tabs button.active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px oklch(0% 0 0 / 0.08); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 12px 14px;
  background: var(--bg);
  width: 100%;
}
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.form-error { font-size: 13px; color: var(--rec-ink); background: var(--rec-tint); border-radius: 10px; padding: 9px 12px; display: none; }
.form-error.show { display: block; }

/* ---------- Divers app ---------- */
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn .spin, .spin-inline {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  display: inline-block; vertical-align: -3px;
}
@media (prefers-reduced-motion: no-preference) {
  .btn .spin, .spin-inline { animation: spin 0.8s linear infinite; }
}
.empty {
  text-align: center; color: var(--faint);
  font-size: 13.5px; padding: 26px 20px;
}
.offline-chip {
  display: none;
  align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--amber-ink); background: var(--amber-tint);
  border-radius: 99px; padding: 4px 11px;
}
.offline-chip.show { display: inline-flex; }
.screen-rec .offline-chip { background: var(--dk-surface); color: var(--dk-muted); }

.pending-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--amber-tint);
  border-radius: var(--r-card);
  padding: 13px 15px;
  margin-top: 14px;
  font-size: 14px; color: var(--amber-ink);
}
.pending-card .btn { width: auto; min-height: 38px; font-size: 13px; padding: 0 14px; }

.quick-actions { display: flex; gap: 8px; margin-top: 10px; }
.quick-actions .btn { min-height: 42px; font-size: 13.5px; }

/* ---------- Sélecteur de projet (boîte) ---------- */
.picker-note { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.picker-new { display: flex; gap: 8px; margin-top: 14px; }
.picker-new input {
  flex: 1; font: inherit; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-ctl); padding: 10px 12px;
}
.picker-new .btn { width: auto; padding: 0 16px; min-height: 44px; }

/* ---------- Résultat / erreurs traitement ---------- */
.proc-error {
  display: none; flex-direction: column; gap: 12px; text-align: center; align-items: center;
}
.proc-error.show { display: flex; }
.proc-error .warn {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--amber-tint); color: var(--amber-ink);
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}

/* écran REC : timer plus petit passé 1 h */
.rec-timer.long { font-size: 46px; }

.note-count { font-size: 12px; color: var(--faint); text-align: right; margin-top: 4px; }

.settings-token-row { user-select: all; }

/* ---------- Réponse aux questions ouvertes ---------- */
.question-row { cursor: pointer; }
.q-answer { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.q-answer textarea {
  font: inherit; color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 10px 12px;
  width: 100%;
  resize: vertical;
}
.q-answer textarea:focus-visible { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.q-answer .btn { align-self: flex-end; padding: 0 18px; }

/* ============ Thème sombre ============ */
/* Appliqué si l'OS est en sombre (sauf choix « clair ») ou si choix explicite « sombre ». */
:root[data-theme="dark"] {
  --bg: oklch(17.5% 0.01 155);
  --backdrop: oklch(13% 0.008 155);
  --surface: oklch(22.5% 0.012 155);
  --surface-press: oklch(27% 0.014 155);
  --line: oklch(28% 0.012 155);
  --line-strong: oklch(37% 0.014 155);
  --ink: oklch(93% 0.006 150);
  --muted: oklch(70% 0.014 152);
  --faint: oklch(58% 0.012 152);
  --green: oklch(56% 0.115 148);
  --green-deep: oklch(48% 0.105 148);
  --green-tint: oklch(28% 0.045 148);
  --green-tint-ink: oklch(85% 0.09 148);
  --amber-ink: oklch(82% 0.11 85);
  --amber-tint: oklch(29% 0.055 85);
  --rec: oklch(58% 0.19 27);
  --rec-deep: oklch(50% 0.17 27);
  --rec-tint: oklch(28% 0.06 27);
  --rec-ink: oklch(80% 0.10 27);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(17.5% 0.01 155);
    --backdrop: oklch(13% 0.008 155);
    --surface: oklch(22.5% 0.012 155);
    --surface-press: oklch(27% 0.014 155);
    --line: oklch(28% 0.012 155);
    --line-strong: oklch(37% 0.014 155);
    --ink: oklch(93% 0.006 150);
    --muted: oklch(70% 0.014 152);
    --faint: oklch(58% 0.012 152);
    --green: oklch(56% 0.115 148);
    --green-deep: oklch(48% 0.105 148);
    --green-tint: oklch(28% 0.045 148);
    --green-tint-ink: oklch(85% 0.09 148);
    --amber-ink: oklch(82% 0.11 85);
    --amber-tint: oklch(29% 0.055 85);
    --rec: oklch(58% 0.19 27);
    --rec-deep: oklch(50% 0.17 27);
    --rec-tint: oklch(28% 0.06 27);
    --rec-ink: oklch(80% 0.10 27);
  }
}

/* ---------- Carte de traitement en arrière-plan ---------- */
.job-card { text-align: left; font: inherit; cursor: pointer; }
.job-card .spin-inline { flex: none; border-color: var(--amber-ink); border-top-color: transparent; }
.meta-inline { font-size: 12px; color: var(--amber-ink); opacity: 0.75; }

/* ============ Responsive PC / tablette ============ */

/* Structure : .phone = coquille (flex), .sidebar (PC) + .stage (écrans) */
.phone { display: flex; }
.stage { position: relative; flex: 1; min-width: 0; height: 100%; }

.sidebar {
  display: none;
  flex-direction: column;
  gap: 3px;
  width: 238px;
  flex: none;
  padding: 22px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar.hidden { display: none !important; }
.side-brand { padding: 0 10px 20px; }
.side-rec { margin-bottom: 20px; min-height: 46px; font-size: 14.5px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--muted);
  text-align: left;
}
.side-item:hover { background: var(--surface-press); }
.side-item.active { background: var(--green-tint); color: var(--green-tint-ink); }
.side-item .badge { position: static; margin-left: auto; }

@media (min-width: 760px) {
  body { display: block; padding: 0; }
  .phone {
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  .sidebar { display: flex; }
  .tabbar { display: none !important; }
  .app-head { display: none; }  /* la marque vit dans la sidebar */
  .screen-pad { padding-top: 26px; }
  .screen { padding-bottom: 56px; }

  /* contenu centré, largeur de lecture ; les barres collantes gardent leur fond pleine largeur */
  .screen-pad { max-width: 780px; margin-inline: auto; width: 100%; }
  .app-head, .sub-head { padding-inline: max(28px, calc((100% - 780px) / 2)); }
  .auth-wrap { max-width: 440px; margin-inline: auto; width: 100%; }
  .toast { bottom: 36px; }

  .rec-timer { font-size: 84px; }
  .rec-timer.long { font-size: 64px; }
}

/* Grand écran : accueil sur deux colonnes */
@media (min-width: 1120px) {
  #screen-home .screen-pad { max-width: 1000px; }
  #home-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
    align-items: start;
  }
  #home-body > :not(.section) { grid-column: 1 / -1; }
}
