:root{
  --bg: #ffffff;
  --panel: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --btn-blue: #007bff;
  --btn-color: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(16,24,40,0.06);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Base */
* { box-sizing: border-box; }
html, body { height:100%; margin:0; background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
.container { max-width:1200px; margin:0 auto; padding:18px; display:flex; flex-direction:column; gap:18px; }

/* Top bar */
.top-bar { display:flex; justify-content:center; align-items:center; padding:14px 0; border-bottom:1px solid #e6e9ee; }
.top-center { display:flex; gap:18px; align-items:center; width:100%; max-width:980px; padding:0 12px; }
.top-center h1 { margin:0; font-size:28px; font-weight:700; }

/* status bar */
.mr-statusbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e6e9ee;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.mr-status-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-height: 20px;
}
.mr-status-text{
  font-size: 13px;
  color: #111827;
}
.mr-spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.12);
  border-top-color: rgba(0,0,0,0.55);
  animation: mrspin 0.9s linear infinite;
}
@keyframes mrspin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.mr-cancel{
  background: #111827;
}

/* disabled busy button visual */
button[disabled], .btn[disabled]{
  opacity: 0.60;
  cursor: not-allowed;
}

/* small inline loader in buttons */
.mr-btn-spinner{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(255,255,255,0.95);
  animation: mrspin 0.9s linear infinite;
}

/* layout pour input + indicateur + bouton reset */
.session-meta{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.session-meta input { padding:10px 12px; border-radius:10px; border:1px solid #e6e9ee; width:420px; max-width:60vw; }

/* Saved indicator */
.saved-indicator { display:inline-block; font-size:12px; color:#0b8235; background:rgba(11,130,53,0.08); padding:4px 8px; border-radius:8px; border:1px solid rgba(11,130,53,0.12); opacity:0; transition:opacity .25s; }
.saved-indicator.visible { opacity:1; }

/* TOP FORMS */
.top-forms {
  display:flex;
  gap:18px;
  align-items: stretch;
  width:100%;
}

/* distribute space */
.participants-panel {
  flex: 1.35 1 60%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid #e6e9ee;
}
.masked-panel {
  flex: 0.65 1 40%;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid #e6e9ee;
}

/* heading row */
.heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.heading-row h2, .heading-row h4 { margin: 0; padding: 0; }
.heading-row h2 { font-size: 18px; }
.heading-row h4.muted { font-size: 14px; color: var(--muted); font-weight: 400; }

/* list grow */
.panel .list {
  flex: 1 1 auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  padding:6px;
  margin:0;
}

/* participant / masked row */
.participant-item {
  display:flex;
  gap:8px;
  align-items:center;
  padding:8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.04);
  background: linear-gradient(180deg, rgba(0,0,0,0.01), transparent);
  width:100%;
}
.participant-item .p-name { flex: 2 1 60%; padding:10px; border-radius:8px; border:1px solid #e6e9ee; font-size:14px; }
.participant-item .p-company { flex: 1 1 35%; padding:10px; border-radius:8px; border:1px solid #e6e9ee; font-size:14px; }
.participant-item .m-word { flex: 1 1 100%; padding:10px; border-radius:8px; border:1px solid #e6e9ee; font-size:14px; }

/* participant actions */
.participant-actions { display:flex; gap:8px; align-items:center; }

/* Controls & buttons */
.controls-row { display:flex; gap:8px; align-items:center; margin-top:8px; }
button, .btn {
  background-color: var(--btn-blue);
  color: var(--btn-color);
  border: none;
  padding: 7px 15px;
  font-size: 11px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  cursor: pointer;
  border-radius: 7px;
  transition: background-color 0.3s, box-shadow 0.3s;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.btn.small { padding: 6px 10px; }
.icon-small { padding:6px 8px; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; }

/* transcription & main */
.main { display:flex; flex-direction:column; gap:18px; width:100%; }
.transcription-panel { width:100%; }
.content {
  min-height:200px;
  max-height:420px;
  overflow:auto;
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.04);
  background: linear-gradient(180deg,#ffffff,#fbfdff);
}

/* recording & notes */
.recording-notes .recorder-row { display:flex; gap:16px; align-items:flex-start; }
.rec-left { width:340px; display:flex; flex-direction:column; gap:10px; }
.rec-right { flex:1; display:flex; flex-direction:column; gap:8px; }
textarea#meeting-notes { width:100%; min-height:120px; padding:10px; border-radius:8px; border:1px solid #e6e9ee; }

/* small responsive adjustments */
@media (max-width: 1000px) {
  .top-forms { flex-direction: column; align-items: stretch; }
  .participants-panel, .masked-panel { width:100%; }
  .participant-item { flex-direction: column; align-items:stretch; }
  .participant-item .p-name, .participant-item .p-company, .participant-item .m-word { width:100%; }
  .top-center { flex-direction: column; gap:8px; align-items:center; }
}

/* panel footer */
.panel-footer { margin-top: 8px; }
.hint { font-size:13px; color:var(--muted); margin:0; }

/* voice button */
.voice-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.06);
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .15s, transform .08s;
}
.voice-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); transform: translateY(-1px); }
.participant-actions .voice-btn { margin-right: 4px; }

.voice-btn.recording {
  background: #dc2626;
  color: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(220,38,38,0.16);
}

/* play button shown after recording */
.voice-play {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  margin-left:6px;
}

/* toast */
.mr-toast { font-size:13px; }

/* Icon images */
.icon-img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

/* Recording controls layout */
.rec-status-panel .rec-left{
  width: auto;
  flex: 1 1 520px;
  min-width: 320px;
}

/* grid: 3 boutons par ligne sur desktop */
.rec-controls{
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 10px;
  align-items: center;
}
.rec-controls .btn{ white-space: nowrap; }

@media (max-width: 520px) {
  .rec-controls{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
}

.voice-btn.recording .icon-img { }

/* =========================================================
   Pretty modal (confirm/alert/prompt)
   ========================================================= */
.mr-modal-root[hidden] { display:none; }

.mr-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display:flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.mr-modal{
  width: min(720px, 96vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.20);
  border: 1px solid rgba(2, 6, 23, 0.08);
  overflow: hidden;
  transform: translateY(6px);
  animation: mrModalIn 120ms ease-out forwards;
}

@keyframes mrModalIn{
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mr-modal-header{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(2, 6, 23, 0.08);
  background: linear-gradient(180deg, rgba(2,6,23,0.02), transparent);
}

.mr-modal-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  box-shadow: inset 0 0 0 4px rgba(37, 99, 235, 0.55);
  flex: 0 0 auto;
}

.mr-modal-title{
  margin:0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.mr-modal-body{
  padding: 16px;
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
}

.mr-modal-body p{
  margin: 0 0 12px 0;
}

.mr-modal-input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(2,6,23,0.14);
  outline: none;
  font-size: 14px;
}
.mr-modal-input:focus{
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.mr-modal-footer{
  display:flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(2, 6, 23, 0.08);
  background: #fff;
}

.mr-modal-btn{
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid rgba(2,6,23,0.18);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  min-width: 110px;
}
.mr-modal-btn:hover{
  background: rgba(2,6,23,0.03);
}
.mr-modal-btn.primary{
  border-color: rgba(37, 99, 235, 0.9);
  background: rgba(37, 99, 235, 1);
  color: #fff;
}
.mr-modal-btn.primary:hover{
  background: rgba(29, 78, 216, 1);
  border-color: rgba(29, 78, 216, 1);
}
.mr-modal-btn.danger{
  border-color: rgba(220,38,38,0.9);
  background: rgba(220,38,38,1);
  color: #fff;
}
.mr-modal-btn.danger:hover{
  background: rgba(185,28,28,1);
  border-color: rgba(185,28,28,1);
}

.mr-modal-help{
  color: #6b7280;
  font-size: 12.5px;
  margin-top: 8px;
}

/* =========================================================
   NEW: Help callouts / tooltips (like image #2 and #3)
   ========================================================= */

.mr-help-root[hidden] { display:none; }

/* container is positioned by JS with fixed coords */
.mr-help{
  position: fixed;
  z-index: 9997;
  max-width: min(520px, 92vw);
  padding: 10px 12px;
  border-radius: 999px;         /* pill look like image */
  font-size: 13px;
  line-height: 1.15;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.18);
  user-select: none;
  pointer-events: none;         /* behaves like a tooltip */
  transform: translateY(4px);
  animation: mrHelpIn 120ms ease-out forwards;
  white-space: nowrap;
}
@keyframes mrHelpIn{
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* arrow */
.mr-help::after{
  content: "";
  position: absolute;
  left: var(--mr-help-arrow-x, 50%);
  transform: translateX(-50%);
  bottom: -7px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid transparent;
}

/* themes */
.mr-help.dark{
  background: rgba(17, 24, 39, 0.98);
  color: #fff;
}
.mr-help.dark::after{
  border-top-color: rgba(17, 24, 39, 0.98);
}

/* Bleu plus discret */
.mr-help.blue{
  background: rgba(37, 99, 235, 0.92);  /* plus soft que 0.98 */
  color: #fff;
}

/* Retire la flèche */
.mr-help::after{
  display: none !important;
  content: none !important;
}

/* helper wrapper to allow consistent spacing */
.mr-inline-help-anchor{
  position: relative;
}

/* =========================================================
   NEW: Blue notifications system
   ========================================================= */

:root{
  --mr-blue: #1d4ed8;
  --mr-blue-2: #2563eb;
  --mr-blue-bg: rgba(29, 78, 216, 0.10);
  --mr-border: rgba(2, 6, 23, 0.10);
}

/* Status bar message look (blue pill) */
.mr-status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--mr-blue-bg);
  border: 1px solid rgba(29, 78, 216, 0.18);
  color: #0f172a;
  font-size: 13px;
}

/* Toast base (blue) */
.mr-toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  display:flex;
  align-items:flex-start;
  gap:10px;

  background: rgba(29, 78, 216, 0.98);
  color: #fff;

  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.18);
  border: 1px solid rgba(255,255,255,0.16);

  font-size: 13px;
  max-width: min(520px, 92vw);
}
.mr-toast .mr-toast-icon{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  opacity: 0.95;
}
.mr-toast .mr-toast-msg{
  line-height: 1.25;
}

/* Variants (still blue-dominant, with accents) */
.mr-toast--success{ background: rgba(29, 78, 216, 0.98); }
.mr-toast--info{ background: rgba(29, 78, 216, 0.98); }
.mr-toast--warning{ background: rgba(29, 78, 216, 0.98); border-color: rgba(251, 191, 36, 0.55); }
.mr-toast--error{ background: rgba(29, 78, 216, 0.98); border-color: rgba(239, 68, 68, 0.55); }

/* Modal: make primary blue consistent */
.mr-modal-dot{
  background: rgba(29, 78, 216, 0.18);
  box-shadow: inset 0 0 0 4px rgba(29, 78, 216, 0.55);
}
.mr-modal-btn.primary{
  border-color: rgba(29, 78, 216, 0.95);
  background: rgba(29, 78, 216, 1);
}
.mr-modal-btn.primary:hover{
  background: rgba(30, 64, 175, 1);
  border-color: rgba(30, 64, 175, 1);
}

/* Bulle timer enregistrement */
.mr-rec-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.12);
  border: 1px solid rgba(29, 78, 216, 0.22);
  color: #0f172a;
  font-weight: 700;
}

.mr-rec-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 1);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.18);
}

.mr-rec-time{
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Focus ring guide (blue glow) */
.mr-tour-focus{
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.22), 0 14px 40px rgba(29, 78, 216, 0.10) !important;
  border-radius: 12px;
  transition: box-shadow 160ms ease-out;
}

.mr-audio-source{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.mr-audio-label{
  font-size: 13px;
  color: var(--muted);
}
.mr-audio-select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #e6e9ee;
  min-width: 280px;
  background:#fff;
}
