:root {
  /* Une application plein écran : barre du haut, vue qui défile, onglets en bas sur téléphone et en haut sur ordinateur.
     La conversation et l'appel remplacent les onglets par l'avatar et la barre de parole. */
  --paper: #F2F3EE;
  --surface: #FFFFFF;
  --ink: #14161B;
  --muted: #59606B;
  --line: #DADDD5;
  --tint: #E7E9E2;
  --accent: #FFCB1F;
  --accent-ink: #14161B;
  --mark: #FFDA4D;
  --mark-top: 54%;
  --der: #2C5BD6;
  --die: #CC2F5C;
  --das: #13906A;
  --ok: #13906A;
  --warn: #AD6A00;
  --bad: #CC2F5C;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101216; --surface: #181B21; --ink: #ECEDE8; --muted: #9AA1AC; --line: #2A2E36; --tint: #22262E;
    --accent: #FFD03A; --accent-ink: #14161B; --mark: rgba(255,208,58,.33); --mark-top: 8%;
    --der: #7E9EFF; --die: #FF7299; --das: #3DCB97; --ok: #3DCB97; --warn: #F0B03E; --bad: #FF7299;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid var(--der); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; }
svg { flex: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

#app { height: 100%; display: flex; flex-direction: column; }

/* barre du haut */
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand span { font-weight: 500; color: var(--muted); }
.mark3 { display: grid; gap: 3px; width: 22px; }
.mark3 i { display: block; height: 5px; border-radius: 3px; }
.mark3 i:nth-child(1) { background: var(--der); }
.mark3 i:nth-child(2) { background: var(--die); width: 76%; }
.mark3 i:nth-child(3) { background: var(--das); width: 52%; }
.topnav { display: none; gap: 4px; margin-left: 8px; }
.topnav button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; color: var(--muted); font-weight: 700; }
.topnav button[aria-current="page"] { background: var(--tint); color: var(--ink); }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 12px 3px 3px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill-av { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); }

.main { flex: 1; overflow: auto; min-height: 0; }
.main--chat, .main--call { overflow: hidden; display: flex; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 30px; }
.narrow { max-width: 780px; }

/* onglets du bas */
.tabbar { display: flex; border-top: 1px solid var(--line); background: var(--surface); }
.tabbar button { flex: 1; min-width: 0; border: 0; background: none; padding: 6px 2px 9px; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar .ti { display: grid; place-items: center; padding: 3px 14px; border-radius: 999px; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar button[aria-current="page"] .ti { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 900px) { .topnav { display: flex; } .tabbar { display: none; } }

/* éléments communs */
.h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 800; }
.h2 { font-size: 22px; font-weight: 700; }
.h3 { font-size: 18px; font-weight: 700; }
.sec { display: grid; gap: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; text-decoration: none; }
.btn svg { width: 20px; height: 20px; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; border: 1px solid var(--line); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--sm { padding: 7px 14px; font-size: 14px; }
.btn--lg { padding: 15px 26px; font-size: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row.center { justify-content: center; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; flex: none; padding: 0; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn.sm { width: 32px; height: 32px; }
.iconbtn.sm svg { width: 16px; height: 16px; }
.iconbtn.lg { width: 56px; height: 56px; }
.iconbtn.lg svg { width: 24px; height: 24px; }
.iconbtn[aria-pressed="true"], .iconbtn.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 700; }
.chip svg { width: 15px; height: 15px; }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--tint); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 700; min-width: 46px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.seg--sm button { padding: 4px 9px; min-width: 0; font-size: 13px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.notice--ok { border-left-color: var(--ok); }
mark { background: linear-gradient(180deg, transparent var(--mark-top), var(--mark) var(--mark-top)); color: inherit; padding: 0 2px; border-radius: 2px; }
del { text-decoration: line-through; text-decoration-color: var(--die); text-decoration-thickness: 2px; }
.art { font-weight: 700; }
.art--der { color: var(--der); } .art--die { color: var(--die); } .art--das { color: var(--das); }
.dots { display: inline-flex; gap: 4px; padding: 8px 0 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

/* formulaires */
.form { display: grid; gap: 12px; }
.form label, .field { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.form input, .form select, .field input, .field select, select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); font-weight: 400; font-size: 16px; min-width: 0; }
.form small { font-weight: 400; color: var(--muted); }
.form--inline { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.form-err { color: var(--bad); font-weight: 700; font-size: 14px; }

/* connexion */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 16px; box-shadow: 0 24px 60px -36px rgba(20,22,27,.5); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-faces { display: flex; justify-content: center; gap: 8px; }
.auth-face { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); }
.auth h1 { font-size: 26px; font-weight: 800; }

/* accueil */
.setup { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.setup .seg, .setup .personas { justify-self: start; }
.lvl-desc { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: -4px; }
@media (max-width: 600px) { .setup { grid-template-columns: 1fr; } .lvl-desc { grid-column: 1; } }
.personas { display: flex; flex-wrap: wrap; gap: 8px; }
.persona { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 14px 3px 3px; text-align: left; }
.persona[aria-pressed="true"] { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); }
.persona b { display: block; font-size: 15px; line-height: 1.1; }
.persona small { display: block; font-size: 12px; opacity: .8; }
.persona-av { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.8vw, 54px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .l2 { display: block; font-weight: 500; letter-spacing: -0.03em; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 46ch; margin: 16px 0 22px; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; gap: 22px; } }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 10px; box-shadow: 0 18px 40px -26px rgba(20,22,27,.45); }
.demo-head { display: flex; align-items: center; gap: 12px; }
.demo-av { width: 72px; height: 72px; border-radius: 50%; background: var(--tint); }
.demo-head b { display: block; font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.resume { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); padding: 12px 16px; }
.resume .grow { flex: 1; min-width: 160px; }
.resume b { font-family: var(--font-display); font-size: 18px; }
.resume .btn--ghost { border-color: rgba(20,22,27,.3); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tiles--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 620px) { .tiles--4 { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.tile b { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile span { font-size: 13px; color: var(--muted); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sc { display: grid; grid-template-columns: 56px 1fr; align-items: start; gap: 6px 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 14px; transition: transform .12s ease, border-color .12s ease; }
.sc:hover { border-color: var(--ink); transform: translateY(-2px); }
.sc-av { width: 56px; height: 56px; border-radius: 50%; background: var(--tint); }
.sc-txt { display: grid; gap: 5px; min-width: 0; }
.sc-de { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.15; hyphens: auto; overflow-wrap: break-word; }
.sc p { font-size: 14px; color: var(--muted); }
.tag { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--muted); }
.custom { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.custom textarea { flex: 1; min-width: 220px; resize: vertical; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }

/* conversation */
.chat { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-title { flex: 1; min-width: 0; }
.chat-de { font-family: var(--font-display); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { font-size: 13px; color: var(--muted); }
@media (max-width: 420px) { .chat-head { gap: 6px; padding: 8px; } .chat-head .iconbtn { width: 40px; height: 40px; } }
.chat-body { flex: 1; min-height: 0; display: flex; }
.msgs { flex: 1; overflow: auto; min-height: 0; }
.msgs-in { max-width: 760px; margin: 0 auto; padding: 18px 14px 24px; display: grid; gap: 14px; }
.row { display: flex; flex-direction: column; }
.row--tutor { flex-direction: row; align-items: flex-end; gap: 8px; }
.row--me { align-items: flex-end; }
.bav { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--tint); }
.bubble { max-width: min(90%, 580px); border-radius: 18px; padding: 11px 14px; }
.bubble--tutor { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble--me { background: var(--ink); color: var(--paper); border-bottom-right-radius: 6px; }
.bubble--me del { text-decoration-color: var(--accent); }
.who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.de { font-size: 18px; line-height: 1.45; }
.tr { font-size: 15px; color: var(--muted); font-style: italic; margin-top: 6px; }
.acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.words--flat { border: 0; margin: 0; padding: 0; }
.wchip { display: inline-flex; align-items: center; gap: 6px; background: var(--tint); border-radius: 10px; padding: 3px 3px 3px 10px; font-size: 14px; }
.wchip .wtr { color: var(--muted); }
.wchip button { border: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; padding: 0; }
.wchip button svg { width: 15px; height: 15px; }
.wchip button.is-saved { background: var(--das); color: #fff; }
.fb { max-width: min(90%, 580px); width: 100%; margin-top: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; }
.fb--ok { border-left-color: var(--ok); } .fb--warn { border-left-color: var(--warn); } .fb--bad { border-left-color: var(--bad); } .fb--info { border-left-color: var(--der); }
.fb-pill { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 12px; font-weight: 700; font-size: 14px; text-align: left; }
.fb-pill .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fb--ok .dot { background: var(--ok); } .fb--warn .dot { background: var(--warn); } .fb--bad .dot { background: var(--bad); } .fb--info .dot { background: var(--der); }
.fb-pill .chev { margin-left: auto; color: var(--muted); font-weight: 400; }
.fb-body { padding: 0 12px 12px; display: grid; gap: 9px; }
.fb-line { display: flex; align-items: flex-start; gap: 8px; }
.fb-k { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; min-width: 78px; padding-top: 4px; }
.fb-line [lang="de"] { flex: 1; font-size: 17px; }
.fb-expl { font-size: 15px; }
.rep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.rep .hit { color: var(--ok); font-weight: 700; }
.rep .miss { color: var(--muted); text-decoration: underline dotted; }
.rep-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.err { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--bad); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.tip { text-align: center; }
.tray { border-top: 1px solid var(--line); background: var(--paper); }
.tray-in { max-width: 760px; margin: 0 auto; padding: 10px 12px; display: flex; gap: 8px; overflow-x: auto; }
.sug { flex: none; max-width: 270px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 12px; }
.sug b { display: block; font-weight: 700; }
.sug span { display: block; font-size: 13px; color: var(--muted); }
.composer { border-top: 1px solid var(--line); background: var(--surface); }
.composer-in { max-width: 760px; margin: 0 auto; padding: 10px 12px; display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); background: var(--paper); border-radius: 23px; padding: 11px 16px; min-height: 46px; max-height: 140px; line-height: 1.4; }
.mic { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; padding: 0; }
.mic svg { width: 24px; height: 24px; }
.mic.is-live { background: var(--die); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(204,47,92,.45); } 70% { box-shadow: 0 0 0 14px rgba(204,47,92,0); } 100% { box-shadow: 0 0 0 0 rgba(204,47,92,0); } }
.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: grid; place-items: center; flex: none; padding: 0; }
.send svg { width: 20px; height: 20px; }

/* scène de l'avatar */
.stage { flex: 1; min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 16px 22px; }
.av-btn { position: relative; flex: none; width: min(62vw, 38vh, 320px); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; background: none; }
.av-frame { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 36%, var(--surface) 0%, var(--tint) 72%); box-shadow: inset 0 0 0 1px var(--line); }
.av-canvas, .av-fallback { width: 100%; height: 100%; display: block; }
.av-btn::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid transparent; pointer-events: none; }
.stage[data-state="speaking"] .av-btn::after { border-color: var(--accent); animation: ring 1.5s ease-out infinite; }
.stage[data-state="listening"] .av-btn::after { border-color: var(--die); animation: ring 1.1s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.97); opacity: 1; } 100% { transform: scale(1.09); opacity: 0; } }
.think { position: absolute; top: 5%; right: -2%; display: none; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; box-shadow: 0 6px 16px -10px rgba(0,0,0,.4); }
.think i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.think i:nth-child(2) { animation-delay: .2s; } .think i:nth-child(3) { animation-delay: .4s; }
.stage[data-state="thinking"] .think { display: inline-flex; }
.stage-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.stage[data-state="speaking"] .sdot { background: var(--accent); }
.stage[data-state="listening"] .sdot { background: var(--die); }
.stage[data-state="thinking"] .sdot { background: var(--der); }
.caption { width: 100%; max-width: 580px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.cap-de { font-size: clamp(19px, 2.3vw, 24px); line-height: 1.4; text-wrap: balance; }
.caption .tr { margin: 0; }
.caption .acts, .caption .words { justify-content: center; margin: 0; }
.caption .words { border-top: 0; padding-top: 0; }
.stage-latest { width: 100%; max-width: 580px; display: grid; gap: 10px; margin-top: 4px; }
@media (max-width: 979px) {
  .chat[data-mode="avatar"] .chat-body > .msgs { display: none; }
  .chat[data-mode="chat"] .chat-body > .stage { display: none; }
}
@media (min-width: 980px) {
  .chat-body > .stage { flex: 0 0 44%; max-width: 560px; border-right: 1px solid var(--line); justify-content: center; background: var(--surface); }
  .av-btn { width: min(30vw, 44vh, 320px); }
  .stage-latest, .caption .words, .modebtn { display: none; }
}

/* appel libre */
.call-intro { padding-top: 32px; }
.call-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px 22px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.call-card .toggle { width: 100%; max-width: 420px; text-align: left; }
.call-thumb { width: 150px; height: 150px; border-radius: 50%; background: var(--tint); }
.call { flex: 1; display: flex; flex-direction: column; min-height: 0; background: radial-gradient(120% 80% at 50% 0%, var(--surface), var(--paper)); }
.call-stage { justify-content: center; }
.av-btn--call { width: min(78vw, 50vh, 460px); }
.lvl-ring { position: absolute; inset: -14px; border-radius: 50%; border: 4px solid var(--die); opacity: calc(var(--lvl, 0) * 0.9); transform: scale(calc(1 + var(--lvl, 0) * 0.04)); pointer-events: none; transition: opacity .1s, transform .1s; }
.stage:not([data-state="listening"]) .lvl-ring { opacity: 0; }
.call-time { font-variant-numeric: tabular-nums; margin-left: 6px; }
.call-me { width: 100%; max-width: 580px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.heard { font-size: 16px; }
.call-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 12px 12px 16px; display: grid; gap: 10px; }
.call-ctrls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.hangup { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--bad); color: #fff; padding: 14px 22px; font-weight: 700; }
.hangup svg { width: 24px; height: 24px; }
.call-type { max-width: 640px; width: 100%; margin: 0 auto; display: flex; gap: 8px; }
.call-type input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 23px; padding: 11px 16px; background: var(--paper); }

/* bilan */
.sum-head { display: grid; gap: 6px; }
.sum-head h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; }
.sum-av { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); }
.sum-top { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 560px) { .sum-top { grid-template-columns: 1fr; } .badge { justify-self: start; grid-row: 1; } }
.badge { display: grid; justify-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 10px 18px; }
.badge b { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; }
.badge span { font-size: 12px; font-weight: 700; }
.scores { display: grid; gap: 10px; }
.score { display: grid; grid-template-columns: minmax(92px, 120px) 1fr 40px; gap: 10px; align-items: center; font-size: 15px; }
.bar { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.score b { text-align: right; font-variant-numeric: tabular-nums; }
.list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.mist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mist li { display: grid; gap: 3px; }
.mist .pair { font-size: 17px; }
.phr { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.phr:first-child { border-top: 0; }
.phr div { flex: 1; }
.phr span { display: block; font-size: 14px; color: var(--muted); }

/* mots */
.legend { display: flex; gap: 12px; font-size: 14px; align-items: center; flex-wrap: wrap; }
.legend .art { padding: 1px 8px; border-radius: 6px; background: var(--tint); }
.search { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--surface); }
.wl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.wrow:first-child { border-top: 0; }
.w-main { flex: 1; min-width: 0; }
.w-de { font-size: 17px; }
.w-tr { color: var(--muted); font-size: 14px; }
.boxes { display: inline-flex; gap: 3px; }
.boxes i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.boxes i.on { background: var(--das); }
.empty { padding: 22px 16px; color: var(--muted); text-align: center; }
.review { display: grid; place-items: center; min-height: 100%; padding: 24px 16px; }
.flash { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px 22px; display: grid; gap: 18px; text-align: center; }
.flash-top { display: flex; justify-content: space-between; align-items: center; }
.flash .q { font-size: 22px; }
.flash .a { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.15; }

/* progrès */
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart text.strong { fill: var(--ink); font-weight: 700; }
.hrow { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.hrow:first-child { border-top: 0; }
.h-av { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); }
.hrow .d { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.hrow .tt { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; text-align: right; }
.lv { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--tint); }

/* réglages */
.set { display: grid; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; padding-top: 4px; }
.set h3 { font-size: 17px; font-weight: 700; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--ink); }
.range b { font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

/* administration */
.ulist { display: grid; }
.urow { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.urow:first-child { border-top: 0; }
.u-main { display: grid; min-width: 0; }
.u-main span { overflow: hidden; text-overflow: ellipsis; }
.u-last { grid-column: 1; }
.u-role { justify-self: end; padding: 6px 10px; font-size: 14px; }
.u-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st { justify-self: end; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--tint); }
.st-on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.st-wait { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.st-off { color: var(--muted); }
.linkbox { display: grid; gap: 8px; background: var(--tint); border-radius: 12px; padding: 12px; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); font-size: 14px; }
.vrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.vrow select { grid-column: 1; }
.vrow .btn { grid-column: 2; grid-row: 1; }
.table-wrap { overflow-x: auto; }
.utable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.utable th, .utable td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.utable th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 10; }
#toast.show { opacity: 1; }

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