/* Studio Interview : styles communs aux pages journaliste et invité.
   Parti pris : une régie claire et posée. Gris porcelaine, panneaux presque blancs, encre bleu-nuit,
   et le rouge Écoutez l'info réservé à ce qui compte : l'action principale, l'enregistrement, le focus. */
:root {
  color-scheme: light;
  --page: #E9ECF0;
  --panel: #FBFBFC;
  --field: #FFFFFF;
  --soft: #F0F2F5;
  --ink: #1A1F2B;
  --ink-2: #5A6473;
  --ink-3: #8A93A1;
  --line: #D6DBE2;
  --line-strong: #B9C0CA;
  --accent: #E2231A;
  --accent-deep: #BF1B13;
  --accent-ink: #FFFFFF;
  --accent-glow: rgba(226, 35, 26, 0.16);
  --brand-red: #FF3330;
  --journ: #1A1F2B;
  --guest: #E2231A;
  --rec: #E2231A;
  --ok: #1E8E5A;
  --wait: #B7791F;
  --warn-bg: #FFF5E3;
  --shadow: 0 1px 2px rgba(26, 31, 43, 0.06), 0 10px 28px rgba(26, 31, 43, 0.06);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.wrap.wide { max-width: 1080px; }

/* En-tête : les deux logos, le titre, et un court trait rouge */
.top { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; background: var(--brand-red); border-radius: 3px; }
.logos { display: flex; align-items: center; gap: 10px; }
.logos img { display: block; width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 1px 3px rgba(26, 31, 43, 0.18); }
.logos img.round { border-radius: 50%; }
.eyebrow { margin: 0; font-size: 14px; color: var(--ink-2); font-weight: 500; }
h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1.05; letter-spacing: 0.005em; text-wrap: balance; }
h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: 0.01em; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* Panneaux */
.card {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }

/* Titre de panneau avec action à droite */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.card-head .btn { padding: 6px 14px; font-size: 14px; }

/* Champs */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="password"], select {
  font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background-color: var(--field);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 11px 14px; width: 100%; min-width: 0;
  box-shadow: inset 0 1px 2px rgba(26, 31, 43, 0.07);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:hover, input[type="password"]:hover, select:hover { border-color: var(--ink-3); }
input[type="text"]:focus, input[type="password"]:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow);
}
input::placeholder { color: var(--ink-3); }
input[readonly] { background-color: var(--soft); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%235A6473' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input.mono { font-family: var(--font-mono); font-size: 14px; }

/* Boutons */
.btn {
  font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--ink); background: var(--field);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 18px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(26, 31, 43, 0.06);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { border-color: var(--ink-2); background: var(--soft); }
a.btn { display: inline-block; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--soft); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > .grow { flex: 1 1 240px; min-width: 0; }

.notice { border: 1px solid var(--wait); background: var(--warn-bg); border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.notice.err { border-color: var(--accent); background: #FFF0EF; }

/* Voyants */
.status { display: flex; align-items: center; gap: 8px 12px; }
.status > :not(.dot) { flex: 1 1 0; min-width: 0; }
.status > .btn { flex: 0 0 auto; padding: 6px 14px; font-size: 14px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.wait { background: var(--wait); animation: pulse 1s ease-in-out infinite; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(30, 142, 90, 0.14); }
.dot.live { background: var(--rec); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot.wait, .dot.live { animation: none; } }

/* Voies audio : jauge + réglages */
.chan { display: flex; flex-direction: column; gap: 12px; }
.chan + .chan { padding-top: 20px; border-top: 1px solid var(--line); }
.chan-head { display: flex; align-items: center; gap: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.swatch.j { background: var(--journ); }
.swatch.g { background: var(--guest); }
.chan-head strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: 0.01em; }
.chan-head .aside { margin-left: auto; font-size: 14px; color: var(--ink-2); }

.meter { position: relative; display: flex; flex-direction: column; gap: 3px; }
.meter .bar { position: relative; height: 12px; background: #E1E5EB; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(26, 31, 43, 0.12); }
.meter .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ok); border-radius: 999px; }
.meter[data-zone="warn"] .fill { background: var(--wait); }
.meter[data-zone="hot"] .fill { background: var(--rec); }
.meter .peak { position: absolute; top: 0; bottom: 0; width: 3px; left: 0; background: var(--ink); border-radius: 2px; }
.meter .scale { position: relative; height: 14px; font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.meter .scale span { position: absolute; transform: translateX(-50%); }
.meter .scale span:first-child { transform: none; }
.meter .clip { position: absolute; right: 0; top: -22px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--rec); border-radius: 6px; padding: 1px 8px; }
.meter.thin .bar { height: 7px; }
.meter.thin .peak { display: none; }

.ctl { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 64px; align-items: center; gap: 10px; font-size: 14px; }
.ctl output { font-family: var(--font-mono); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
@media (max-width: 480px) { .ctl { grid-template-columns: minmax(0, 1fr) 60px; } .ctl label { grid-column: 1 / -1; } }

/* Curseurs */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: #CBD1DA; border-radius: 4px; }
input[type="range"]::-moz-range-track { height: 4px; background: #CBD1DA; border-radius: 4px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(26, 31, 43, 0.25); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(26, 31, 43, 0.25); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-glow); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-glow); }

/* Enregistrement */
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.recbtn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 17px; font-weight: 600;
  color: #fff; background: var(--rec); border: 0; border-radius: 999px; padding: 13px 26px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(226, 35, 26, 0.3); transition: background-color 0.15s ease;
}
.recbtn:hover:not(:disabled) { background: var(--accent-deep); }
.recbtn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.recbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.recdot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.recbtn.on { background: var(--ink); box-shadow: 0 6px 18px rgba(26, 31, 43, 0.3); }
.recbtn.on .recdot { border-radius: 2px; background: var(--brand-red); }
.timer { font-family: var(--font-mono); font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tstat { flex: 1 1 180px; min-width: 0; color: var(--ink-2); }
.recbanner { display: flex; align-items: center; gap: 10px; border: 1px solid var(--accent); background: #FFF0EF; border-radius: 10px; padding: 10px 14px; font-weight: 600; }

/* Fichiers obtenus */
.take { display: flex; flex-direction: column; gap: 8px; }
.take + .take { padding-top: 14px; border-top: 1px solid var(--line); }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.files .kind { font-family: var(--font-display); font-weight: 600; font-size: 18px; min-width: 130px; }
.files a { color: var(--accent-deep); font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; flex: 1 1 220px; min-width: 0; }
.files .size { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Discussion */
.chat-list { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; height: 280px; overflow-y: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.chat-list li { display: flex; flex-direction: column; max-width: 88%; padding: 8px 12px; font-size: 15px; overflow-wrap: anywhere; }
.chat-list li b { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chat-list li.theirs { align-self: flex-start; background: var(--field); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.chat-list li.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 14px 14px 4px 14px; }
.chat-list li.mine b { color: inherit; opacity: 0.85; }
.chat-list li.sys { align-self: center; max-width: 100%; color: var(--ink-2); font-size: 13px; padding: 2px 0; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1 1 auto; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* Écran de remerciement : logos cliquables */
.thanks-logos { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: center; padding: 8px 0 4px; }
.logo-link { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; text-align: center; max-width: 200px; }
.logo-link img { display: block; width: 132px; height: 132px; border-radius: 24px; transition: transform 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 2px 10px rgba(26, 31, 43, 0.18); }
.logo-link img.round { border-radius: 50%; }
.logo-link:hover img, .logo-link:focus-visible img { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(226, 35, 26, 0.3); }
.logo-link:hover span, .logo-link:focus-visible span { color: var(--accent-deep); text-decoration: underline; }
.logo-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .logo-link img { transition: none; } }

@media (max-width: 480px) { h1 { font-size: 32px; } .card { padding: 16px; border-radius: 14px; } .timer { font-size: 28px; } }
