/* Darkup — Appel invité. Couleurs et règles du design system Darkup (src/theme/tokens.ts) :
   fond mat, cyan réservé au signal, rouge réservé à « Raccrocher ». Aucune ressource externe. */
@font-face {
  font-family: Manrope;
  src: url('./assets/Manrope.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0A0E11;
  --deep: #040608;
  --surface: #0F1518;
  --surface-high: #141C20;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #0BFDE1;
  --accent-dim: #0a9e8f;
  --on-accent: #031311;
  --accent-soft: rgba(11, 253, 225, 0.10);
  --accent-border: rgba(11, 253, 225, 0.35);
  --text: #EDF6F4;
  --text-dim: #9AABA8;
  --danger: #FF4D5E;
  --danger-soft: rgba(255, 77, 94, 0.10);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { min-width: 300px; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 560px; margin: 0 auto 18px; }
.wordmark { display: block; width: 132px; height: auto; }
.language select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-dim); font-size: 13px; }
main { width: 100%; max-width: 560px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }

.card { display: flex; flex-direction: column; gap: 16px; padding: 22px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.center { align-items: center; text-align: center; }
.center-text { text-align: center; }
h1 { margin: 0; font-size: clamp(22px, 6vw, 28px); line-height: 1.22; letter-spacing: -.02em; font-weight: 800; overflow-wrap: anywhere; }
p { margin: 0; line-height: 1.5; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dim); }
.muted { color: var(--text-dim); font-size: 14px; }
.small { font-size: 12px; }
.badge { align-self: center; padding: 7px 12px; border: 1px solid var(--accent-border); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; text-align: center; }
.notice { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-high); color: var(--text-dim); font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.field input, textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--deep); color: var(--text); font-size: 16px; }
textarea { resize: none; line-height: 1.4; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .button { flex: 1 1 160px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border: 1px solid transparent; border-radius: 14px; font-size: 15px; font-weight: 800; text-align: center; text-decoration: none; }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.secondary { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.button.secondary[aria-pressed="true"], .button.secondary.on { background: var(--surface-high); border-color: var(--border); color: var(--text-dim); }
.button.danger { background: var(--danger); color: #1b0407; }
.link { padding: 10px; border: 0; background: none; color: var(--text-dim); font-size: 13px; text-decoration: underline; }

.spinner { width: 34px; height: 34px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }

.preview { width: 100%; max-height: 220px; border-radius: 14px; background: var(--deep); object-fit: cover; transform: scaleX(-1); }

.call { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 240px; flex: 1; border: 1px solid var(--border); border-radius: 18px; background: var(--deep); overflow: hidden; }
.remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--deep); }
.avatar { display: flex; align-items: center; justify-content: center; max-width: 86%; padding: 18px 22px; border: 1px solid var(--accent-border); border-radius: 18px; background: var(--surface); font-size: 20px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.local { position: absolute; right: 10px; bottom: 10px; width: 28%; max-width: 150px; aspect-ratio: 3 / 4; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); object-fit: cover; transform: scaleX(-1); }
.sound { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); }
.code { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center; }
.digits { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 34px; font-weight: 700; letter-spacing: .18em; color: var(--text); direction: ltr; unicode-bidi: isolate; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.controls .button { flex: 1 1 140px; }
.controls .danger { flex-basis: 100%; }

.chat { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.chat-list li { max-width: 86%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-high); font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-list li.mine { align-self: flex-end; border-color: var(--accent-border); background: var(--accent-soft); }
.chat-list .who { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; color: var(--text-dim); }
.chat-entry { display: flex; gap: 8px; align-items: flex-end; }
.chat-entry textarea { flex: 1; max-height: 120px; }

.report { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: start; }
.noscript { max-width: 560px; margin: 24px auto; padding: 16px; color: var(--text); text-align: center; }

