/* ============================================================
   MAMOUSSO V49 — design « blanc, noir, accent cuivre » (maquette du 5 novembre 2026).
   Chargé EN DERNIER sur chaque page : il ne change que l'apparence (couleurs, polices,
   formes, animations). Aucun identifiant, attribut ou comportement n'est modifié.
   - fond blanc, texte noir encre, gris chauds pour le secondaire ;
   - un seul accent cuivre (#c2410c), gardé pour le solde, les tâches en cours,
     le mot mis en valeur des titres et le micro ;
   - boutons principaux en noir plein, sans dégradé ni ombre colorée ;
   - Geist (texte), Instrument Serif italique (un mot des titres), Geist Mono (chiffres) ;
   - animations courtes, coupées si l'appareil demande moins de mouvement.
   ============================================================ */

:root {
  --ui-sans: Geist, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ui-display-serif: "Instrument Serif", Georgia, ui-serif, serif;
  --ui-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ui-serif: var(--ui-sans);
  --ui-ease: cubic-bezier(.23, 1, .32, 1);

  --ui-bg: #ffffff;
  --ui-surface: #ffffff;
  --ui-surface-2: #fafaf9;
  --ui-surface-3: #f5f5f4;
  --ui-text: #0c0a09;
  --ui-text-2: #292524;
  --ui-muted: #57534e;
  --ui-faint: #78716c;
  --ui-line: #e7e5e4;
  --ui-line-strong: #d6d3d1;
  --ui-accent: #c2410c;
  --ui-accent-hover: #9a3412;
  --ui-accent-soft: #fff1e8;
  --ui-ink: #0c0a09;
  --ui-ink-hover: #292524;
  --ui-on-ink: #ffffff;
  --ui-grad-from: #0c0a09;
  --ui-grad-to: #0c0a09;
  --ui-ring: 0 0 0 3px rgba(12, 10, 9, .12);
  --ui-glow-1: transparent;
  --ui-glow-2: transparent;
  --ui-dots: transparent;
  --ui-highlight: #fde3cf;
  --ui-card-shadow: 0 1px 2px rgba(12, 10, 9, .04);
  --ui-hover-shadow: 0 1px 2px rgba(12, 10, 9, .04), 0 12px 32px -16px rgba(12, 10, 9, .18);
  --ui-btn-shadow: none;
  --ui-sidebar: 248px;

  --sh-side-bg: #fafaf9;
  --sh-side-line: #e7e5e4;
  --sh-side-text: #44403c;
  --sh-side-muted: #78716c;
  --sh-side-hover: #f0efee;
  --sh-wallet-bg: #ffffff;
  --sh-wallet-line: #e7e5e4;
  --sh-avatar-from: #0c0a09;
  --sh-avatar-to: #0c0a09;

  --mx-bg: #ffffff;
  --mx-surface: #ffffff;
  --mx-surface-2: #fafaf9;
  --mx-surface-3: #f5f5f4;
  --mx-text: #0c0a09;
  --mx-muted: #57534e;
  --mx-line: #e7e5e4;
  --mx-line-strong: #d6d3d1;
  --mx-accent: #c2410c;
  --mx-accent-soft: #fff1e8;
  --mx-grad-from: #0c0a09;
  --mx-grad-to: #0c0a09;
  --mx-wave: #c2410c;
  --mx-wave-idle: rgba(194, 65, 12, .16);
  --mx-shadow: 0 1px 2px rgba(12, 10, 9, .04);
  --mx-ring: 0 0 0 3px rgba(12, 10, 9, .12);

  --au-sans: var(--ui-sans);
  --au-serif: var(--ui-sans);
  --au-bg: #ffffff;
  --au-surface: #ffffff;
  --au-surface-2: #fafaf9;
  --au-surface-3: #f5f5f4;
  --au-text: #0c0a09;
  --au-text-2: #292524;
  --au-muted: #57534e;
  --au-faint: #78716c;
  --au-line: #e7e5e4;
  --au-line-strong: #d6d3d1;
  --au-accent: #c2410c;
  --au-accent-hover: #9a3412;
  --au-accent-soft: #fff1e8;
  --au-grad-from: #0c0a09;
  --au-grad-to: #0c0a09;
  --au-ring: 0 0 0 3px rgba(12, 10, 9, .12);
  --au-card-shadow: 0 1px 2px rgba(12, 10, 9, .04), 0 24px 48px -32px rgba(12, 10, 9, .18);
  --au-btn-shadow: none;
  --au-glow-1: transparent;
  --au-glow-2: transparent;
  --au-dots: transparent;
}

/* thème sombre : noir profond, texte clair ; le bouton principal devient blanc */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ui-bg: #0c0a09; --ui-surface: #141210; --ui-surface-2: #1c1917; --ui-surface-3: #292524;
    --ui-text: #fafaf9; --ui-text-2: #e7e5e4; --ui-muted: #a8a29e; --ui-faint: #8a837d;
    --ui-line: #292524; --ui-line-strong: #3a3532;
    --ui-accent: #fb923c; --ui-accent-hover: #fdba74; --ui-accent-soft: rgba(251, 146, 60, .12);
    --ui-ink: #fafaf9; --ui-ink-hover: #e7e5e4; --ui-on-ink: #0c0a09;
    --ui-grad-from: #fafaf9; --ui-grad-to: #fafaf9;
    --ui-ring: 0 0 0 3px rgba(250, 250, 249, .16);
    --ui-glow-1: transparent; --ui-glow-2: transparent; --ui-dots: transparent;
    --ui-highlight: rgba(251, 146, 60, .25);
    --ui-card-shadow: none; --ui-hover-shadow: 0 0 0 1px #3a3532; --ui-btn-shadow: none;
    --sh-side-bg: #0c0a09; --sh-side-line: #292524; --sh-side-text: #d6d3d1; --sh-side-muted: #8a837d;
    --sh-side-hover: #1c1917; --sh-wallet-bg: #141210; --sh-wallet-line: #292524;
    --sh-avatar-from: #fafaf9; --sh-avatar-to: #fafaf9;
    --mx-bg: #0c0a09; --mx-surface: #141210; --mx-surface-2: #1c1917; --mx-surface-3: #292524;
    --mx-text: #fafaf9; --mx-muted: #a8a29e; --mx-line: #292524; --mx-line-strong: #3a3532;
    --mx-accent: #fb923c; --mx-accent-soft: rgba(251, 146, 60, .12);
    --mx-grad-from: #fafaf9; --mx-grad-to: #fafaf9; --mx-wave: #fb923c; --mx-wave-idle: rgba(251, 146, 60, .16);
    --mx-shadow: none; --mx-ring: 0 0 0 3px rgba(250, 250, 249, .16);
    --au-bg: #0c0a09; --au-surface: #141210; --au-surface-2: #1c1917; --au-surface-3: #292524;
    --au-text: #fafaf9; --au-text-2: #e7e5e4; --au-muted: #a8a29e; --au-faint: #8a837d;
    --au-line: #292524; --au-line-strong: #3a3532;
    --au-accent: #fb923c; --au-accent-hover: #fdba74; --au-accent-soft: rgba(251, 146, 60, .12);
    --au-grad-from: #fafaf9; --au-grad-to: #fafaf9; --au-ring: 0 0 0 3px rgba(250, 250, 249, .16);
    --au-card-shadow: none; --au-glow-1: transparent; --au-glow-2: transparent; --au-dots: transparent;
  }
}
:root[data-theme="dark"] {
  --ui-bg: #0c0a09; --ui-surface: #141210; --ui-surface-2: #1c1917; --ui-surface-3: #292524;
  --ui-text: #fafaf9; --ui-text-2: #e7e5e4; --ui-muted: #a8a29e; --ui-faint: #8a837d;
  --ui-line: #292524; --ui-line-strong: #3a3532;
  --ui-accent: #fb923c; --ui-accent-hover: #fdba74; --ui-accent-soft: rgba(251, 146, 60, .12);
  --ui-ink: #fafaf9; --ui-ink-hover: #e7e5e4; --ui-on-ink: #0c0a09;
  --ui-grad-from: #fafaf9; --ui-grad-to: #fafaf9;
  --ui-ring: 0 0 0 3px rgba(250, 250, 249, .16);
  --ui-glow-1: transparent; --ui-glow-2: transparent; --ui-dots: transparent;
  --ui-highlight: rgba(251, 146, 60, .25);
  --ui-card-shadow: none; --ui-hover-shadow: 0 0 0 1px #3a3532; --ui-btn-shadow: none;
  --sh-side-bg: #0c0a09; --sh-side-line: #292524; --sh-side-text: #d6d3d1; --sh-side-muted: #8a837d;
  --sh-side-hover: #1c1917; --sh-wallet-bg: #141210; --sh-wallet-line: #292524;
  --sh-avatar-from: #fafaf9; --sh-avatar-to: #fafaf9;
  --mx-bg: #0c0a09; --mx-surface: #141210; --mx-surface-2: #1c1917; --mx-surface-3: #292524;
  --mx-text: #fafaf9; --mx-muted: #a8a29e; --mx-line: #292524; --mx-line-strong: #3a3532;
  --mx-accent: #fb923c; --mx-accent-soft: rgba(251, 146, 60, .12);
  --mx-grad-from: #fafaf9; --mx-grad-to: #fafaf9; --mx-wave: #fb923c; --mx-wave-idle: rgba(251, 146, 60, .16);
  --mx-shadow: none; --mx-ring: 0 0 0 3px rgba(250, 250, 249, .16);
  --au-bg: #0c0a09; --au-surface: #141210; --au-surface-2: #1c1917; --au-surface-3: #292524;
  --au-text: #fafaf9; --au-text-2: #e7e5e4; --au-muted: #a8a29e; --au-faint: #8a837d;
  --au-line: #292524; --au-line-strong: #3a3532;
  --au-accent: #fb923c; --au-accent-hover: #fdba74; --au-accent-soft: rgba(251, 146, 60, .12);
  --au-grad-from: #fafaf9; --au-grad-to: #fafaf9; --au-ring: 0 0 0 3px rgba(250, 250, 249, .16);
  --au-card-shadow: none; --au-glow-1: transparent; --au-glow-2: transparent; --au-dots: transparent;
}

/* ================================================================ base */
body { font-family: var(--ui-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "ss01", "cv11"; }
.appBody { background: var(--ui-bg); }
.appMain::before, .appMain::after { display: none; }
.appBody ::selection { background: var(--ui-highlight); color: var(--ui-text); }

/* titres : Geist moyen, serrés ; un mot en italique à empattements et en cuivre */
.appBody h1, .appBody h2, .appBody h3 { font-family: var(--ui-sans); font-weight: 600; letter-spacing: -.025em; color: var(--ui-text); }
.appBody h1 { font-weight: 500; letter-spacing: -.035em; }
.appBody .appTopbar .subtitle { font-weight: 600; letter-spacing: -.025em; }
.homeHero h1 em, .tvTitle em, .appBody h1 em {
  font-family: var(--ui-display-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--ui-accent);
}

/* chiffres : chasse fixe, alignés */
.appWalletAmount, .crBalance, .homeStat strong, .statValue, .appBody time,
.appBody [class*="Duration"], .appBody [class*="Count"] { font-variant-numeric: tabular-nums; }

/* ================================================================ menu latéral */
.appLogo { font-weight: 600; font-size: 15px; letter-spacing: .14em; }
.appLogoMark { color: var(--ui-text); }
.appNavItem { min-height: 40px; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 450; color: var(--sh-side-text); transition: background-color .15s ease, color .15s ease; }
.appNavItem svg { width: 17px; height: 17px; }
.appNavItem.isActive {
  background: var(--ui-surface);
  color: var(--ui-text);
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(12, 10, 9, .05);
}
.appNavItem.isActive svg { stroke: var(--ui-text); }
.appNavItem:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; box-shadow: none; }
.appNavLabel { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-side-muted); }

.appWallet { border-radius: 12px; padding: 14px; }
.appWalletHead { font-size: 12px; font-weight: 500; color: var(--ui-muted); }
.appWalletIcon { display: none; }
.appWalletAmount { margin-top: 2px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.appWalletBtn {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--ui-accent-soft);
  color: var(--ui-accent-hover);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}
.appWalletBtn:hover { filter: none; transform: none; background: #ffe4d1; }
.appWalletBtn:active { transform: scale(.97); }

/* ================================================================ barre du haut */
.appBody .appTopbar { border-bottom: 1px solid var(--ui-line); }
.appSearch { height: 38px; border-radius: 8px; background: var(--ui-surface-2); box-shadow: none; }
.appSearch:focus-within { border-color: var(--ui-text); box-shadow: var(--ui-ring); background: var(--ui-surface); }
.appAccount > summary { height: 38px; padding: 0 10px 0 4px; border-radius: 8px; font-weight: 500; box-shadow: none; }
.appAccountAvatar { width: 28px; height: 28px; border-radius: 6px; background: var(--ui-ink); color: var(--ui-on-ink); font-size: 12px; font-weight: 600; }
.appAccountMenu { border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(12, 10, 9, .25); animation: themePop .18s var(--ui-ease) both; transform-origin: top right; }
.appAccountMenu a { border-radius: 6px; }
.appAccountMenu a:hover, .appAccountMenu a:focus-visible { background: var(--ui-surface-3); color: var(--ui-text); }

/* ================================================================ boutons : noir plein, aucun dégradé ni halo */
.appBody .dbPrimary, .homeBtnPrimary, .crBtnPrimary, .appBody .tvPrimary,
.appBody button.primary, .appBody .btnPrimary, .appBody .primaryBtn {
  background: var(--ui-ink) !important;
  color: var(--ui-on-ink) !important;
  box-shadow: none !important;
  filter: none !important;
}
.appBody .dbPrimary:hover, .homeBtnPrimary:hover, .crBtnPrimary:hover { background: var(--ui-ink-hover) !important; }
.homeBtn { border-radius: 9px; padding: 10px 16px; font-size: 14px; font-weight: 500; }
.homeBtn:hover { transform: none; }
.homeBtnSoft { background: var(--ui-surface); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-line-strong); }
.homeBtnSoft:hover { background: var(--ui-surface-2); }
.appBody button, .appBody .homeBtn, .appBody .homeOpen, .appWalletBtn, .crBtn, .authSubmit, .authBtn {
  transition: transform .16s var(--ui-ease), background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.appBody button:active:not(:disabled), .appBody .homeBtn:active, .appBody .homeOpen:active, .crBtn:active { transform: scale(.97); }

/* ================================================================ cartes : trait fin, ombre quasi nulle, rayons 8 / 12 / 16 */
.homeAction, .homeList, .homeFeature, .crCard, .appBody .card, .appBody .panel { border-radius: 16px; box-shadow: var(--ui-card-shadow); }
.homeAction { padding: 28px; gap: 10px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ui-ease); }
.homeAction:hover { transform: translateY(-1px); border-color: var(--ui-line-strong); box-shadow: var(--ui-hover-shadow); }
.homeActions > .homeAction:first-child .homeActionIcon { background: var(--ui-ink); color: var(--ui-on-ink); }
.homeActionIcon { width: 40px; height: 40px; border-radius: 10px; }
.homeActionIcon svg { width: 19px; height: 19px; }
.homeAction h2 { font-size: 20px; }
.homeAction p { color: var(--ui-muted); font-size: 14px; line-height: 1.6; }
.homeBadge { padding: 0; background: none; color: var(--ui-muted); font-size: 13px; font-weight: 450; }
.homeHero h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; }
.homeList { border-radius: 12px; }
.homeRow { padding: 12px 16px; transition: background-color .15s ease; }
.homeRow:hover { background: var(--ui-surface-2); }
.homeRowIcon { border-radius: 8px; }
.homeStatus { background: none !important; padding: 0; font-weight: 450; color: var(--ui-text-2); }
.homeStatus::before { background: #15803d; }
.homeStatus.isBusy { color: var(--ui-accent-hover); }
.homeStatus.isBusy::before { background: var(--ui-accent); }
.homeStatus.isError::before { background: var(--ui-danger, #b42318); }
.homeStatus.isMuted::before { background: var(--ui-faint); }
.homeBar { height: 4px; }
.homeBar i { background: var(--ui-accent); }
.homeOpen { border-radius: 8px; font-weight: 500; }
.homeOpen:hover, .homeOpen:focus-visible { border-color: var(--ui-text); color: var(--ui-text); }
.homeRecentHead h2 { font-size: 15px; }
.homeRecentHead a { color: var(--ui-muted); font-weight: 450; }
.homeRecentHead a:hover { color: var(--ui-text); }
.homeEmpty a, .homeQuery a { color: var(--ui-text); }
.homeFeatures { gap: 0; border-top: 1px solid var(--ui-line); padding-top: 24px; }
.homeFeature { border: 0; background: none; box-shadow: none; padding: 0 24px 0 0; }
.homeFeature svg { width: 20px; height: 20px; stroke: var(--ui-text); }

/* ================================================================ pages Transcription et Texte en audio */
.mxTranscribe.appBody .usageBar i { background: var(--ui-accent); }
.mxTranscribe.appBody .historyItem.current .historyFileIcon { background: var(--ui-ink); color: var(--ui-on-ink); }

/* ================================================================ crédits */
.crHero, .crBalanceCard { background: var(--ui-surface) !important; }

/* ================================================================ connexion et inscription */
.authAside { background: #0c0a09; color: #fafaf9; }
.authAside::before, .authAsideGlow { display: none; }
.authAside h1, .authAside h2 { font-family: var(--ui-sans); font-weight: 500; letter-spacing: -.035em; }
.authAside h1 em, .authAside h2 em { font-family: var(--ui-display-serif); font-weight: 400; color: #fb923c; letter-spacing: -.01em; }
.authCard h1, .authCard h2 { font-family: var(--ui-sans); font-weight: 600; letter-spacing: -.025em; }

/* ================================================================ animations discrètes */
@keyframes themeRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes themePop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
.homeHero, .homeActions > *, .homeRecent, .homeFeatures, .crCard, .authCard {
  animation: themeRise .5s var(--ui-ease) both;
}
.homeActions > *:nth-child(1) { animation-delay: .04s; }
.homeActions > *:nth-child(2) { animation-delay: .08s; }
.homeRecent { animation-delay: .12s; }
.homeFeatures { animation-delay: .16s; }

/* focus visible net partout */
.appBody a:focus-visible, .appBody button:focus-visible, .appBody summary:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .homeAction:hover { transform: none; }
}

@media (max-width: 640px) {
  .homeFeature { padding: 0 0 16px; }
  .homeHero h1 { font-size: 34px; }
}

/* ================================================================ retouches après captures */
/* surtitre : gris discret au lieu de l'orange en capitales */
.appEyebrow { color: var(--ui-muted); font-weight: 500; letter-spacing: .04em; }
.appEyebrow::before { background: var(--ui-accent); box-shadow: none; }
.appBody .appTopbar { border-bottom: 0; }

/* Transcription : cartes neutres, bouton secondaire en contour, icônes sobres */
.trAction { border-radius: 16px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ui-ease); }
.trAction:hover { transform: translateY(-1px); border-color: var(--ui-line-strong); }
.trActionMain { border-color: var(--ui-line); background: var(--ui-surface); }
.trActionIcon { width: 40px; height: 40px; border-radius: 10px; background: var(--ui-surface-3); color: var(--ui-text); }
.trActionIcon svg { width: 19px; height: 19px; }
.trActionMain .trActionIcon { background: var(--ui-ink); color: var(--ui-on-ink); }
.mxTranscribe .trAction h2 { font-weight: 600; }
.mxTranscribe .trBtn { border-radius: 9px; font-weight: 500; }
.mxTranscribe .trBtnSoft, .mxTranscribe #libNewFolderBtn { background: var(--ui-surface); color: var(--ui-text); box-shadow: inset 0 0 0 1px var(--ui-line-strong); }
.mxTranscribe .trBtnSoft:hover, .mxTranscribe #libNewFolderBtn:hover { background: var(--ui-surface-2); }
.trBack:hover { color: var(--ui-text); }
.trGuideBtn svg { color: var(--ui-text); }
.trGuideBtn:hover, .trGuideBtn[aria-expanded="true"] { border-color: var(--ui-text); }
.libFolder.isActive { background: var(--ui-surface-3); }
.libFolder.isActive svg, .libFolder.isActive .libFolderCount { color: var(--ui-text); }

/* Texte en audio : sélection en noir, l'accent reste pour l'écoute */
.ttsVoice.isSelected, .ttsEngine.isSelected { border-color: var(--ui-text); background: var(--ui-surface); box-shadow: 0 0 0 1px var(--ui-text); }
.ttsMini.isActive, .ttsChip.isActive, .ttsFilter.isActive, .ttsEngine.isSelected .ttsEngineCheck { background: var(--ui-ink); border-color: var(--ui-ink); color: var(--ui-on-ink); }
.ttsCreate .ttsLangTabs .ttsFilter.isActive { background: var(--ui-surface); color: var(--ui-text); box-shadow: 0 1px 2px rgba(12, 10, 9, .08), 0 0 0 1px var(--ui-line); }
.ttsTab.isActive svg { color: var(--ui-text); }

/* Connexion : panneau noir, carte blanche à trait fin */
.authCard::before { display: none; }
.authCard { border: 1px solid var(--au-line); }
.authLogoMark { box-shadow: none; }
.authPitch h2 { font-family: var(--ui-sans); font-weight: 500; letter-spacing: -.035em; color: #fafaf9; }
.authPitch h2 em { font-family: var(--ui-display-serif); font-weight: 400; background: none; color: #fb923c; letter-spacing: -.01em; }
.authPreview { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .08); box-shadow: none; }
.authCta { background: var(--au-surface-2); border-color: var(--au-line); }
.authLink, .authSwitch a { color: var(--au-text); }
.authStep.isActive b { background: var(--au-text); border-color: var(--au-text); color: var(--au-bg); box-shadow: none; }

/* boutons et pastilles pleins : plus de halo orangé ni de dégradé, noir (blanc en thème sombre) */
.mxTranscribe .trBtnPrimary, .appNewBtn, .mxTranscribe.appBody .mxPrimary, .appBody .primary,
.mxTranscribe.appBody .historyGuestLogin, .mxTranscribe.appBody .newTranscriptBtn, .mxTranscribe.appBody .saveWideBtn,
.mxTranscribe.appBody .playPauseButton, .profileBody .accountPrimaryBtn, .libBtnPrimary, .authPrimaryBtn {
  background: var(--ui-ink);
  color: var(--ui-on-ink);
  box-shadow: none;
  filter: none;
}
.mxTranscribe .trBtnPrimary:hover, .appNewBtn:hover, .appBody .primary:hover, .libBtnPrimary:hover, .authPrimaryBtn:hover {
  background: var(--ui-ink-hover); box-shadow: none; filter: none; transform: none;
}
.authPrimaryBtn:focus-visible { box-shadow: var(--au-ring); }
.mxTranscribe .trBtn:hover { transform: none; }
.appUserAvatar, .profileAvatar, .mxTranscribe.appBody .sideIcon.aiIcon, .playerArt { box-shadow: none; }
.appLogoMark { box-shadow: none; }

/* ================================================================ V50 — fenêtre « Transcrire des fichiers »
   Composition revue : en-tête compact, onglets Fichier / Lien, zone d'import basse, langue sur
   une ligne, trois modes sobres, paramètres repliés, bouton « TRANSCRIRE » toujours visible.
   Seule l'apparence change : mêmes champs, mêmes identifiants, même envoi. */
body.mxTranscribe .upDialog {
  width: min(600px, calc(100vw - 32px));
  max-height: min(860px, calc(100dvh - 32px));
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: var(--ui-surface);
  box-shadow: 0 1px 2px rgba(12, 10, 9, .06), 0 32px 64px -24px rgba(12, 10, 9, .35);
}
body.mxTranscribe .upDialog[open] { animation: upV50In .28s var(--ui-ease) both; }
body.mxTranscribe .upDialog::backdrop { background: rgba(12, 10, 9, .4); backdrop-filter: blur(2px); animation: upV50Fade .2s ease both; }
@keyframes upV50In { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes upV50Fade { from { opacity: 0; } to { opacity: 1; } }
body.mxTranscribe.appBody .upBox, body.mxTranscribe .upBox { padding: 0 20px 20px; background: var(--ui-surface); overflow-x: hidden; }

/* en-tête */
body.mxTranscribe .upDialog .upHead { margin: 0 -20px 16px; padding: 14px 12px 14px 20px; gap: 10px; border-bottom: 1px solid var(--ui-line); background: var(--ui-surface); }
body.mxTranscribe .upDialog .upHead h2 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
body.mxTranscribe .upDialog .upHead .mxStatus { padding: 3px 9px; font-size: 12px; font-weight: 500; border: 1px solid var(--ui-line); background: var(--ui-surface-2); box-shadow: none; }
body.mxTranscribe .upDialog .upClose { width: 34px; height: 34px; border-radius: 8px; }
body.mxTranscribe .upDialog .upClose svg { width: 18px; height: 18px; }

/* onglets Fichier / Lien */
.upSrc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 10px; background: var(--ui-surface-3); }
.upSrcTab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 7px; background: transparent; color: var(--ui-muted);
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.upSrcTab svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upSrcTab:hover { color: var(--ui-text); }
.upSrcTab[aria-selected="true"] { background: var(--ui-surface); color: var(--ui-text); box-shadow: 0 1px 2px rgba(12, 10, 9, .08), 0 0 0 1px var(--ui-line); }
.upPane[hidden] { display: none !important; }
.upPane { animation: upV50Fade .2s ease both; }

/* zone d'import : basse ; une fois un fichier choisi, une simple ligne « Ajouter d'autres fichiers » */
body.mxTranscribe .upDialog .upDrop {
  min-height: 0; flex-direction: column; gap: 4px; padding: 20px 16px;
  border: 1.5px dashed var(--ui-line-strong); border-radius: 12px; background: var(--ui-surface-2); box-shadow: none;
  transition: border-color .2s ease, background-color .2s ease;
}
body.mxTranscribe .upDialog .upDrop:hover, body.mxTranscribe .upDialog .upDrop.isDragging { border-color: var(--ui-faint); background: var(--ui-surface); }
body.mxTranscribe .upDialog .upDrop .mxDropIcon {
  display: grid; place-items: center; width: 32px; height: 32px; margin: 0 0 6px; border-radius: 9px;
  background: var(--ui-ink); color: var(--ui-on-ink); box-shadow: none;
}
body.mxTranscribe .upDialog .upDrop .mxDropIcon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.mxTranscribe .upDialog .upDrop strong { font-size: 14px; font-weight: 600; color: var(--ui-text); }
body.mxTranscribe .upDialog .upDrop > span:not(.mxDropIcon) {
  max-width: 100%; font-size: 12px; color: var(--ui-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.mxTranscribe .upDialog .upDrop .upDropMulti { display: none; }
body.mxTranscribe .upDialog .upDrop.hasFile { flex-direction: row; justify-content: center; gap: 8px; padding: 10px 14px; background: transparent; }
body.mxTranscribe .upDialog .upDrop.hasFile .mxDropIcon { width: 22px; height: 22px; margin: 0; border-radius: 6px; background: var(--ui-surface-3); color: var(--ui-text); }
body.mxTranscribe .upDialog .upDrop.hasFile .mxDropIcon svg { width: 13px; height: 13px; }
body.mxTranscribe .upDialog .upDrop.hasFile strong { font-size: 13.5px; font-weight: 500; }

/* fichier choisi : nom, taille, état ; liste de plusieurs fichiers */
body.mxTranscribe .upDialog .upChip { margin: 0 0 8px; padding: 10px 8px 12px 10px; grid-template-columns: 34px minmax(0, 1fr) auto 32px; gap: 10px; border-radius: 12px; background: var(--ui-surface); }
body.mxTranscribe .upDialog .upPane .upChip { order: -1; }
body.mxTranscribe .upDialog #upFilePane { display: flex; flex-direction: column; }
body.mxTranscribe .upDialog .upChipIcon { width: 34px; height: 34px; border-radius: 8px; background: var(--ui-surface-3); color: var(--ui-text); }
body.mxTranscribe .upDialog .upChipIcon svg { width: 16px; height: 16px; }
body.mxTranscribe .upDialog .upChipText b { font-size: 13.5px; font-weight: 600; }
body.mxTranscribe .upDialog .upChipText small { font-family: var(--ui-mono); font-size: 11.5px; }
body.mxTranscribe .upDialog .upChipState { font-size: 12px; font-weight: 500; }
body.mxTranscribe .upDialog .upChip[data-state="importing"] .upChipBar { background: var(--ui-accent); }
body.mxTranscribe .upDialog .upChipRemove { width: 32px; height: 32px; border-radius: 8px; }
body.mxTranscribe .upDialog .batchPanel { order: -1; margin: 0 0 8px; padding: 0; border: 0; background: none; box-shadow: none; }
body.mxTranscribe .upDialog .batchHead { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; }
body.mxTranscribe .upDialog .batchHead span { font-family: var(--ui-mono); font-size: 11.5px; color: var(--ui-muted); }
body.mxTranscribe .upDialog .batchList { max-height: 196px; overflow-y: auto; border: 1px solid var(--ui-line); border-radius: 12px; }
body.mxTranscribe .upDialog .batchNote { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--ui-muted); }
body.mxTranscribe .upDialog .batchClear { font-size: 12px; }

/* lien */
body.mxTranscribe .upDialog .mxUrlField { display: grid; gap: 6px; margin: 0; }
body.mxTranscribe .upDialog .mxUrlField > span { font-size: 13px; font-weight: 500; color: var(--ui-text); }
body.mxTranscribe .upDialog .mxUrlField input { height: 44px; padding: 0 14px; border: 1px solid var(--ui-line-strong); border-radius: 10px; background: var(--ui-surface); font-size: 14px; box-shadow: none; }
body.mxTranscribe .upDialog .mxUrlField input:focus { border-color: var(--ui-text); box-shadow: var(--ui-ring); outline: none; }
body.mxTranscribe .upDialog .mxUrlField small { font-size: 12px; color: var(--ui-muted); }

/* langue : une seule ligne */
body.mxTranscribe .upDialog .upBox > .upField {
  display: grid; grid-template-columns: auto minmax(0, 220px); align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--ui-surface-3);
}
body.mxTranscribe .upDialog .upField > span { font-size: 13px; font-weight: 500; }
body.mxTranscribe .upDialog .upField select { height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--ui-line); border-radius: 8px; background-color: var(--ui-surface); font-size: 13.5px; box-shadow: none; min-width: 0; width: 100%; }

/* trois modes */
body.mxTranscribe .upDialog .upModes { margin: 16px 0 0; }
body.mxTranscribe .upDialog .upModes legend { margin-bottom: 8px; font-size: 13px; font-weight: 500; }
body.mxTranscribe .upDialog .upModeRow { gap: 8px; }
body.mxTranscribe .upDialog .upModeBody {
  gap: 2px; padding: 12px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s var(--ui-ease);
}
body.mxTranscribe .upDialog .upMode:hover .upModeBody { border-color: var(--ui-line-strong); }
body.mxTranscribe .upDialog .upMode:active .upModeBody { transform: scale(.98); }
body.mxTranscribe .upDialog .upModeIcon { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 6px; border-radius: 7px; background: var(--ui-surface-3); color: var(--ui-text-2); font-size: 0; transition: background-color .18s ease, color .18s ease; }
body.mxTranscribe .upDialog .upModeIcon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
body.mxTranscribe .upDialog .upModeBody b { font-size: 13.5px; font-weight: 600; }
body.mxTranscribe .upDialog .upModeBody small { font-size: 11.5px; line-height: 1.4; }
body.mxTranscribe .upDialog .upMode input:checked + .upModeBody {
  border-color: var(--ui-accent); background: var(--ui-accent-soft); box-shadow: 0 0 0 1px var(--ui-accent);
}
body.mxTranscribe .upDialog .upMode input:checked + .upModeBody .upModeIcon { background: var(--ui-accent); color: #fff; }
body.mxTranscribe .upDialog .upMode input:focus-visible + .upModeBody { outline: 2px solid var(--ui-accent); outline-offset: 2px; }

/* paramètres avancés : accordéon discret */
body.mxTranscribe .upDialog .upAdvanced { margin: 16px 0 0; border: 0; border-top: 1px solid var(--ui-surface-3); border-radius: 0; background: none; }
body.mxTranscribe .upDialog .upAdvanced > summary { padding: 14px 28px 2px 0; min-height: 0; font-size: 13px; }
body.mxTranscribe .upDialog .upAdvanced > summary::after { right: 4px; }
body.mxTranscribe .upDialog .upAdvTitle { font-size: 13px; font-weight: 500; color: var(--ui-text-2); }
body.mxTranscribe .upDialog .upAdvSummary { font-size: 12px; color: var(--ui-accent-hover); }
body.mxTranscribe .upDialog .upAdvanced[open] .upAdvBody { animation: upV50Fade .2s ease both; padding: 12px 0 0; }
body.mxTranscribe .upDialog .upAdvBody .mxEnhance { border-radius: 10px; background: var(--ui-surface-2); box-shadow: none; }

/* bouton « TRANSCRIRE » : toujours visible en bas */
body.mxTranscribe .upDialog .upGoRow { bottom: -20px; margin: 18px -20px -20px; padding: 12px 20px 14px; border-top: 1px solid var(--ui-line); background: var(--ui-surface); }
body.mxTranscribe.appBody .upDialog .upGo.mxPrimary {
  min-height: 46px; border-radius: 10px; background: var(--ui-ink); color: var(--ui-on-ink);
  font-size: 14px; font-weight: 600; letter-spacing: .06em; box-shadow: none;
}
body.mxTranscribe.appBody .upDialog .upGo.mxPrimary:hover:not(:disabled) { background: var(--ui-ink-hover); box-shadow: none; }
body.mxTranscribe.appBody .upDialog .upGo.mxPrimary:disabled { opacity: 1; background: var(--ui-surface-3); color: var(--ui-faint); }
body.mxTranscribe .upDialog .upGoHint { margin: 8px 0 0; font-size: 12px; }
body.mxTranscribe .upDialog .upGoRow .mxFootnote { margin: 4px 0 0; font-size: 11px; color: var(--ui-faint); text-align: center; }

/* téléphone : fenêtre plein écran, rien ne dépasse en largeur */
@media (max-width: 640px) {
  body.mxTranscribe .upDialog { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  body.mxTranscribe.appBody .upBox, body.mxTranscribe .upBox { padding: 0 16px 16px; }
  body.mxTranscribe .upDialog .upHead { margin: 0 -16px 14px; padding: 10px 8px 10px 16px; }
  body.mxTranscribe .upDialog .upModeBody { align-items: flex-start; text-align: left; padding: 10px; }
  body.mxTranscribe .upDialog .upModeBody small { display: none; }
  body.mxTranscribe .upDialog .upBox > .upField { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body.mxTranscribe .upDialog .upGoRow { bottom: -16px; margin: 16px -16px -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  body.mxTranscribe .upDialog .upChip { grid-template-columns: 34px minmax(0, 1fr) 32px; }
}
@media (max-width: 380px) {
  .upSrcTab svg { display: none; }
}

/* ================================================================ V51 : page de détail d’une transcription
   Même langage que le reste : menu clair, page blanche sur fond cassé, panneau d’outils sobre,
   lecteur intégré. Aucun identifiant changé ; tout est limité à #workspace. */
body.mxTranscribe.appBody .transcriptionWorkspace {
  grid-template-columns: 248px minmax(0, 1fr) 284px;
  grid-template-rows: minmax(0, 1fr) 72px;
  background: var(--ui-surface-2);
  font-family: var(--ui-sans);
  color: var(--ui-text);
}

/* --- colonne gauche : navigation et historique, comme le menu de l’application */
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceLeft {
  padding: 18px 12px 96px;
  background: var(--sh-side-bg);
  border-right: 1px solid var(--sh-side-line);
  color: var(--sh-side-text);
}
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceBrandRow { margin: 0 0 18px; padding: 2px 4px 0 6px; }
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceBrand {
  gap: 9px; color: var(--ui-text); font-family: var(--ui-sans); font-size: 14px; font-weight: 600; letter-spacing: .14em;
}
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceBrand .appLogoMark { color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceLeft .iconButton {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--sh-side-muted);
  transition: background-color .15s ease, color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceLeft .iconButton:hover { background: var(--sh-side-hover); color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .newTranscriptBtn {
  min-height: 40px; margin: 0 0 14px; border-radius: 10px; background: var(--ui-ink); color: var(--ui-on-ink);
  font-size: 14px; font-weight: 500; box-shadow: none; filter: none; transition: background-color .15s ease, transform .15s var(--ui-ease);
}
body.mxTranscribe.appBody .transcriptionWorkspace .newTranscriptBtn:hover { background: var(--ui-ink-hover); transform: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .newTranscriptBtn:active { transform: scale(.98); }
body.mxTranscribe.appBody .transcriptionWorkspace .usageCard {
  gap: 2px; margin: 0 0 6px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--sh-wallet-line); background: var(--sh-wallet-bg); color: var(--ui-text);
}
body.mxTranscribe.appBody .transcriptionWorkspace .usageCard strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.mxTranscribe.appBody .transcriptionWorkspace .usageCard span { color: var(--ui-muted); font-size: 12px; }
body.mxTranscribe.appBody .transcriptionWorkspace .usageBar { height: 4px; margin-top: 10px; background: var(--ui-surface-3); }
body.mxTranscribe.appBody .transcriptionWorkspace .usageBar i { background: var(--ui-accent); }
body.mxTranscribe.appBody .transcriptionWorkspace .leftSectionTitle {
  display: flex; align-items: center; justify-content: space-between; margin: 20px 8px 6px;
  color: var(--sh-side-muted); font-size: 11px; font-weight: 500; letter-spacing: .08em;
}
body.mxTranscribe.appBody .transcriptionWorkspace .seeAllHistoryBtn {
  padding: 2px 6px; margin-right: -6px; border-radius: 6px; background: transparent; color: var(--ui-accent); font-size: 12px; font-weight: 500;
}
body.mxTranscribe.appBody .transcriptionWorkspace .seeAllHistoryBtn:hover { background: var(--ui-accent-soft); }
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem {
  min-height: 38px; padding: 8px 10px; border-radius: 8px; color: var(--sh-side-text); font-size: 14px; font-weight: 450;
  transition: background-color .15s ease, color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem svg { width: 17px; height: 17px; stroke: currentColor; }
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem:hover { background: var(--sh-side-hover); color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem.active {
  background: var(--ui-surface); color: var(--ui-text); font-weight: 500;
  box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(12, 10, 9, .05);
}
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem.active svg { stroke: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .historyList { gap: 2px; }
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem {
  grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 7px 8px; border-radius: 8px;
  color: var(--sh-side-text); transition: background-color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem b { font-size: 13px; font-weight: 450; color: inherit; }
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem small { color: var(--sh-side-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem:hover { background: var(--sh-side-hover); }
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem.current {
  background: var(--ui-surface); color: var(--ui-text); box-shadow: 0 0 0 1px var(--ui-line), 0 1px 2px rgba(12, 10, 9, .05);
}
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem.current b { font-weight: 500; }
body.mxTranscribe.appBody .transcriptionWorkspace .historyFileIcon {
  width: 28px; height: 28px; border-radius: 7px; background: var(--ui-surface-3); color: var(--sh-side-muted);
}
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem.current .historyFileIcon { background: var(--ui-ink); color: var(--ui-on-ink); }
body.mxTranscribe.appBody .transcriptionWorkspace .historyItem:focus-visible,
body.mxTranscribe.appBody .transcriptionWorkspace .leftNavItem:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 1px; }

/* --- centre : le texte au premier plan */
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceCenter { padding: 28px 32px 120px; background: transparent; }
body.mxTranscribe.appBody .transcriptionWorkspace .documentPage {
  width: min(780px, 100%); min-height: calc(100% - 4px); padding: 22px 56px 72px;
  border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-surface);
  box-shadow: 0 1px 2px rgba(12, 10, 9, .04), 0 24px 48px -32px rgba(12, 10, 9, .14);
  animation: v51Rise .45s var(--ui-ease) both;
}
body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader {
  display: block; padding: 0 0 22px; margin: 0 0 30px; border-bottom: 1px solid var(--ui-line);
}
body.mxTranscribe.appBody .transcriptionWorkspace .documentHeaderActions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; margin: 0 -14px 26px -10px;
}
body.mxTranscribe.appBody .transcriptionWorkspace .backToHistoryBtn {
  height: 34px; gap: 4px; padding: 0 10px 0 6px; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  color: var(--ui-muted); font-size: 13.5px; font-weight: 500; transition: background-color .15s ease, color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .backToHistoryBtn:hover { background: var(--ui-surface-3); color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .backToHistoryBtn:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 1px; }
body.mxTranscribe.appBody .transcriptionWorkspace .documentSearchWrap { position: relative; display: block; width: 232px; min-width: 0; }
body.mxTranscribe.appBody .transcriptionWorkspace .documentSearchWrap svg {
  position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%);
  fill: none; stroke: var(--ui-faint); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
body.mxTranscribe.appBody .transcriptionWorkspace .documentSearch {
  width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 8px; border: 1px solid var(--ui-line);
  background: var(--ui-surface-2); color: var(--ui-text); font-size: 13.5px; box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .documentSearch:hover { border-color: var(--ui-line-strong); }
body.mxTranscribe.appBody .transcriptionWorkspace .documentSearch:focus { border-color: var(--ui-text); background: var(--ui-surface); box-shadow: var(--ui-ring); }
body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader h1, body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader .documentTitleH {
  margin: 0 0 10px; font-family: var(--ui-sans); font-size: clamp(22px, 2.1vw, 28px); font-weight: 600;
  line-height: 1.22; letter-spacing: -.022em; color: var(--ui-text); overflow-wrap: anywhere; text-wrap: balance;
}
body.mxTranscribe.appBody .transcriptionWorkspace .documentMetaRow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
body.mxTranscribe.appBody .transcriptionWorkspace .documentMeta { color: var(--ui-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
body.mxTranscribe.appBody .transcriptionWorkspace .saveStatus {
  gap: 6px; padding: 2px 9px 2px 8px; border: 1px solid var(--ui-line); border-radius: 999px; background: var(--ui-surface);
  color: var(--ui-muted); font-size: 12px; font-weight: 500; transition: color .2s ease, border-color .2s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .saveStatus::before { width: 6px; height: 6px; background: var(--ui-ok, #15803d); }
body.mxTranscribe.appBody .transcriptionWorkspace .saveStatus.dirty { color: var(--ui-warn, #a16207); border-color: currentColor; background: var(--ui-surface); }
body.mxTranscribe.appBody .transcriptionWorkspace .saveStatus.dirty::before { background: currentColor; }
body.mxTranscribe.appBody .transcriptionWorkspace .wordTimesNote { margin-top: 12px; }

body.mxTranscribe.appBody .transcriptionWorkspace .transcriptDocument {
  font-size: 16.5px; line-height: 1.85; color: var(--ui-text-2); letter-spacing: -.003em;
  font-feature-settings: "kern", "liga"; text-rendering: optimizeLegibility;
}
body.mxTranscribe.appBody .transcriptionWorkspace .speakerTurn { display: block; margin: 28px 0 6px; }
body.mxTranscribe.appBody .transcriptionWorkspace .speakerTurn:first-child { margin-top: 0; }
body.mxTranscribe.appBody .transcriptionWorkspace .speakerChip {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ui-text); font-size: 13px; font-weight: 600; letter-spacing: .01em; line-height: 1.4;
}
body.mxTranscribe.appBody .transcriptionWorkspace .speakerChip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--spk, var(--ui-accent)); flex: none;
}
body.mxTranscribe.appBody .transcriptionWorkspace .inlineTimecode {
  margin-right: 5px; padding: 1px 6px; border-radius: 5px; background: transparent; color: var(--ui-faint);
  font-family: var(--ui-mono); font-size: 11.5px; letter-spacing: -.01em; box-shadow: inset 0 0 0 1px var(--ui-line);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .inlineTimecode:hover { background: var(--ui-accent-soft); color: var(--ui-accent); box-shadow: inset 0 0 0 1px transparent; text-decoration: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .inlineSegment.active { background: var(--ui-highlight); box-shadow: 0 0 0 3px var(--ui-highlight); }
body.mxTranscribe.appBody .transcriptionWorkspace .inlineWord:hover { background: var(--ui-accent-soft); color: var(--ui-accent); }
body.mxTranscribe.appBody .transcriptionWorkspace .inlineWord.playing { background: var(--ui-ink); color: var(--ui-on-ink); box-shadow: 0 0 0 2px var(--ui-ink); }
body.mxTranscribe.appBody .transcriptionWorkspace .inlineSegment.searchMatch { box-shadow: inset 0 -2px 0 var(--ui-accent); }

/* --- droite : panneau d’outils */
body.mxTranscribe.appBody .transcriptionWorkspace .workspaceRight {
  padding: 22px 16px 96px; background: var(--ui-surface); border-left: 1px solid var(--ui-line);
}
body.mxTranscribe.appBody .transcriptionWorkspace .rightPanelInner h3 {
  margin: 0 2px 10px; font-family: var(--ui-sans); color: var(--ui-faint); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
body.mxTranscribe.appBody .transcriptionWorkspace .rightDivider { height: 1px; margin: 20px 0 18px; background: var(--ui-line); }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction {
  grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; margin: 0 0 1px; padding: 6px 8px;
  border: 0; border-radius: 8px; background: transparent; box-shadow: none; transform: none;
  color: var(--ui-text-2); font-size: 13.5px; font-weight: 450; text-align: left;
  transition: background-color .15s ease, color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction:hover { background: var(--ui-surface-3); color: var(--ui-text); box-shadow: none; transform: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction:active { transform: scale(.985); }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 1px; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction b { font-weight: 500; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction small { display: block; margin-top: 1px; color: var(--ui-faint); font-size: 11.5px; line-height: 1.35; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideIcon {
  width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--ui-muted);
  font-family: var(--ui-mono); font-size: 10px; font-weight: 500;
}
body.mxTranscribe.appBody .transcriptionWorkspace .sideIcon svg { width: 17px; height: 17px; stroke-width: 1.7; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideAction:hover .sideIcon { color: var(--ui-text); }

/* formats d’export : une rangée de pastilles */
body.mxTranscribe.appBody .transcriptionWorkspace .exportGrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
body.mxTranscribe.appBody .transcriptionWorkspace .exportTile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-surface);
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--ui-ease);
}
body.mxTranscribe.appBody .transcriptionWorkspace .exportTile:hover { border-color: var(--ui-text); background: var(--ui-surface); }
body.mxTranscribe.appBody .transcriptionWorkspace .exportTile:active { transform: scale(.96); }
body.mxTranscribe.appBody .transcriptionWorkspace .exportTile .sideIcon,
body.mxTranscribe.appBody .transcriptionWorkspace #pdfLink .sideIcon,
body.mxTranscribe.appBody .transcriptionWorkspace #docxLink .sideIcon {
  width: auto; height: auto; border: 0; background: transparent; color: var(--ui-text); font-size: 11px; font-weight: 500; letter-spacing: .02em;
}
body.mxTranscribe.appBody .transcriptionWorkspace #pdfLink .sideIcon { color: var(--ui-accent); }
:root body.mxTranscribe.appBody .transcriptionWorkspace #pdfLink .sideIcon,
:root body.mxTranscribe.appBody .transcriptionWorkspace #docxLink .sideIcon { background: transparent; border: 0; }
:root body.mxTranscribe.appBody .transcriptionWorkspace #docxLink .sideIcon { color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .exportTile > span:last-child {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Résumé IA et Traduire : deux cartes mises en avant */
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair .sideAction {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; margin: 0; padding: 12px;
  border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-surface-2);
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--ui-ease);
}
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair .sideAction:hover { border-color: var(--ui-line-strong); background: var(--ui-surface); }
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair .sideAction b { display: block; color: var(--ui-text); font-size: 13.5px; font-weight: 600; }
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair .sideIcon,
body.mxTranscribe.appBody .transcriptionWorkspace .aiPair .sideIcon.aiIcon {
  width: 30px; height: 30px; border-radius: 8px; background: var(--ui-accent-soft); color: var(--ui-accent); box-shadow: none;
  font-family: var(--ui-sans); font-size: 11px; font-weight: 600;
}

/* horodatages : un interrupteur */
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch {
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0 0; padding: 14px 8px 4px; border-top: 1px solid var(--ui-line); color: var(--ui-text-2); font-size: 13.5px; cursor: pointer;
}
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch span { font-weight: 450; }
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 32px; height: 18px; margin: 0;
  border-radius: 999px; background: var(--ui-line-strong); cursor: pointer; transition: background-color .2s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(12, 10, 9, .25); transition: transform .2s var(--ui-ease);
}
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch input:checked { background: var(--ui-ink); }
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch input:checked::before { transform: translateX(14px); background: var(--ui-on-ink); }
body.mxTranscribe.appBody .transcriptionWorkspace .sideSwitch input:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
body.mxTranscribe.appBody .transcriptionWorkspace .saveWideBtn {
  width: 100%; min-height: 40px; margin: 16px 0 0; border-radius: 10px; background: var(--ui-ink); color: var(--ui-on-ink);
  font-size: 14px; font-weight: 500; box-shadow: none; filter: none; transform: none;
}
body.mxTranscribe.appBody .transcriptionWorkspace .saveWideBtn:hover { background: var(--ui-ink-hover); transform: none; }

/* --- lecteur audio intégré */
body.mxTranscribe.appBody .transcriptionWorkspace .bottomPlayer {
  grid-template-columns: 248px minmax(0, 1fr); gap: 0; align-items: center; padding: 0 20px 0 0;
  border-top: 1px solid var(--ui-line); background: var(--ui-surface);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; color: var(--ui-text);
}
body.mxTranscribe.appBody .transcriptionWorkspace .playerTrack { gap: 10px; height: 100%; padding: 0 12px 0 16px; border-right: 1px solid var(--ui-line); }
body.mxTranscribe.appBody .transcriptionWorkspace .playerArt { width: 34px; height: 34px; border-radius: 8px; gap: 2px; background: var(--ui-ink); box-shadow: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .playerArt i { width: 2px; background: var(--ui-on-ink); }
body.mxTranscribe.appBody .transcriptionWorkspace .playerTitle {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--ui-text);
}
body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn {
  flex: none; height: 30px; gap: 6px; padding: 0 10px; border: 1px solid var(--ui-line); border-radius: 999px;
  background: var(--ui-surface); color: var(--ui-text-2); box-shadow: none; font-size: 12.5px; font-weight: 500; filter: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn:hover { border-color: var(--ui-text); color: var(--ui-text); filter: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn svg { width: 14px; height: 14px; }
body.mxTranscribe.appBody .transcriptionWorkspace .playerMainControls { gap: 10px; padding-left: 20px; min-width: 0; }
body.mxTranscribe.appBody .transcriptionWorkspace .playerIconButton { width: 34px; height: 34px; color: var(--ui-muted); }
body.mxTranscribe.appBody .transcriptionWorkspace .playerIconButton svg { width: 20px; height: 20px; }
body.mxTranscribe.appBody .transcriptionWorkspace .playerIconButton:hover { background: var(--ui-surface-3); color: var(--ui-text); }
body.mxTranscribe.appBody .transcriptionWorkspace .playPauseButton {
  width: 40px; height: 40px; background: var(--ui-ink); color: var(--ui-on-ink); box-shadow: none;
  transition: transform .15s var(--ui-ease), background-color .15s ease;
}
body.mxTranscribe.appBody .transcriptionWorkspace .playPauseButton::before { width: 16px; height: 16px; }
body.mxTranscribe.appBody .transcriptionWorkspace .playPauseButton:hover { background: var(--ui-ink-hover); transform: none; }
body.mxTranscribe.appBody .transcriptionWorkspace .playPauseButton:active { transform: scale(.94); }
body.mxTranscribe.appBody .transcriptionWorkspace .playerTime { min-width: 42px; color: var(--ui-faint); font-family: var(--ui-mono); font-size: 11.5px; font-weight: 400; }
body.mxTranscribe.appBody .transcriptionWorkspace .seekSlider,
body.mxTranscribe.appBody .transcriptionWorkspace .volumeSlider {
  height: 4px; background: linear-gradient(90deg, var(--ui-text) 0 var(--fill), var(--ui-line) var(--fill) 100%);
}
body.mxTranscribe.appBody .transcriptionWorkspace .volumeSlider { width: 76px; }
body.mxTranscribe.appBody .transcriptionWorkspace .seekSlider::-webkit-slider-thumb,
body.mxTranscribe.appBody .transcriptionWorkspace .volumeSlider::-webkit-slider-thumb {
  width: 12px; height: 12px; border: 0; background: var(--ui-text); box-shadow: 0 0 0 3px var(--ui-surface);
}
body.mxTranscribe.appBody .transcriptionWorkspace .seekSlider::-moz-range-thumb,
body.mxTranscribe.appBody .transcriptionWorkspace .volumeSlider::-moz-range-thumb {
  width: 12px; height: 12px; border: 0; background: var(--ui-text); box-shadow: 0 0 0 3px var(--ui-surface);
}
body.mxTranscribe.appBody .transcriptionWorkspace .volumeGlyph { margin-left: 4px; color: var(--ui-faint); }
body.mxTranscribe.appBody .transcriptionWorkspace .volumeGlyph svg { width: 17px; height: 17px; }
body.mxTranscribe.appBody .transcriptionWorkspace .rateSelect {
  flex: none; min-width: 62px; height: 30px; min-height: 30px; padding: 0 24px 0 9px; border-radius: 8px; border: 1px solid var(--ui-line);
  background-color: var(--ui-surface); color: var(--ui-text); font-family: var(--ui-mono); font-size: 12px; font-weight: 500;
}
body.mxTranscribe.appBody .transcriptionWorkspace .followCompact { gap: 6px; color: var(--ui-muted); font-size: 12.5px; white-space: nowrap; }
body.mxTranscribe.appBody .transcriptionWorkspace .followCompact input { accent-color: var(--ui-ink); }

@keyframes v51Rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- tablette */
@media (max-width: 1180px) {
  body.mxTranscribe.appBody .transcriptionWorkspace { grid-template-columns: 216px minmax(0, 1fr) 248px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .bottomPlayer { grid-template-columns: 216px minmax(0, 1fr); }
  body.mxTranscribe.appBody .transcriptionWorkspace .workspaceCenter { padding: 20px 20px 110px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentPage { padding: 20px 32px 60px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentSearchWrap { width: 190px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn span { display: none; }
  body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn { width: 30px; padding: 0; justify-content: center; }
  body.mxTranscribe.appBody .transcriptionWorkspace .followCompact { display: none; }
}
@media (max-width: 1024px) {
  body.mxTranscribe.appBody .transcriptionWorkspace .volumeGlyph,
  body.mxTranscribe.appBody .transcriptionWorkspace .volumeSlider { display: none; }
}

/* --- mobile : texte puis outils, lecteur flottant */
@media (max-width: 820px) {
  body.mxTranscribe.appBody .transcriptionWorkspace { display: block; background: var(--ui-surface-2); }
  body.mxTranscribe.appBody .transcriptionWorkspace .workspaceCenter { padding: 12px 12px 16px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentPage { min-height: 60vh; padding: 14px 18px 36px; border-radius: 14px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader { padding-bottom: 18px; margin-bottom: 22px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentHeaderActions { margin: 0 -6px 18px -8px; gap: 8px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentSearchWrap { flex: 1; width: auto; max-width: 220px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader h1, body.mxTranscribe.appBody .transcriptionWorkspace .documentHeader .documentTitleH { font-size: 21px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .transcriptDocument { font-size: 16px; line-height: 1.75; }
  body.mxTranscribe.appBody .transcriptionWorkspace .workspaceRight {
    margin: 0 12px; padding: 18px 14px calc(130px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--ui-line); border-bottom: 0; border-radius: 14px 14px 0 0;
  }
  body.mxTranscribe.appBody .transcriptionWorkspace .bottomPlayer {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 12px;
    border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-surface);
    box-shadow: 0 16px 40px -18px rgba(12, 10, 9, .35);
  }
  body.mxTranscribe.appBody .transcriptionWorkspace .playerTrack { height: auto; padding: 0; border-right: 0; }
  body.mxTranscribe.appBody .transcriptionWorkspace .playerArt { width: 28px; height: 28px; border-radius: 7px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .playerMainControls { padding-left: 0; gap: 6px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .playPauseButton { width: 38px; height: 38px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .playerIconButton { width: 30px; height: 30px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .playerTime { min-width: 34px; font-size: 11px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn span { display: inline; }
  body.mxTranscribe.appBody .transcriptionWorkspace .karaokeBtn { width: auto; padding: 0 10px; }
  body.mxTranscribe.appBody .transcriptionWorkspace .rateSelect { min-width: 72px; }
}
@media (max-width: 380px) {
  body.mxTranscribe.appBody .transcriptionWorkspace .backToHistoryBtn span { display: none; }
  body.mxTranscribe.appBody .transcriptionWorkspace .documentSearchWrap { max-width: none; }
  body.mxTranscribe.appBody .transcriptionWorkspace .exportGrid { gap: 4px; }
}
