/*
 * Réunions — v2 de la page web (« compagnon mobile »), à l'identité visuelle d'Anarlog.
 * Couleurs, espacements, rayons et tailles : jetons du design system d'Anarlog (packages/design-system,
 * licence MIT, © 2023-present Fastrepl, Inc. : voir LICENCES.md). Police : celle du système (SF Pro sur
 * Mac et iPhone, comme l'app de bureau d'Anarlog : aucune police d'Apple n'est livrée ici) ; Caveat (OFL)
 * pour le titre manuscrit de l'écran de connexion. Aucune ressource distante.
 */

@font-face {
  font-family: 'Caveat';
  src: url('fonts/Caveat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fafaf9;
  --text: #1c1917;
  --card: #ffffff;
  --primary: #292524;
  --primary-text: #fafaf9;
  --secondary: #f5f5f4;
  --muted: #78716c;
  --pressed: #f0f0ed;
  --danger: #ef4444;
  --danger-text: #fafaf9;
  --rec: #ef4444;
  --alert: #fef2f2;
  --alert-text: #b91c1c;
  --alert-line: #fecaca;
  --line: #e7e5e4;
  --ring: #1c1917;
  --scrim: rgba(28, 25, 23, 0.32);
  --chrome: #f0f0ed;
  --panel: #fafaf9;
  --chrome-line: #dedad7;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --ok-line: #bbf7d0;
  --warn: #a16207;
  --warn-bg: #fefce8;
  --warn-line: #fde68a;
  --info-bg: #f5f5f4;
  --mark: #fde68a;
  --mark-current: #fbbf24;
  --brand-top: #f7e7b0;
  --brand-bottom: #ffe08c;
  --brand-ink: #272321;

  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-xxl: 32px;

  --r-sm: 4px;
  --r-md: 6px;
  --r-control: 8px;
  --r-card: 12px;
  --r-panel: 20px;
  --r-sheet: 24px;
  --r-pill: 999px;

  --c-compact: 36px;
  --c-default: 44px;
  --c-large: 52px;
  --c-listen: 72px;

  --page: 640px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --dock-h: 0px;
  --player-h: 0px;
  --nav-h: var(--dock-h);

  --voice-0: #2563eb;
  --voice-1: #ea580c;
  --voice-2: #059669;
  --voice-3: #9333ea;
  --voice-4: #ca8a04;
  --voice-5: #db2777;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1f1c1a;
    --text: #fafaf9;
    --card: #2d2926;
    --primary: #2d2926;
    --primary-text: #fafaf9;
    --secondary: #363330;
    --muted: #918a85;
    --pressed: #433f3c;
    --danger: #7f1d1d;
    --danger-text: #fafaf9;
    --alert: #351313;
    --alert-text: #fca5a5;
    --alert-line: #592323;
    --line: #4a4542;
    --ring: #c4bfbb;
    --scrim: rgba(0, 0, 0, 0.5);
    --chrome: #3a3532;
    --panel: #272321;
    --chrome-line: #56504c;
    --ok: #86efac;
    --ok-bg: #11291a;
    --ok-line: #1f4d30;
    --warn: #fcd34d;
    --warn-bg: #2b2410;
    --warn-line: #574515;
    --info-bg: #363330;
    --mark: #854d0e;
    --mark-current: #b45309;
    --voice-0: #60a5fa;
    --voice-1: #fb923c;
    --voice-2: #34d399;
    --voice-3: #c084fc;
    --voice-4: #facc15;
    --voice-5: #f472b6;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1f1c1a;
  --text: #fafaf9;
  --card: #2d2926;
  --primary: #2d2926;
  --primary-text: #fafaf9;
  --secondary: #363330;
  --muted: #918a85;
  --pressed: #433f3c;
  --danger: #7f1d1d;
  --danger-text: #fafaf9;
  --alert: #351313;
  --alert-text: #fca5a5;
  --alert-line: #592323;
  --line: #4a4542;
  --ring: #c4bfbb;
  --scrim: rgba(0, 0, 0, 0.5);
  --chrome: #3a3532;
  --panel: #272321;
  --chrome-line: #56504c;
  --ok: #86efac;
  --ok-bg: #11291a;
  --ok-line: #1f4d30;
  --warn: #fcd34d;
  --warn-bg: #2b2410;
  --warn-line: #574515;
  --info-bg: #363330;
  --mark: #854d0e;
  --mark-current: #b45309;
  --voice-0: #60a5fa;
  --voice-1: #fb923c;
  --voice-2: #34d399;
  --voice-3: #c084fc;
  --voice-4: #facc15;
  --voice-5: #f472b6;
}

/* --- base ------------------------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/22px var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}

img,
svg {
  display: inline-block;
  vertical-align: middle;
}

.icon {
  flex: none;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 13px;
}

code {
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: var(--secondary);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 16px;
}

.warn-text {
  color: var(--alert-text);
}

.row {
  display: flex;
  align-items: center;
}

.row.gap,
.gap {
  gap: var(--s-sm);
}

.wrap {
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: var(--s-md);
}

.skip {
  position: absolute;
  top: -100px;
  left: var(--s-lg);
  z-index: 100;
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--primary-text);
}

.skip:focus {
  top: calc(var(--safe-top) + var(--s-sm));
}

.noscript {
  padding: var(--s-xl);
}

/* --- coquille ----------------------------------------------------------------------------------------- */

.main {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--s-lg) calc(var(--dock-h) + var(--safe-bottom) + var(--s-xl));
  outline: none;
}

body[data-route='reunion'] .main {
  max-width: 760px;
}

.loading {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: var(--s-xl) 0;
  color: var(--muted);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: tourne 0.8s linear infinite;
}

@keyframes tourne {
  to {
    transform: rotate(360deg);
  }
}

/* barre d'en-tête des écrans (retour · titre · actions), collée en haut */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: var(--c-default) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-sm);
  margin: 0 calc(-1 * var(--s-lg));
  padding: calc(var(--safe-top) + var(--s-sm)) var(--s-md) var(--s-sm);
  background: var(--bg);
}

.bar-title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-end {
  display: flex;
  justify-content: flex-end;
  min-width: var(--c-default);
  gap: var(--s-xs);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--c-default);
  height: var(--c-default);
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:active {
  background: var(--pressed);
}

.icon-btn.muted {
  color: var(--muted);
}

.icon-btn:disabled {
  opacity: 0.45;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-title {
  margin: var(--s-sm) 0 var(--s-lg);
  font-size: 34px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.7px;
  outline: none;
}

.page-head {
  margin-top: var(--s-xs);
}

.lede {
  color: var(--muted);
}

.section-title,
.sub-title {
  margin: 0 0 var(--s-sm);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.sub-title {
  font-size: 15px;
}

/* --- bandeaux et toasts ------------------------------------------------------------------------------ */

.banners {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: var(--page);
  margin: 0 auto;
}

.banner {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  margin: calc(var(--safe-top) + var(--s-sm)) var(--s-lg) 0;
  padding: var(--s-sm) var(--s-sm) var(--s-sm) var(--s-md);
  border: 1px solid var(--alert-line);
  border-radius: var(--r-card);
  background: var(--alert);
  color: var(--alert-text);
  font-size: 13px;
  line-height: 18px;
}

.banner > span {
  flex: 1;
}

.toasts {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + var(--s-sm));
  z-index: 60;
  display: grid;
  gap: var(--s-sm);
  width: min(calc(100% - 2 * var(--s-lg)), 460px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
  padding: var(--s-md) var(--s-sm) var(--s-md) var(--s-md);
  border: 1px solid var(--chrome-line);
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.14);
  font-size: 14px;
  line-height: 19px;
  pointer-events: auto;
  animation: arrive 0.18s ease-out;
}

.toast > span {
  flex: 1;
}

.toast-error {
  border-color: var(--alert-line);
  background: var(--alert);
  color: var(--alert-text);
}

.toast-ok .icon {
  color: var(--ok);
}

.toast-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* activité en cours ailleurs que sur l'écran Enregistrer : pastille flottante au-dessus du bas */
.activity {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--safe-bottom) + var(--s-md));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  max-width: calc(100% - 2 * var(--s-lg));
  padding: var(--s-xs) var(--s-xs) var(--s-xs) var(--s-md);
  border: 1px solid var(--chrome-line);
  border-radius: var(--r-pill);
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.16);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

.activity > span:not(.rec-dot) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rec);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* --- boutons ------------------------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: var(--c-default);
  padding: 0 var(--s-lg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover,
.btn:active {
  background: var(--pressed);
}

.btn:disabled,
.btn[aria-busy='true'] {
  opacity: 0.5;
  cursor: default;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--primary);
  opacity: 0.85;
}

:root[data-theme='dark'] .btn-primary,
.btn-danger {
  border-color: var(--chrome-line);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn-primary {
    border-color: var(--chrome-line);
  }
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--danger-text);
}

.btn-danger:hover,
.btn-danger:active {
  background: var(--danger);
  opacity: 0.85;
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
}

.btn-small {
  min-height: var(--c-compact);
  padding: 0 var(--s-md);
  font-size: 13px;
}

.btn-icon {
  width: var(--c-compact);
  min-height: var(--c-compact);
  padding: 0;
}

.btn-big {
  min-height: var(--c-large);
  padding: 0 var(--s-xl);
  font-size: 16px;
}

.btn-wide {
  width: 100%;
}

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* la grande pastille « Enregistrer » d'Anarlog (« Start listening »), collée en bas de l'accueil */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: var(--s-sm) var(--s-lg) calc(var(--safe-bottom) + var(--s-sm));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  pointer-events: none;
}

.dock > * {
  pointer-events: auto;
}

.listen-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  width: 100%;
  max-width: calc(var(--page) - 2 * var(--s-lg));
  height: var(--c-listen);
  margin: 0 auto;
  padding: 0 var(--s-xl);
  border: 1px solid var(--primary);
  border-radius: var(--r-panel);
  background: var(--primary);
  color: var(--primary-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
}

.listen-pill:active {
  opacity: 0.6;
}

.listen-pill .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rec);
}

:root[data-theme='dark'] .listen-pill {
  border-color: var(--chrome-line);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .listen-pill {
    border-color: var(--chrome-line);
  }
}

/* --- formulaires -------------------------------------------------------------------------------------- */

input[type='text'],
input[type='search'],
input[type='password'],
input[type='date'],
input[type='datetime-local'],
input[type='email'],
select,
textarea {
  width: 100%;
  min-height: var(--c-default);
  padding: 10px var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  font-size: 16px; /* sous 16 px, Safari zoome sur le champ */
  line-height: 22px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

textarea {
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 0;
}

input[type='checkbox'],
input[type='radio'] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

:root[data-theme='dark'] input[type='checkbox'],
:root[data-theme='dark'] input[type='radio'] {
  accent-color: #d6d3d1;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label,
legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.form-error {
  color: var(--alert-text);
  font-size: 13px;
}

.form-error:empty {
  display: none;
}

.input-row {
  display: flex;
  gap: var(--s-sm);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  cursor: pointer;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choices {
  display: grid;
  gap: var(--s-sm);
}

.choices legend {
  margin-bottom: var(--s-sm);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
}

.choice input {
  margin-top: 1px;
}

.choice label {
  cursor: pointer;
}

/* contrôle segmenté (iOS / Anarlog) : boutons radio, ou onglets d'une réunion */
.segmented {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--secondary);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  flex: 1;
  padding: 6px var(--s-md);
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

.segmented input:checked + label {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.14);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--ring);
}

.segmented:disabled {
  opacity: 0.45;
}

progress {
  width: 100%;
  height: 8px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--secondary);
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--secondary);
}

progress::-webkit-progress-value {
  background: var(--primary);
}

progress::-moz-progress-bar {
  background: var(--primary);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-label {
  cursor: pointer;
}

/* --- cartes, panneaux, encadrés -------------------------------------------------------------------- */

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.panel {
  padding: var(--s-lg);
}

.panel + .panel,
.group + .group {
  margin-top: var(--s-lg);
}

.callout {
  display: grid;
  gap: var(--s-xs);
  margin: 0;
  padding: var(--s-md) var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--info-bg);
  font-size: 14px;
  line-height: 20px;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-weight: 600;
}

.callout-error {
  border-color: var(--alert-line);
  background: var(--alert);
  color: var(--alert-text);
}

.callout-warn {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.callout-warn .callout-title .icon {
  color: var(--warn);
}

.callout-ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.callout-ok .callout-title .icon {
  color: var(--ok);
}

p.callout {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--secondary);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.badge-outline {
  border-color: var(--line);
  background: transparent;
}

.badge-soft {
  background: var(--secondary);
}

.badge-late,
.status-error {
  border-color: var(--alert-line);
  background: var(--alert);
  color: var(--alert-text);
}

.status-ready {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.status-received,
.status-queued,
.status-transcribing,
.status-transcribed,
.status-analyzing {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.status-with-help {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-sm);
}

.empty {
  display: grid;
  justify-items: center;
  gap: var(--s-sm);
  padding: var(--s-xxl) var(--s-lg);
  text-align: center;
}

.empty-title {
  font-weight: 600;
}

.empty .row {
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--s-sm);
}

.facts {
  display: grid;
  grid-template-columns: minmax(7em, auto) minmax(0, 1fr);
  gap: 6px var(--s-md);
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.code-block {
  display: grid;
  gap: var(--s-sm);
  padding: var(--s-md);
  border-radius: var(--r-control);
  background: var(--secondary);
}

.code-block .btn {
  justify-self: start;
}

.clipboard-proxy {
  position: fixed;
  top: -1000px;
  opacity: 0;
}

/* --- fenêtres : feuilles qui montent du bas (Anarlog), centrées sur grand écran ----------------------- */

dialog {
  padding: 0;
  border: 0;
  color: var(--text);
}

dialog::backdrop {
  background: var(--scrim);
}

.dialog,
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - var(--safe-top) - 24px);
  margin: auto auto 0;
  padding: var(--s-sm) var(--s-lg) calc(var(--safe-bottom) + var(--s-lg));
  overflow: auto;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--panel);
  overscroll-behavior: contain;
}

.dialog[open],
.sheet[open] {
  animation: monte 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes monte {
  from {
    transform: translateY(24px);
    opacity: 0.4;
  }
}

.dialog::before,
.sheet-grip {
  content: '';
  display: block;
  width: 36px;
  height: 5px;
  margin: 0 auto var(--s-md);
  border-radius: var(--r-pill);
  background: var(--line);
}

.dialog-title {
  margin: 0 0 var(--s-md);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--s-sm);
  margin-top: var(--s-sm);
}

.dialog-danger .btn-primary {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--danger-text);
}

.confirm-title {
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--r-control);
  background: var(--secondary);
  font-weight: 600;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  margin-bottom: var(--s-md);
}

.sheet-head .dialog-title {
  margin: 0;
}

.sheet .panel {
  border-color: var(--line);
}

@media (min-width: 700px) {
  .dialog,
  .sheet {
    margin: auto;
    border-radius: var(--r-sheet);
    padding-bottom: var(--s-lg);
  }
}

/* --- connexion ---------------------------------------------------------------------------------------- */

body[data-route='connexion'] {
  background: linear-gradient(to bottom, var(--brand-top) 0%, var(--brand-bottom) 100%);
  background-attachment: fixed;
}

.login {
  display: grid;
  gap: var(--s-lg);
  min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  align-content: center;
  padding: calc(var(--safe-top) + var(--s-xl)) 0 var(--s-xl);
  color: var(--brand-ink);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: var(--s-sm);
  text-align: center;
}

.login-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.wordmark {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 52px;
  font-weight: 600;
  line-height: 58px;
  outline: none;
}

.login .lede {
  max-width: 340px;
  color: var(--brand-ink);
  font-family: var(--font-hand);
  font-size: 26px;
  line-height: 30px;
}

.login-form {
  padding: var(--s-lg);
  border-radius: var(--r-panel);
  background: rgba(255, 255, 255, 0.72);
  color: #1c1917;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.login-form input {
  border-color: #e7e5e4;
  background: #ffffff;
  color: #1c1917;
}

.login-form .field-label,
.login-form .hint {
  color: #57534e;
}

.login-form .btn-primary {
  border-color: #292524;
  background: #292524;
  color: #fafaf9;
}

.login-form .btn-quiet {
  color: #1c1917;
}

/* --- accueil : réunions par jour ---------------------------------------------------------------------- */

.home-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  margin: 0 calc(-1 * var(--s-lg));
  padding: calc(var(--safe-top) + var(--s-sm)) var(--s-md) var(--s-sm);
  background: var(--bg);
}

.home-bar .row {
  gap: var(--s-xs);
}

.home-title {
  margin: var(--s-xs) 0 var(--s-md);
  font-size: 34px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.7px;
  outline: none;
}

.home-filter {
  margin-bottom: var(--s-sm);
}

.day-label {
  margin: var(--s-lg) 0 var(--s-sm);
  padding: 0 var(--s-md);
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.sessions {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.session {
  position: relative;
  display: grid;
  gap: var(--s-xs);
  min-height: 64px;
  padding: var(--s-sm) var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  content-visibility: auto;
  contain-intrinsic-size: auto 84px;
}

.session:active,
.session:hover {
  background: var(--pressed);
}

.session-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.session-title a {
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* toute la carte est cliquable (lien étiré), sans imbriquer de liens */
.session-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.session-title .icon {
  color: var(--muted);
}

.session-sub,
.session-people,
.session-excerpt {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.session-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--s-sm);
  font-variant-numeric: tabular-nums;
}

.session-people,
.session-excerpt {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.session-warn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--alert-text);
  font-size: 12px;
  line-height: 16px;
}

.session .badge {
  position: relative;
  z-index: 1;
}

.more {
  display: flex;
  justify-content: center;
  margin-top: var(--s-lg);
}

.count {
  margin: var(--s-sm) var(--s-md) 0;
  font-size: 12px;
}

/* recherche : feuille plein écran (palette de recherche d'Anarlog) */
.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search input {
  padding-left: 38px;
  border-radius: var(--r-card);
  background: var(--secondary);
  border-color: transparent;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-sheet {
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.search-sheet[open] {
  animation: none;
}

.search-sheet::backdrop {
  background: var(--bg);
}

.search-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: calc(var(--safe-top) + var(--s-sm)) var(--s-lg) calc(var(--safe-bottom) + var(--s-xl));
}

.search-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: var(--s-xs) 0 var(--s-sm);
  background: var(--bg);
}

.search-hint {
  margin: var(--s-lg) var(--s-md);
  color: var(--muted);
  font-size: 13px;
}

.hits {
  display: grid;
  gap: var(--s-xs);
  margin: var(--s-sm) 0 0;
  padding: 0;
  list-style: none;
}

.hit-link {
  display: grid;
  gap: 2px;
  padding: var(--s-sm);
  border-radius: var(--r-control);
  text-decoration: none;
}

.hit-link:hover,
.hit-link:active {
  background: var(--pressed);
}

.hit-field {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.hit-snippet {
  font-size: 14px;
  line-height: 20px;
}

.card {
  padding: var(--s-md);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.card-title a {
  text-decoration: none;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--s-sm);
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.cards {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-due {
  border-color: var(--alert-line);
}

mark {
  padding: 0 1px;
  border-radius: 3px;
  background: var(--mark);
  color: inherit;
}

mark.current {
  background: var(--mark-current);
  outline: 2px solid var(--text);
}

/* --- réunion : en-tête, lecteur, onglets ---------------------------------------------------------- */

.note-head {
  padding: var(--s-xs) 0 var(--s-md);
}

.note-title {
  margin: 0 0 var(--s-xs);
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.35px;
  outline: none;
}

.kicker {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.meta-line,
.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--s-sm);
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.status-line {
  margin-top: var(--s-sm);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse 1.6s ease-in-out infinite;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
  margin-top: var(--s-md);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.chip:hover,
.chip:active {
  background: var(--pressed);
}

.chip .icon {
  color: var(--muted);
}

.chip.is-set .icon {
  color: var(--ok);
}

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--s-md) 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 18px;
}

.person {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--secondary);
}

.person-name {
  font-weight: 600;
}

.warnings {
  display: grid;
  gap: var(--s-sm);
  margin: var(--s-md) 0 0;
  padding: 0;
  list-style: none;
}

.warnings .callout {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}

.related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: var(--s-sm);
  color: var(--muted);
  font-size: 13px;
}

/* lecteur audio : carte collée sous la barre d'en-tête */
.player {
  position: sticky;
  top: calc(var(--safe-top) + 60px);
  z-index: 15;
  display: grid;
  gap: 6px;
  margin: 0 0 var(--s-md);
  padding: var(--s-sm);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.player.player-empty {
  position: static;
  padding: var(--s-sm) var(--s-md);
  color: var(--muted);
  font-size: 13px;
}

.audio {
  width: 100%;
  height: 40px;
}

.player-tools {
  display: flex;
  gap: var(--s-xs);
}

.player-tools .btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.player-context {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.player-context:empty {
  display: none;
}

/* onglets d'une réunion : contrôle segmenté qui défile à l'horizontale */
.tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 var(--s-lg);
  padding: 2px;
  overflow-x: auto;
  border-radius: 9px;
  background: var(--secondary);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--s-md);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
}

.tab[aria-selected='true'] {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.14);
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--primary-text);
  font-size: 11px;
  line-height: 18px;
}

.tab-panel {
  display: grid;
  gap: var(--s-md);
  outline: none;
}

/* --- texte riche (résumé, review, notes, brouillon) -------------------------------------------------- */

.prose {
  font-size: 15px;
  line-height: 23px;
}

.prose > * + * {
  margin-top: var(--s-md);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: var(--s-xl);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.prose h3 {
  font-size: 15px;
}

.prose h4 {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 4px;
}

.prose blockquote {
  margin: 0;
  padding-left: var(--s-md);
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.prose .task {
  list-style: none;
}

.prose .ts {
  display: inline;
  margin: 0 1px;
  padding: 0 5px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--secondary);
  color: var(--text);
  font: 600 12px/18px var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.prose .ts:hover {
  background: var(--pressed);
}

.table-wrap {
  overflow-x: auto;
}

.prose table {
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  padding: 6px var(--s-sm);
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose .align-center {
  text-align: center;
}

.prose .align-right {
  text-align: right;
}

.mail-draft {
  padding: var(--s-lg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.app-summary {
  padding: var(--s-md);
  border-radius: var(--r-card);
  background: var(--secondary);
}

.app-summary summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.app-summary[open] summary {
  margin-bottom: var(--s-sm);
}

.notes-input {
  min-height: 260px;
  font-size: 16px;
}

.notes-theirs {
  max-height: 240px;
  overflow: auto;
  padding: var(--s-sm);
  border-radius: var(--r-control);
  background: var(--card);
}

.save-state {
  color: var(--muted);
  font-size: 13px;
}

.save-state:empty {
  display: none;
}

.save-state.error {
  color: var(--alert-text);
}

.save-state.ok {
  color: var(--ok);
}

/* --- prochaines étapes ---------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.step-main {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
}

.step-main input {
  margin-top: 1px;
}

.step-action {
  font-weight: 600;
  cursor: pointer;
}

.step.done .step-action {
  color: var(--muted);
  text-decoration: line-through;
}

.step.overdue {
  border-color: var(--alert-line);
}

.step-context {
  margin: 4px 0 0 28px;
  font-size: 13px;
  line-height: 18px;
}

.step-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-sm);
  margin: var(--s-sm) 0 0 28px;
}

.step-fields .field {
  flex: 1 1 140px;
}

.step-fields input {
  min-height: 38px;
  padding: 6px 10px;
  font-size: 15px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
  margin: var(--s-sm) 0 0 22px;
}

.steps-editor {
  display: grid;
  gap: var(--s-md);
}

/* --- transcript ----------------------------------------------------------------------------------- */

.transcript {
  display: grid;
  gap: var(--s-sm);
}

.voices {
  padding: var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.voice-list {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.voice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--s-sm);
}

.voice-stats {
  flex-basis: 100%;
}

.voice-chip {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--voice-color) 14%, transparent);
  color: var(--voice-color);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.voice-0 {
  --voice-color: var(--voice-0);
}

.voice-1 {
  --voice-color: var(--voice-1);
}

.voice-2 {
  --voice-color: var(--voice-2);
}

.voice-3 {
  --voice-color: var(--voice-3);
}

.voice-4 {
  --voice-color: var(--voice-4);
}

.voice-5 {
  --voice-color: var(--voice-5);
}

.tr-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm) var(--s-lg);
  font-size: 13px;
}

.tr-bar {
  position: sticky;
  top: calc(var(--safe-top) + 60px + var(--player-h, 0px));
  z-index: 9;
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: var(--s-sm) 0;
  background: var(--bg);
}

.tr-nav {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
}

.tr-count {
  min-width: 4.5em;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tr-downloads {
  margin: 0;
  font-size: 12px;
}

.segments {
  display: grid;
}

.seg {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr);
  column-gap: var(--s-sm);
  padding: 6px var(--s-sm);
  border-radius: var(--r-control);
  content-visibility: auto;
  contain-intrinsic-size: auto 56px;
  scroll-margin-top: calc(var(--safe-top) + 60px + var(--player-h, 0px) + 64px);
  scroll-margin-bottom: calc(var(--nav-h) + 24px);
}

.seg-text mark {
  scroll-margin-top: calc(var(--safe-top) + 60px + var(--player-h, 0px) + 88px);
  scroll-margin-bottom: calc(var(--nav-h) + 40px);
}

.seg:not(.same) {
  margin-top: var(--s-sm);
}

.seg-time {
  grid-row: 1 / span 2;
  align-self: start;
  padding: 1px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 12px/20px var(--font);
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
}

.seg-time:hover {
  color: var(--text);
}

.seg-who {
  grid-column: 2;
  color: var(--voice-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.seg.same .seg-who {
  display: none;
}

.seg-text {
  grid-column: 2;
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.seg.is-playing {
  background: var(--secondary);
}

.seg.is-playing .seg-time {
  color: var(--text);
}

.seg.is-target {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

/* --- Twenty, actions, infos (feuille « … » d'une réunion) ----------------------------------------- */

.twenty-picker:empty {
  display: none;
}

.push-tasks {
  display: grid;
  gap: 4px;
  margin: 4px 0 0 28px;
  padding: 0;
  font-size: 13px;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-md);
}

.actions {
  display: grid;
  gap: var(--s-lg);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.danger-zone {
  padding-top: var(--s-md);
  border-top: 1px solid var(--line);
}

.menu {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.menu-row {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  width: 100%;
  min-height: 48px;
  padding: var(--s-sm) var(--s-md);
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-row:hover,
.menu-row:active {
  background: var(--pressed);
}

.menu > li + li {
  border-top: 1px solid var(--line);
}

.menu-row > .icon:first-child {
  color: var(--muted);
}

.menu-row > span {
  flex: 1;
}

.menu-row .menu-value {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}

.menu-row .chev {
  color: var(--muted);
}

.menu-row.danger {
  color: var(--alert-text);
}

.menu-row.danger > .icon:first-child {
  color: var(--alert-text);
}

.sheet-section + .sheet-section {
  margin-top: var(--s-lg);
}

/* --- enregistrer : panneau d'écoute (rouge, barres d'onde), import, envois -------------------------- */

.listen-panel {
  display: grid;
  justify-items: center;
  gap: var(--s-sm);
  padding: var(--s-xl) var(--s-lg);
  border-radius: 18px;
  background: var(--rec);
  color: #ffffff;
  text-align: center;
}

.listen-panel .rec-state {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.listen-panel .rec-state::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse 1.6s ease-in-out infinite;
}

.listen-panel .rec-title {
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-time {
  font-size: 40px;
  font-weight: 700;
  line-height: 46px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.sticks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 72px;
}

.sticks span {
  width: 4px;
  height: 100%;
  border-radius: var(--r-pill);
  background: #ffffff;
  transform: scaleY(0.12);
  transform-origin: center;
  transition: transform 0.12s linear;
}

.stop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: var(--c-default);
  margin-top: var(--s-xs);
  padding: 0 var(--s-xl);
  border: 0;
  border-radius: var(--r-pill);
  background: #ffffff;
  color: #1c1917;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.stop-btn .icon {
  color: var(--rec);
}

.stop-btn:active {
  opacity: 0.8;
}

.rec-facts {
  display: grid;
  gap: 4px;
  margin-top: var(--s-md);
  font-size: 13px;
  line-height: 18px;
}

.rec-facts p {
  margin: 0;
}

.rec-warnings {
  display: grid;
  gap: var(--s-sm);
  margin: var(--s-md) 0 0;
  padding: 0;
  list-style: none;
}

.rec-warnings .callout {
  display: flex;
  align-items: flex-start;
  gap: var(--s-sm);
}

.consent {
  margin: 0;
  padding: var(--s-md);
  border-radius: var(--r-card);
  background: var(--secondary);
  font-style: italic;
}

.file-facts {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.uploads {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload {
  display: grid;
  gap: 4px;
  padding: var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}

.upload.blocked {
  border-color: var(--alert-line);
}

.upload-title {
  font-weight: 600;
}

.steps-help {
  display: grid;
  gap: var(--s-sm);
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  line-height: 20px;
}

.group-title {
  margin: var(--s-xl) var(--s-md) var(--s-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.group > .panel {
  display: grid;
  gap: var(--s-md);
}

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

/* --- ajustements par écran ---------------------------------------------------------------------------- */

/* l'accueil porte la pastille « Enregistrer » collée en bas : la liste et la pastille d'activité passent au-dessus */
body[data-route='reunions'] {
  --dock-h: 92px;
}

.rec-live {
  display: grid;
  gap: var(--s-sm);
}

.rec-chunks,
.rec-wake,
.rec-net {
  color: var(--muted);
}

#rec-titre ~ form .listen-pill,
.panel form .listen-pill {
  margin-top: var(--s-sm);
}

.page .panel + .panel {
  margin-top: var(--s-lg);
}

/* ligne d'infos d'une réunion : séparateurs discrets entre date, durée, auteur */
.meta-line > * + *::before {
  content: '·';
  margin-right: var(--s-sm);
  color: var(--muted);
}

.meta-line > .badge::before {
  content: none;
}

/* moments cités [12:34] : petite pastille, police du texte (chiffres alignés) */
.prose button.ts {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.tr-count:empty {
  display: none;
}

.tr-bar .search {
  min-width: 0;
}

/* panneaux : contenu espacé régulièrement (titre, encadré, formulaire…) */
section.panel {
  display: grid;
  gap: var(--s-md);
}

section.panel > .section-title {
  margin: 0;
}
