/* ============================================================
   MAMOUSSO V20 — Espace utilisateur (après connexion)
   Même identité que les pages de connexion (static/auth.css) :
   crème chaud, brun profond, accent terracotta, serif sobre.
   Chargé APRÈS style.css et transcribe_studio.css : ne fait que
   redéfinir l'apparence, jamais le comportement.
   ============================================================ */

:root {
  --ui-bg: #f5f4ed;
  --ui-surface: #fffdf8;
  --ui-surface-2: #faf9f5;
  --ui-surface-3: #f0eee6;
  --ui-text: #141413;
  --ui-text-2: #3d3929;
  --ui-muted: #73726c;
  --ui-faint: #9b998f;
  --ui-line: #e8e6dc;
  --ui-line-strong: #d6d3c7;
  --ui-accent: #c96442;
  --ui-accent-hover: #b0573a;
  --ui-accent-soft: #f9ece4;
  --ui-grad-from: #dd805f;
  --ui-grad-to: #bf5a36;
  --ui-ring: 0 0 0 4px rgba(201, 100, 66, .16);
  --ui-ok: #157f3c;
  --ui-ok-soft: #edf8f0;
  --ui-warn: #9a5b06;
  --ui-warn-soft: #fdf3dc;
  --ui-danger: #b42318;
  --ui-danger-soft: #fef1ef;
  --ui-info: #4f6480;
  --ui-info-soft: #eff2f6;
  --ui-card-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 8px 24px rgba(60, 45, 30, .05), 0 28px 56px -28px rgba(60, 45, 30, .14);
  --ui-hover-shadow: 0 1px 2px rgba(20, 20, 19, .05), 0 14px 32px -10px rgba(60, 45, 30, .18);
  --ui-btn-shadow: 0 1px 2px rgba(20, 20, 19, .06), 0 1px 0 rgba(255, 255, 255, .5) inset;
  --ui-glow-1: rgba(217, 119, 87, .14);
  --ui-glow-2: rgba(232, 180, 140, .18);
  --ui-dots: rgba(20, 20, 19, .05);
  --ui-serif: "Tiempos Headline", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --ui-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ui-ease: cubic-bezier(.2, .8, .2, 1);
  --ui-sidebar: 268px;
  --ui-highlight: #fbe3c8;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ui-bg: #1c1b19;
    --ui-surface: #262624;
    --ui-surface-2: #2b2b29;
    --ui-surface-3: #33322f;
    --ui-text: #f3f1ea;
    --ui-text-2: #dedad0;
    --ui-muted: #a6a39a;
    --ui-faint: #7f7c74;
    --ui-line: #393835;
    --ui-line-strong: #4a4844;
    --ui-accent: #e08563;
    --ui-accent-hover: #ea9676;
    --ui-accent-soft: rgba(217, 119, 87, .14);
    --ui-ring: 0 0 0 4px rgba(224, 133, 99, .22);
    --ui-ok: #7dd89b;
    --ui-ok-soft: rgba(34, 197, 94, .1);
    --ui-warn: #f5c76b;
    --ui-warn-soft: rgba(245, 180, 60, .12);
    --ui-danger: #ff9b8f;
    --ui-danger-soft: rgba(239, 68, 68, .1);
    --ui-info: #a9bcd6;
    --ui-info-soft: rgba(120, 150, 190, .12);
    --ui-card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 56px -24px rgba(0, 0, 0, .55);
    --ui-hover-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -14px rgba(0, 0, 0, .6);
    --ui-btn-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --ui-glow-1: rgba(217, 119, 87, .10);
    --ui-glow-2: rgba(160, 110, 80, .08);
    --ui-dots: rgba(255, 255, 255, .04);
    --ui-highlight: rgba(217, 119, 87, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ui-bg: #1c1b19;
  --ui-surface: #262624;
  --ui-surface-2: #2b2b29;
  --ui-surface-3: #33322f;
  --ui-text: #f3f1ea;
  --ui-text-2: #dedad0;
  --ui-muted: #a6a39a;
  --ui-faint: #7f7c74;
  --ui-line: #393835;
  --ui-line-strong: #4a4844;
  --ui-accent: #e08563;
  --ui-accent-hover: #ea9676;
  --ui-accent-soft: rgba(217, 119, 87, .14);
  --ui-ring: 0 0 0 4px rgba(224, 133, 99, .22);
  --ui-ok: #7dd89b;
  --ui-ok-soft: rgba(34, 197, 94, .1);
  --ui-warn: #f5c76b;
  --ui-warn-soft: rgba(245, 180, 60, .12);
  --ui-danger: #ff9b8f;
  --ui-danger-soft: rgba(239, 68, 68, .1);
  --ui-info: #a9bcd6;
  --ui-info-soft: rgba(120, 150, 190, .12);
  --ui-card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 56px -24px rgba(0, 0, 0, .55);
  --ui-hover-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -14px rgba(0, 0, 0, .6);
  --ui-btn-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --ui-glow-1: rgba(217, 119, 87, .10);
  --ui-glow-2: rgba(160, 110, 80, .08);
  --ui-dots: rgba(255, 255, 255, .04);
  --ui-highlight: rgba(217, 119, 87, .28);
  color-scheme: dark;
}


/* Les jetons existants du studio et de l'éditeur suivent la même palette.
   Sélecteur volontairement plus spécifique que ceux de transcribe_studio.css
   (y compris ses blocs sombres) pour que les deux thèmes soient unifiés. */
:root:not(#appTokens) {
  --bg: var(--ui-bg); --card: var(--ui-surface); --text: var(--ui-text); --muted: var(--ui-muted); --line: var(--ui-line);
  --mx-bg: var(--ui-bg); --mx-surface: var(--ui-surface); --mx-surface-2: var(--ui-surface-2); --mx-surface-3: var(--ui-surface-3);
  --mx-text: var(--ui-text); --mx-muted: var(--ui-muted); --mx-line: var(--ui-line); --mx-line-strong: var(--ui-line-strong);
  --mx-accent: var(--ui-accent); --mx-accent-soft: var(--ui-accent-soft); --mx-grad-from: var(--ui-grad-from); --mx-grad-to: var(--ui-grad-to);
  --mx-ok: var(--ui-ok); --mx-ok-soft: var(--ui-ok-soft); --mx-warn: var(--ui-warn); --mx-warn-soft: var(--ui-warn-soft);
  --mx-danger: var(--ui-danger); --mx-danger-soft: var(--ui-danger-soft); --mx-info: var(--ui-info); --mx-info-soft: var(--ui-info-soft);
  --mx-shadow: var(--ui-card-shadow); --mx-ring: var(--ui-ring);
  --mxw-bg: var(--ui-bg); --mxw-panel: var(--ui-surface-2); --mxw-page: var(--ui-surface); --mxw-line: var(--ui-line);
  --mxw-line-soft: var(--ui-surface-3); --mxw-text: var(--ui-text-2); --mxw-title: var(--ui-text); --mxw-muted: var(--ui-muted);
  --mxw-hover: var(--ui-surface-3); --mxw-current: var(--ui-accent-soft); --mxw-strong: var(--ui-accent); --mxw-highlight: var(--ui-highlight);
  --mxw-input: var(--ui-surface-2);
}

/* ================================================================ base */
body.appBody {
  margin: 0;
  min-height: 100vh;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--ui-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.appBody h1, .appBody h2, .appBody h3 { font-family: var(--ui-serif); font-weight: 500; letter-spacing: -.012em; color: var(--ui-text); }
.appBody button, .appBody input, .appBody select, .appBody textarea { font-family: inherit; }
.appBody svg { flex: none; }
.appBody ::selection { background: rgba(201, 100, 66, .22); }

.appEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--ui-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.appEyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--ui-accent-soft); }

/* ================================================================ structure */
.appShell {
  display: grid;
  grid-template-columns: var(--ui-sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
.appMain {
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.appMain::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 380px at 92% -8%, var(--ui-glow-1), transparent 70%),
    radial-gradient(520px 340px at 0% 0%, var(--ui-glow-2), transparent 70%);
}
.appMain::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 520px;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--ui-dots) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

/* ================================================================ menu latéral */
.appSidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 40;
  color: #f6f1e7;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(201, 100, 66, .30), transparent 55%),
    radial-gradient(90% 50% at 100% 100%, rgba(224, 160, 110, .14), transparent 60%),
    linear-gradient(165deg, #26201b 0%, #1a1714 55%, #14120f 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  isolation: isolate;
}
.appSidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 70%);
}
.appSidebarGlow {
  position: absolute;
  width: 300px;
  height: 300px;
  left: -140px;
  top: 30%;
  border-radius: 50%;
  background: rgba(217, 119, 87, .28);
  filter: blur(70px);
  z-index: -1;
  animation: appDrift 18s ease-in-out infinite alternate;
}
.appSidebarInner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 16px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.appSidebarHead { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; margin-bottom: 22px; }
.appLogo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fbf7ef;
  text-decoration: none;
  font-family: var(--ui-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .06em;
}
.appLogoMark { border-radius: 10px; box-shadow: 0 6px 18px rgba(201, 100, 66, .35); }
.appSidebarClose {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: #f6f1e7;
  place-items: center;
  cursor: pointer;
}
.appSidebarClose svg, .appMenuBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.appNewBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  margin: 0 2px 22px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 10px 24px -10px rgba(201, 100, 66, .7), 0 1px 0 rgba(255, 255, 255, .22) inset;
  transition: transform .2s var(--ui-ease), box-shadow .2s, filter .2s;
}
.appNewBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.appNewBtn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px -10px rgba(201, 100, 66, .8), 0 1px 0 rgba(255, 255, 255, .22) inset; }
.appNewBtn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(224, 133, 99, .45); }

.appNav { display: grid; gap: 3px; }
.appNavLabel {
  margin: 14px 12px 6px;
  color: rgba(246, 241, 231, .4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.appNavLabel:first-child { margin-top: 0; }
.appNavItem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(246, 241, 231, .7);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.appNavItem svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.appNavItem:hover { background: rgba(255, 255, 255, .05); color: #fbf7ef; }
.appNavItem.isActive { background: rgba(224, 133, 99, .14); color: #fbf7ef; }
.appNavItem.isActive svg { stroke: #f0a07f; opacity: 1; }
.appNavItem.isActive::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #e08563;
}
.appNavItem:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(224, 133, 99, .55); }

.appSidebarFoot { margin-top: auto; display: grid; gap: 12px; padding-top: 22px; }
.appTip {
  display: flex;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  color: rgba(246, 241, 231, .6);
  font-size: 12.5px;
  line-height: 1.45;
}
.appTip svg { width: 16px; height: 16px; fill: rgba(240, 160, 127, .8); margin-top: 1px; }
.appUser {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
}
.appUserAvatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(145deg, #e08a68, #b8532f);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 6px 14px -6px rgba(201, 100, 66, .6);
}
.appUserText { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.appUserText strong { color: #fbf7ef; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appUserText small { color: rgba(246, 241, 231, .5); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appUserLogout {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: rgba(246, 241, 231, .6);
  transition: background .2s, color .2s;
}
.appUserLogout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.appUserLogout:hover { background: rgba(255, 255, 255, .08); color: #fbf7ef; }
.appScrim { display: none; }

/* ================================================================ barre supérieure */
.appMenuBtn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: var(--ui-btn-shadow);
  cursor: pointer;
}
.appBody .page.transcribePage,
.appBody .appPage {
  width: min(1060px, calc(100% - 64px));
  margin: 0 auto;
  padding: 30px 0 72px;
}
.appBody .appTopbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  animation: appRise .6s var(--ui-ease) both;
}
.appTopbarTitle { min-width: 0; flex: 1; }
.appTopbarTitle .appEyebrow { margin-bottom: 2px; }
.appTopbarTitle .brand { display: none; }
.appBody .appTopbar .subtitle {
  font-family: var(--ui-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--ui-text);
}
.appBody .topbarActions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.appBody .languageControl {
  height: 42px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  box-shadow: var(--ui-btn-shadow);
}
.appBody .languageControl span { font-size: 15px; }
.appBody .languageControl select { min-width: 120px; color: var(--ui-text); font-size: 13.5px; font-weight: 500; background: transparent; border: 0; box-shadow: none; }
.appBody .mxThemeToggle,
.appBody .appThemeToggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-muted);
  box-shadow: var(--ui-btn-shadow);
  cursor: pointer;
  transition: color .2s, border-color .2s, transform .25s var(--ui-ease);
}
.appBody .mxThemeToggle:hover,
.appBody .appThemeToggle:hover { color: var(--ui-text); border-color: var(--ui-line-strong); transform: rotate(-12deg); }
.appBody .appThemeToggle svg { width: 18px; height: 18px; fill: currentColor; }
.appThemeToggle .mxSun { display: none; }
.appThemeToggle[data-mode="dark"] .mxSun { display: block; }
.appThemeToggle[data-mode="dark"] .mxMoon { display: none; }
.appBody .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-text-2);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--ui-btn-shadow);
  white-space: nowrap;
}
.appBody .pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-faint); flex: none; }
.appBody .pill.ok { color: var(--ui-ok); }
.appBody .pill.ok::before { background: var(--ui-ok); box-shadow: 0 0 0 3px var(--ui-ok-soft); }
.appBody .pill.error { color: var(--ui-danger); }
.appBody .pill.error::before { background: var(--ui-danger); box-shadow: 0 0 0 3px var(--ui-danger-soft); }

/* ================================================================ cartes de synthèse */
.appStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.appStat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  box-shadow: var(--ui-card-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .25s var(--ui-ease), box-shadow .25s, border-color .25s;
  animation: appRise .6s var(--ui-ease) both;
}
.appStat:nth-child(2) { animation-delay: .05s; }
.appStat:nth-child(3) { animation-delay: .1s; }
.appStat:hover { transform: translateY(-2px); box-shadow: var(--ui-hover-shadow); border-color: var(--ui-line-strong); }
.appStatIcon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.appStatIcon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appStatIcon--ok { background: var(--ui-ok-soft); color: var(--ui-ok); }
.appStatIcon--accent { background: var(--ui-accent-soft); color: var(--ui-accent); }
.appStatIcon--info { background: var(--ui-info-soft); color: var(--ui-info); }
.appStatText { display: flex; flex-direction: column; min-width: 0; }
.appStatText b { font-size: 24px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.appStatText small { color: var(--ui-muted); font-size: 13px; }

/* ================================================================ cartes et studio */
.appBody .card,
.mxTranscribe.appBody .card {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  box-shadow: var(--ui-card-shadow);
  animation: appRise .7s var(--ui-ease) both;
}
.appBody .mxStudio { padding: 30px 32px; animation-delay: .08s; }
.appBody .mxStudioHead h1 { font-size: clamp(24px, 3vw, 30px); }
.appBody .mxStudioHead .hint { color: var(--ui-muted); font-size: 14.5px; }
.appBody .mxStatus { font-weight: 600; }
.appBody .mxTabs { padding: 5px; border-radius: 14px; background: var(--ui-surface-3); border: 1px solid var(--ui-line); }
.appBody .mxTab { font-weight: 600; border-radius: 10px; }
.appBody .mxTab[aria-selected="true"] { background: var(--ui-surface); box-shadow: 0 1px 2px rgba(20, 20, 19, .06), 0 4px 12px -4px rgba(60, 45, 30, .14); }
.appBody .mxRecorder {
  border-radius: 20px;
  border-color: var(--ui-line);
  background:
    radial-gradient(110% 90% at 50% 0%, var(--ui-accent-soft), transparent 70%),
    var(--ui-surface-2);
}
.appBody .mxTimer { font-weight: 650; letter-spacing: .01em; }
.appBody .mxBtn { font-weight: 600; border-color: var(--ui-line); box-shadow: var(--ui-btn-shadow); }
.appBody .mxReview { border-radius: 18px; }
.appBody .mxDropzone { border-radius: 18px; }
.appBody .mxUrlField input { height: 48px; border-color: var(--ui-line-strong); }
.appBody select {
  border-radius: 12px;
  border-color: var(--ui-line-strong);
  background-color: var(--ui-surface-2);
  color: var(--ui-text);
  min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.appBody select:hover { border-color: var(--ui-faint); }
.appBody select:focus { outline: none; border-color: var(--ui-accent); box-shadow: var(--ui-ring); }
.appBody label > span { font-weight: 600; font-size: 13.5px; color: var(--ui-text-2); }
.appBody .mxPrimary,
.mxTranscribe.appBody .mxPrimary {
  border-radius: 14px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  font-weight: 650;
  letter-spacing: .03em;
  box-shadow: 0 12px 26px -12px rgba(201, 100, 66, .65), 0 1px 0 rgba(255, 255, 255, .25) inset;
}

/* progression */
.appBody #progressCard { padding: 26px 28px; }
.appBody .progressHeader { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.appBody .percent { font-family: var(--ui-serif); font-size: 34px; font-weight: 500; color: var(--ui-accent); }
.appBody .progressTrack { height: 10px; border-radius: 999px; background: var(--ui-surface-3); overflow: hidden; }
.appBody .progressBar {
  position: relative;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ui-grad-from), var(--ui-grad-to));
  transition: width .5s var(--ui-ease);
  overflow: hidden;
}
.appBody .progressBar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: appShimmer 1.6s linear infinite;
}
.appBody .secondary {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-text);
  font-weight: 600;
  box-shadow: var(--ui-btn-shadow);
}
.appBody .secondary:hover { border-color: var(--ui-line-strong); background: var(--ui-surface-2); }
.appBody .primary {
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 22px -10px rgba(201, 100, 66, .6);
}

/* ================================================================ mes transcriptions */
.appBody .historyCard { padding: 26px 28px; animation-delay: .14s; scroll-margin-top: 24px; }
.appBody .historyCardHeader { align-items: flex-end; margin-bottom: 18px; }
.appBody .historyCard h2 { font-size: 26px; margin: 0 0 4px; }
.appBody .historyCard .hint { color: var(--ui-muted); font-size: 14px; }
.appSearch {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  max-width: 100%;
}
.appSearch svg { position: absolute; left: 13px; width: 17px; height: 17px; fill: none; stroke: var(--ui-faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; transition: stroke .2s; }
.appSearch:focus-within svg { stroke: var(--ui-accent); }
.appBody .historyPageSearch {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--ui-line-strong);
  background: var(--ui-surface-2);
  color: var(--ui-text);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.appBody .historyPageSearch::placeholder { color: var(--ui-faint); }
.appBody .historyPageSearch:focus { border-color: var(--ui-accent); background: var(--ui-surface); box-shadow: var(--ui-ring); }
.appBody .historyPageList { gap: 8px; max-height: 620px; padding: 2px; }
.appBody .historyRow,
.mxTranscribe.appBody .historyRow {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 13px 16px 13px 13px;
  border-radius: 14px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-text);
  transition: transform .2s var(--ui-ease), box-shadow .2s, border-color .2s, background .2s;
  animation: appRise .45s var(--ui-ease) both;
}
.appBody .historyRow:nth-child(2) { animation-delay: .03s; }
.appBody .historyRow:nth-child(3) { animation-delay: .06s; }
.appBody .historyRow:nth-child(4) { animation-delay: .09s; }
.appBody .historyRow:nth-child(5) { animation-delay: .12s; }
.appBody .historyRow:nth-child(n+6) { animation-delay: .15s; }
.mxTranscribe.appBody .historyRow:not(.disabled):hover {
  transform: translateY(-1px);
  border-color: var(--ui-line-strong);
  background: var(--ui-surface);
  box-shadow: var(--ui-hover-shadow);
}
.mxTranscribe.appBody .historyRow.disabled,
.mxTranscribe.appBody .historyRow.disabled:hover { background: var(--ui-surface-2); border-color: var(--ui-line); opacity: 1; }
.mxTranscribe.appBody .historyRow.current { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.appBody .historyRowIcon,
.mxTranscribe.appBody .historyRowIcon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 0;
  color: var(--ui-accent);
  background: var(--ui-accent-soft);
}
.appBody .historyRowIcon::before,
.appBody .historyFileIcon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 10v4M8 7v10M12 4v16M16 8v8M20 11v2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 10v4M8 7v10M12 4v16M16 8v8M20 11v2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mxTranscribe.appBody .historyRow.disabled .historyRowIcon { background: var(--ui-surface-3); color: var(--ui-faint); }
.appBody .historyRowText b { font-size: 14.5px; font-weight: 600; }
.mxTranscribe.appBody .historyRowText small { color: var(--ui-muted); font-size: 12.5px; }
.appBody .historyBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.appBody .historyBadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mxTranscribe.appBody .historyBadge.done { background: var(--ui-ok-soft); color: var(--ui-ok); }
.mxTranscribe.appBody .historyBadge.running { background: var(--ui-accent-soft); color: var(--ui-accent); }
.mxTranscribe.appBody .historyBadge.running::before { animation: mxBlink 1.2s ease-in-out infinite; }
.mxTranscribe.appBody .historyBadge.paused { background: var(--ui-warn-soft); color: var(--ui-warn); }
.mxTranscribe.appBody .historyBadge.failed { background: var(--ui-danger-soft); color: var(--ui-danger); }
.mxTranscribe.appBody .historyRowAction {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--ui-accent);
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.mxTranscribe.appBody .historyRowAction:empty { display: none; }
.mxTranscribe.appBody .historyRow:not(.disabled):hover .historyRowAction { background: var(--ui-accent-soft); }
.mxTranscribe.appBody .historyEmpty { padding: 28px 18px; border-radius: 14px; border: 1px dashed var(--ui-line-strong); color: var(--ui-muted); background: var(--ui-surface-2); }
.mxTranscribe.appBody .historyGuestLogin {
  display: inline-flex;
  padding: 11px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  font-weight: 600;
  box-shadow: 0 10px 22px -10px rgba(201, 100, 66, .6);
}

/* ================================================================ éditeur de transcription */
.mxTranscribe.appBody .transcriptionWorkspace {
  grid-template-columns: 256px minmax(480px, 1fr) 272px;
  grid-template-rows: 1fr 84px;
  background: var(--ui-bg);
  font-family: var(--ui-sans);
}
.mxTranscribe.appBody.workspaceOpen { background: var(--ui-bg); }

/* colonne gauche : même habillage que le menu latéral */
.mxTranscribe.appBody .workspaceLeft {
  position: relative;
  padding: 20px 14px 100px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  color: #f6f1e7;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(201, 100, 66, .28), transparent 55%),
    linear-gradient(165deg, #26201b 0%, #1a1714 60%, #14120f 100%);
}
.mxTranscribe.appBody .workspaceBrandRow { margin-bottom: 18px; padding: 0 4px; }
.mxTranscribe.appBody .workspaceBrand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fbf7ef;
  font-family: var(--ui-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .06em;
}
.mxTranscribe.appBody .workspaceLeft .iconButton {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: rgba(246, 241, 231, .8);
}
.mxTranscribe.appBody .iconButton svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mxTranscribe.appBody .workspaceLeft .iconButton:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.mxTranscribe.appBody .newTranscriptBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(201, 100, 66, .7), 0 1px 0 rgba(255, 255, 255, .22) inset;
  transition: transform .2s var(--ui-ease), filter .2s;
}
.mxTranscribe.appBody .newTranscriptBtn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.mxTranscribe.appBody .newTranscriptBtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mxTranscribe.appBody .usageCard {
  border-radius: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: #fbf7ef;
}
.mxTranscribe.appBody .usageCard strong { font-size: 15px; font-weight: 600; }
.mxTranscribe.appBody .usageCard span { color: rgba(246, 241, 231, .55); }
.mxTranscribe.appBody .usageBar { background: rgba(255, 255, 255, .1); }
.mxTranscribe.appBody .usageBar i { background: linear-gradient(90deg, #f0a07f, #c96442); }
.mxTranscribe.appBody .leftSectionTitle {
  margin: 18px 10px 6px;
  color: rgba(246, 241, 231, .4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.mxTranscribe.appBody .seeAllHistoryBtn { color: #f0a07f; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.mxTranscribe.appBody .leftNavItem {
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: rgba(246, 241, 231, .7);
  font-size: 14px;
}
.mxTranscribe.appBody .leftNavItem svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.mxTranscribe.appBody .leftNavItem:hover { background: rgba(255, 255, 255, .05); color: #fbf7ef; }
.mxTranscribe.appBody .leftNavItem.active { background: rgba(224, 133, 99, .14); color: #fbf7ef; }
.mxTranscribe.appBody .leftNavItem.active svg { stroke: #f0a07f; }
.mxTranscribe.appBody .historyItem {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border-radius: 10px;
  color: rgba(246, 241, 231, .78);
  transition: background .2s;
}
.mxTranscribe.appBody .historyItem small { color: rgba(246, 241, 231, .42); font-size: 11px; }
.mxTranscribe.appBody .historyItem b { font-size: 13px; font-weight: 500; }
.mxTranscribe.appBody .historyItem:hover { background: rgba(255, 255, 255, .05); }
.mxTranscribe.appBody .historyItem.current { background: rgba(224, 133, 99, .16); color: #fbf7ef; }
.mxTranscribe.appBody .historyFileIcon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0;
  background: rgba(255, 255, 255, .06);
  color: rgba(240, 160, 127, .9);
}
.mxTranscribe.appBody .historyFileIcon::before { width: 16px; height: 16px; }
.mxTranscribe.appBody .historyItem.current .historyFileIcon { background: linear-gradient(145deg, #e08a68, #b8532f); color: #fff; }

/* document central */
.mxTranscribe.appBody .workspaceCenter { padding: 30px 28px 130px; background: transparent; }
.mxTranscribe.appBody .documentPage {
  border-radius: 20px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  box-shadow: var(--ui-card-shadow);
  padding: 34px 44px 72px;
  animation: appRise .6s var(--ui-ease) both;
}
.mxTranscribe.appBody .documentHeader { gap: 18px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--ui-line); }
.mxTranscribe.appBody .documentHeader h1 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; color: var(--ui-text); }
.mxTranscribe.appBody .documentMeta { color: var(--ui-muted); font-size: 13px; }
.mxTranscribe.appBody .documentSearch {
  height: 40px;
  width: 200px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--ui-line-strong);
  background: var(--ui-surface-2);
  color: var(--ui-text);
  transition: border-color .2s, box-shadow .2s;
}
.mxTranscribe.appBody .documentSearch:focus { border-color: var(--ui-accent); box-shadow: var(--ui-ring); }
.mxTranscribe.appBody .backToHistoryBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 10px;
  border-radius: 11px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-text-2);
  font-weight: 600;
  box-shadow: var(--ui-btn-shadow);
}
.mxTranscribe.appBody .backToHistoryBtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mxTranscribe.appBody .backToHistoryBtn:hover { background: var(--ui-surface-2); border-color: var(--ui-line-strong); }
.mxTranscribe.appBody .saveStatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ui-ok-soft);
  color: var(--ui-ok);
  font-size: 12px;
  font-weight: 600;
}
.mxTranscribe.appBody .saveStatus::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mxTranscribe.appBody .saveStatus.dirty { background: var(--ui-warn-soft); color: var(--ui-warn); }
.mxTranscribe.appBody .transcriptDocument { font-size: 16px; line-height: 1.85; color: var(--ui-text-2); }
.mxTranscribe.appBody .inlineTimecode {
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--ui-surface-3);
  color: var(--ui-muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s;
}
.mxTranscribe.appBody .inlineTimecode:hover { background: var(--ui-accent-soft); color: var(--ui-accent); text-decoration: none; }
.mxTranscribe.appBody .inlineSegment { transition: background .25s; border-radius: 6px; }
.mxTranscribe.appBody .inlineSegment.active { background: var(--mxw-highlight); box-shadow: 0 0 0 3px var(--mxw-highlight); }
.mxTranscribe.appBody .inlineWord { transition: background .15s, color .15s; border-radius: 4px; }
.mxTranscribe.appBody .inlineWord:hover { background: var(--ui-accent-soft); color: var(--ui-accent); }
.mxTranscribe.appBody .inlineWord.playing { background: var(--ui-accent); color: #fff; box-shadow: 0 0 0 2px var(--ui-accent); }
.mxTranscribe.appBody .inlineEditable { outline-color: var(--ui-line-strong); background: var(--ui-surface-2); border-radius: 4px; }
.mxTranscribe.appBody .inlineEditable:focus { outline: 2px solid var(--ui-accent); background: var(--ui-surface); }

/* panneau droit : actions */
.mxTranscribe.appBody .workspaceRight { padding: 22px 14px 110px; border-left: 1px solid var(--ui-line); background: var(--ui-surface-2); }
.mxTranscribe.appBody .rightPanelInner h3 {
  margin: 4px 10px 10px;
  font-family: var(--ui-sans);
  color: var(--ui-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.mxTranscribe.appBody .sideAction {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: 11px;
  color: var(--ui-text-2);
  font-size: 14px;
  transition: background .2s, transform .2s var(--ui-ease);
}
.mxTranscribe.appBody .sideAction:hover { background: var(--ui-surface); box-shadow: 0 1px 2px rgba(20, 20, 19, .05); transform: translateX(2px); }
.mxTranscribe.appBody .sideAction b { font-weight: 600; }
.mxTranscribe.appBody .sideAction small { color: var(--ui-muted); font-size: 11.5px; }
.mxTranscribe.appBody .sideIcon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-text-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.mxTranscribe.appBody .sideIcon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mxTranscribe.appBody #pdfLink .sideIcon { color: #c2410c; background: #fff1e8; border-color: #fbd5bf; }
.mxTranscribe.appBody #docxLink .sideIcon { color: #2b5797; background: #edf3fc; border-color: #cddcf3; }
.mxTranscribe.appBody .sideAction:hover .sideIcon { border-color: var(--ui-line-strong); }
.mxTranscribe.appBody .sideIcon.aiIcon {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #e08a68, #b8532f);
  box-shadow: 0 6px 14px -6px rgba(201, 100, 66, .6);
}
.mxTranscribe.appBody .rightDivider { margin: 14px 8px; background: var(--ui-line); }
.mxTranscribe.appBody .sideToggle { padding: 9px 10px; color: var(--ui-text-2); font-size: 14px; }
.mxTranscribe.appBody .sideToggle input,
.mxTranscribe.appBody .followCompact input { accent-color: var(--ui-accent); }
.mxTranscribe.appBody .saveWideBtn {
  width: calc(100% - 8px);
  min-height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 22px -10px rgba(201, 100, 66, .6), 0 1px 0 rgba(255, 255, 255, .22) inset;
  transition: transform .2s var(--ui-ease), filter .2s;
}
.mxTranscribe.appBody .saveWideBtn:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* ================================================================ lecteur audio */
.mxTranscribe.appBody .bottomPlayer {
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 18px;
  padding: 10px 24px 10px 18px;
  border-top: 1px solid var(--ui-line);
  background: color-mix(in srgb, var(--ui-surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 -12px 32px -18px rgba(60, 45, 30, .25);
  color: var(--ui-text);
}
.playerTrack { display: flex; align-items: center; gap: 12px; min-width: 0; }
.playerArt {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: none;
  background: linear-gradient(145deg, #e08a68, #b8532f);
  box-shadow: 0 8px 18px -8px rgba(201, 100, 66, .7);
}
.playerArt i { width: 3px; height: 16px; border-radius: 2px; background: #fff; transform: scaleY(.45); transform-origin: center; transition: transform .3s; }
.playerArt i:nth-child(2) { height: 22px; }
.playerArt i:nth-child(3) { height: 18px; }
.playerArt i:nth-child(4) { height: 12px; }
.bottomPlayer.isPlaying .playerArt i { animation: appEq .9s ease-in-out infinite alternate; }
.bottomPlayer.isPlaying .playerArt i:nth-child(2) { animation-delay: -.3s; }
.bottomPlayer.isPlaying .playerArt i:nth-child(3) { animation-delay: -.6s; }
.bottomPlayer.isPlaying .playerArt i:nth-child(4) { animation-delay: -.15s; }
.mxTranscribe.appBody .playerTitle { padding: 0; font-size: 13.5px; font-weight: 600; color: var(--ui-text); }
.mxTranscribe.appBody .playerMainControls { gap: 12px; justify-content: flex-start; }
.mxTranscribe.appBody .playerIconButton {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ui-text-2);
  transition: background .2s, color .2s;
}
.mxTranscribe.appBody .playerIconButton svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mxTranscribe.appBody .playerIconButton i { position: absolute; font-style: normal; font-size: 8.5px; font-weight: 700; top: 50%; left: 50%; transform: translate(-50%, -40%); }
.mxTranscribe.appBody .playerIconButton:hover { background: var(--ui-surface-3); color: var(--ui-text); }
.mxTranscribe.appBody .playPauseButton {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  color: #fff;
  background: linear-gradient(180deg, var(--ui-grad-from), var(--ui-grad-to));
  box-shadow: 0 10px 22px -8px rgba(201, 100, 66, .7), 0 1px 0 rgba(255, 255, 255, .25) inset;
  transition: transform .2s var(--ui-ease), box-shadow .2s;
}
.mxTranscribe.appBody .playPauseButton::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13a1 1 0 0 0 1.5.86l10.5-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13a1 1 0 0 0 1.5.86l10.5-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mxTranscribe.appBody .playPauseButton[data-state="playing"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4.2' height='14' rx='1.3'/%3E%3Crect x='13.8' y='5' width='4.2' height='14' rx='1.3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4.2' height='14' rx='1.3'/%3E%3Crect x='13.8' y='5' width='4.2' height='14' rx='1.3'/%3E%3C/svg%3E");
}
.mxTranscribe.appBody .playPauseButton:hover { transform: scale(1.05); }
.mxTranscribe.appBody .playPauseButton:active { transform: scale(.96); }
.mxTranscribe.appBody .playPauseButton:focus-visible,
.mxTranscribe.appBody .playerIconButton:focus-visible { outline: none; box-shadow: var(--ui-ring); }
.mxTranscribe.appBody .playerTime { min-width: 40px; color: var(--ui-muted); font-size: 12px; font-weight: 500; text-align: center; }
.mxTranscribe.appBody .volumeGlyph { display: grid; place-items: center; color: var(--ui-muted); margin-left: 6px; }
.mxTranscribe.appBody .volumeGlyph svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* curseurs (lecture et volume) */
.mxTranscribe.appBody .seekSlider,
.mxTranscribe.appBody .volumeSlider {
  --fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ui-accent) 0 var(--fill), var(--ui-surface-3) var(--fill) 100%);
  cursor: pointer;
  outline: none;
}
.mxTranscribe.appBody .seekSlider { max-width: none; }
.mxTranscribe.appBody .volumeSlider { width: 92px; flex: none; }
.mxTranscribe.appBody .seekSlider::-webkit-slider-thumb,
.mxTranscribe.appBody .volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ui-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform .15s;
}
.mxTranscribe.appBody .seekSlider:hover::-webkit-slider-thumb,
.mxTranscribe.appBody .volumeSlider:hover::-webkit-slider-thumb { transform: scale(1.15); }
.mxTranscribe.appBody .seekSlider::-moz-range-thumb,
.mxTranscribe.appBody .volumeSlider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ui-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.mxTranscribe.appBody .seekSlider:focus-visible,
.mxTranscribe.appBody .volumeSlider:focus-visible { box-shadow: var(--ui-ring); }
.mxTranscribe.appBody .rateSelect {
  width: auto;
  min-height: 34px;
  height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-line);
  background-color: var(--ui-surface-2);
  color: var(--ui-text);
  font-size: 13px;
  font-weight: 600;
}
.mxTranscribe.appBody .followCompact { color: var(--ui-muted); font-size: 12.5px; font-weight: 500; }

/* ================================================================ fenêtres (IA, traduction, compte) */
.mxTranscribe.appBody .aiDialog,
.mxTranscribe.appBody .translationDialog,
.mxTranscribe.appBody .accountFinishDialog {
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45);
}
.mxTranscribe.appBody dialog[open] { animation: appPop .35s var(--ui-ease) both; }
.mxTranscribe.appBody dialog::backdrop { background: rgba(20, 18, 15, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.mxTranscribe.appBody .aiDialog .iconButton,
.mxTranscribe.appBody .translationDialog .iconButton {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ui-surface-3);
  color: var(--ui-text-2);
  font-size: 20px;
}
.mxTranscribe.appBody .aiDialog textarea { border-radius: 14px; background: var(--ui-surface-2); border-color: var(--ui-line); }

/* ================================================================ animations */
@keyframes appRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes appPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes appDrift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, -30px, 0) scale(1.12); } }
@keyframes appShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes appEq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .appBody *, .appBody *::before, .appBody *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ================================================================ tablettes */
@media (max-width: 1180px) {
  .mxTranscribe.appBody .transcriptionWorkspace { grid-template-columns: 220px minmax(420px, 1fr) 240px; }
  .mxTranscribe.appBody .bottomPlayer { grid-template-columns: 200px minmax(0, 1fr); }
  .mxTranscribe.appBody .documentPage { padding: 28px 30px 60px; }
}
@media (max-width: 1024px) {
  :root { --ui-sidebar: 232px; }
  .appBody .page.transcribePage, .appBody .appPage { width: calc(100% - 40px); }
}

/* ================================================================ mobile : menu en tiroir */
@media (max-width: 900px) {
  .appShell { display: block; }
  .appSidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform .35s var(--ui-ease);
    box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .5);
  }
  .appSidebarOpen .appSidebar { transform: none; }
  .appSidebarClose { display: grid; }
  .appScrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(20, 18, 15, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .appSidebarOpen .appScrim { opacity: 1; pointer-events: auto; }
  .appSidebarOpen { overflow: hidden; }
  .appMenuBtn { display: grid; }
  .appBody .appTopbar { flex-wrap: wrap; gap: 12px; }
  .appBody .appTopbar .topbarActions { width: 100%; justify-content: flex-start; flex-direction: row; align-items: center; }
  .appBody .appTopbar .languageControl { flex: 1; min-width: 0; }
  .appBody .appTopbar .languageControl select { min-width: 0; width: 100%; }
}

@media (max-width: 820px) {
  .mxTranscribe.appBody .transcriptionWorkspace { display: block; background: var(--ui-bg); }
  .mxTranscribe.appBody .workspaceCenter { padding: 14px 12px 20px; }
  .mxTranscribe.appBody .documentPage { padding: 22px 18px 40px; border-radius: 18px; min-height: 60vh; }
  .mxTranscribe.appBody .documentHeaderActions { gap: 8px; }
  .mxTranscribe.appBody .documentSearch { flex: 1; width: auto; min-width: 0; }
  .mxTranscribe.appBody .workspaceRight { padding: 16px 12px 130px; border-left: 0; border-top: 1px solid var(--ui-line); background: var(--ui-surface-2); }
  .mxTranscribe.appBody .bottomPlayer {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--ui-line);
    border-radius: 20px;
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35);
  }
  .mxTranscribe.appBody .playerArt { width: 30px; height: 30px; border-radius: 9px; gap: 2px; }
  .mxTranscribe.appBody .playerArt i { width: 2px; }
  .mxTranscribe.appBody .playerTitle { text-align: left; font-size: 12.5px; }
  .mxTranscribe.appBody .playerMainControls { gap: 6px; }
  .mxTranscribe.appBody .playPauseButton { width: 42px; height: 42px; }
  .mxTranscribe.appBody .playerIconButton { width: 32px; height: 32px; }
  .mxTranscribe.appBody .playerTime { min-width: 34px; font-size: 11px; }
  .mxTranscribe.appBody .seekSlider { min-width: 0; }
  .mxTranscribe.appBody .rateSelect { padding: 0 20px 0 6px; }
}

@media (max-width: 640px) {
  .appBody .page.transcribePage, .appBody .appPage { width: calc(100% - 24px); padding-top: 14px; }
  .appBody .appTopbar .subtitle { font-size: 21px; }
  .appBody .appTopbar .pill { flex: none; }
  .appStats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .appStat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px 12px; border-radius: 16px; }
  .appStatIcon { width: 34px; height: 34px; border-radius: 10px; }
  .appStatIcon svg { width: 17px; height: 17px; }
  .appStatText b { font-size: 20px; }
  .appStatText small { font-size: 12px; }
  .appBody .mxStudio { padding: 20px 16px; }
  .appBody .historyCard { padding: 20px 14px; }
  .appBody .historyCard h2 { font-size: 22px; }
  .appSearch { width: 100%; }
  .appBody .historyRow,
  .mxTranscribe.appBody .historyRow { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; padding: 11px 12px 11px 11px; }
  .appBody .historyRowIcon, .mxTranscribe.appBody .historyRowIcon { width: 38px; height: 38px; }
  .mxTranscribe.appBody .historyRowAction { display: none; }
}

/* ================================================================ ajustements */
.mxTranscribe.appBody .leftNavItem { justify-content: flex-start; text-align: left; }
.mxTranscribe.appBody .newTranscriptBtn { padding: 0 14px; white-space: nowrap; font-size: 14px; }
.mxTranscribe.appBody .sideToggle span { font-weight: 500; }
@media (max-width: 900px) {
  .appSidebar { box-shadow: none; visibility: hidden; transition: transform .35s var(--ui-ease), visibility 0s .35s; }
  .appSidebarOpen .appSidebar { box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .5); visibility: visible; transition: transform .35s var(--ui-ease); }
  .appBody .appTopbar.topbar,
  .appBody .appTopbar { flex-direction: row; align-items: center; }
  .appBody .appTopbar .appTopbarTitle { flex: 1 1 calc(100% - 60px); }
  .appBody .appTopbar .topbarActions { flex-wrap: nowrap; }
  .appBody .appTopbar .languageControl { flex: 1 1 auto; }
  .appBody .appTopbar .pill { min-width: 0; max-width: 52%; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 640px) {
  .appBody .appTopbar .languageControl > span { display: none; }
  .appBody .appTopbar .languageControl { padding-left: 4px; }
}
@media (max-width: 820px) {
  .mxTranscribe.appBody .bottomPlayer { background: var(--ui-surface); }
  .mxTranscribe.appBody .volumeGlyph,
  .mxTranscribe.appBody .volumeSlider,
  .mxTranscribe.appBody .followCompact { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mxTranscribe.appBody #pdfLink .sideIcon { color: #f3a27c; background: rgba(224, 133, 99, .12); border-color: rgba(224, 133, 99, .3); }
  :root:not([data-theme="light"]) .mxTranscribe.appBody #docxLink .sideIcon { color: #9dbdf0; background: rgba(120, 160, 230, .12); border-color: rgba(120, 160, 230, .3); }
}
:root[data-theme="dark"] .mxTranscribe.appBody #pdfLink .sideIcon { color: #f3a27c; background: rgba(224, 133, 99, .12); border-color: rgba(224, 133, 99, .3); }
:root[data-theme="dark"] .mxTranscribe.appBody #docxLink .sideIcon { color: #9dbdf0; background: rgba(120, 160, 230, .12); border-color: rgba(120, 160, 230, .3); }
