/* ================================================
   Enregistreur de réunions - compléments propres à la page
   À charger après promptissime.css et service-app.css
   ================================================ */

#recordingSection > .card + .card { margin-top: 20px; }
.hint-line { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hint-line:empty { display: none; }

/* ===== CARTE D'ENREGISTREMENT ===== */
.rec-card { text-align: center; }
.rec-head { display: flex; flex-direction: column; align-items: center; }
.recording-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: Poppins, sans-serif; font-weight: 600; font-size: 16px; color: var(--navy);
}
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: rec-blink 1.4s ease-in-out infinite; }
.rec-card.paused .rec-dot { background: var(--warn); animation: none; }
@keyframes rec-blink { 50% { opacity: 0.3; } }

.timer {
  font-family: Poppins, sans-serif; font-weight: 700; font-size: 52px; line-height: 1.1;
  color: var(--navy); letter-spacing: 1px; margin: 14px 0 22px; font-variant-numeric: tabular-nums;
}
.rec-card.paused .timer { color: var(--muted); }
.rec-controls { justify-content: center; }
.rec-meta { margin-top: 20px; font-size: 14px; color: var(--muted); }
.rec-meta strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.rec-meta .sep { margin: 0 8px; }

/* Indicateur d'envoi des segments (états posés par recorder.js) */
.network-status-indicator {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--track); transition: background 0.3s;
}
.network-status-indicator.sending { background: var(--navy); animation: net-pulse 1.6s infinite; }
.network-status-indicator.retrying { background: var(--yellow-text); animation: net-pulse 1.2s infinite; }
.network-status-indicator.success { background: var(--ok); }
.network-status-indicator.failed { background: var(--bad); }
@keyframes net-pulse { 50% { opacity: 0.35; } }

/* Niveau du micro (créé par recorder.js dans #recording-container) */
.audio-visualizer {
  position: relative; overflow: hidden;
  width: 100%; max-width: 300px; height: 36px; margin: 14px auto 0; padding: 6px 12px 6px 26px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  opacity: 0; transition: opacity 0.3s, border-color 0.3s;
}
.audio-visualizer::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--audio-level, 0%);
  background: var(--yellow-light); transition: width 0.15s;
}
.audio-visualizer.recording { opacity: 1; }
.audio-visualizer.no-audio { border-color: var(--bad); background: var(--bad-bg); }
.visualizer-canvas { position: relative; width: 100%; height: 100%; display: block; }
.status-indicator {
  position: absolute; top: 50%; left: 10px; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--track); z-index: 1;
}
.status-indicator.recording { background: var(--ok); }
.audio-visualizer.no-audio .status-indicator { background: var(--bad); }

/* Micro coupé qui ne revient pas seul (recorder.js) : bandeau fixe, au-dessus de l'en-tête */
.resume-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  width: 100%; padding: 16px; border: 0; cursor: pointer;
  background: var(--bad); color: #fff; text-align: center;
  font-family: Poppins, sans-serif; font-weight: 500; font-size: 16px; line-height: 1.4;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.resume-banner strong { font-weight: 700; }
.resume-banner:disabled { opacity: 0.8; cursor: progress; }

/* Séance restée ouverte sur cet appareil (page fermée pendant l'enregistrement) */
.abandoned-card { margin-bottom: 20px; border: 2px solid var(--warn); scroll-margin-top: 110px; }
.abandoned-card p { margin-bottom: 16px; }
.abandoned-card .link-btn { margin-top: 12px; }

/* ===== SUGGESTIONS ===== */
.rec-help { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.mode-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mode-toggle, .role-toggle {
  background: #fff; color: var(--navy); border: 2px solid var(--border); border-radius: 100px;
  padding: 7px 16px; cursor: pointer; font-family: Poppins, sans-serif; font-weight: 500; font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.mode-toggle:hover, .role-toggle:hover { border-color: var(--navy); }
.mode-toggle.active, .role-toggle.active { background: var(--navy); border-color: var(--navy); color: #fff; }
/* Rôle dans l'échange (formulaire de préparation) : pas de marge basse, l'aide suit */
.role-toggles { margin-bottom: 6px; }

/* Propositions d'objectifs en un clic, termes du vocabulaire */
.quick-fills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-fills:empty { display: none; }
.quick-fill {
  background: var(--bg-soft); color: var(--navy); border: 1px dashed var(--border); border-radius: 100px;
  padding: 4px 12px; cursor: pointer; font-family: Mulish, sans-serif; font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.quick-fill:hover { border-color: var(--navy); background: #fff; }
.quick-fill.used { opacity: 0.45; cursor: default; }
.vocab-add { display: flex; gap: 8px; align-items: center; }
.vocab-add .input { flex: 1; min-width: 0; }
.vocab-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vocab-list:empty { display: none; }
.vocab-term {
  background: var(--yellow-light); color: var(--navy); border-radius: 100px; padding: 3px 12px;
  font-size: 13px; font-weight: 600;
}
#instantSuggestionsBtn.disabled { opacity: 0.45; cursor: default; transform: none; }

.suggestions-panel { margin-top: 20px; }
.suggestion-item {
  border-left: 4px solid var(--yellow); background: var(--bg-soft); border-radius: 0 8px 8px 0;
  padding: 12px 16px; margin-bottom: 10px; font-size: 15px; color: var(--text);
}
.suggestion-item[data-priority="high"] { border-left-color: var(--navy); }
.suggestion-time { font-size: 12px; color: var(--muted); margin-top: 4px; }

#recordingInfo:empty { display: none; }

/* ===== RÉSULTAT ===== */
.status-banner.processing { background: var(--warn-bg); }
.status-banner.processing h3, .status-banner.processing p { color: var(--warn); }
#resultStatusDetail:empty { display: none; }
.share-block { margin-top: 24px; gap: 8px; }
.share-block .btn-row { margin-top: 8px; }
.audio-preview { margin-top: 28px; }
.audio-preview audio { width: 100%; margin-bottom: 10px; }
.audio-preview .link-btn { text-decoration: none; display: inline-block; margin: 0 18px 8px 0; }

@media (max-width: 680px) {
  .timer { font-size: 40px; }
  .rec-controls .btn, .abandoned-card .btn { width: 100%; }
  .rec-meta .sep { display: none; }
  .rec-meta span { display: block; }
}
