:root {
  --bg: #0f1420; --card: #182031; --ink: #e8ecf4; --muted: #8b96ad;
  --accent: #4f8cff; --sdr: #23406e; --prospect: #2a3346; --ok: #2ecc71; --warn: #f1c40f; --bad: #e74c3c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--ink); }
header { padding: 24px; text-align: center; }
header h1 { margin: 0 0 4px; font-size: 22px; }
.sub { color: var(--muted); margin: 0; }
.hero { padding: 40px 20px 28px; background: radial-gradient(1200px 300px at 50% -60px, rgba(79,140,255,.22), transparent 70%); }
.hero .brand { font-size: 13px; letter-spacing: 4px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.hero .brand-logo { height: 60px; width: auto; margin-bottom: 12px; }
.hero h1 { font-size: 34px; font-weight: 800; margin: 0 0 8px; background: linear-gradient(90deg, #fff, #b9c7e6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-size: 15px; }
.hero .sub strong { color: var(--ink); }
.btn-ghost { display: inline-block; margin-top: 14px; padding: 8px 16px; border: 1px solid #2a3550; border-radius: 20px; background: rgba(255,255,255,.03); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border-radius: 12px; padding: 16px; text-align: center; border: 1px solid #1c2536; }
.step-ico { font-size: 26px; }
.step-t { font-weight: 700; margin: 6px 0 3px; font-size: 14px; }
.step-d { font-size: 12px; color: var(--muted); line-height: 1.4; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
body.dash main { max-width: 1120px; }
.table-wrap { overflow-x: auto; }
.card { background: var(--card); border-radius: 14px; padding: 20px; margin-bottom: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.card h2 { margin-top: 0; font-size: 16px; }
.hidden { display: none; }
label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input, select { width: 100%; padding: 10px; margin-top: 4px; border-radius: 8px; border: 1px solid #2a3550; background: #0e1524; color: var(--ink); }
button { background: var(--accent); color: #fff; border: 0; padding: 11px 18px; border-radius: 9px; font-weight: 600; cursor: pointer; margin-top: 12px; }
button.secondary { background: #33405c; }
button.cta { width: 100%; padding: 14px; font-size: 16px; margin-top: 16px; background: linear-gradient(90deg, var(--accent), #6aa0ff); box-shadow: 0 6px 18px rgba(79,140,255,.3); }
button.cta:hover { filter: brightness(1.08); }
.case-info { background: #0e1524; border-radius: 8px; padding: 12px; font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.case-info .pourquoi { background: rgba(241,196,15,.08); border-left: 3px solid var(--warn); padding: 8px 10px; margin: 8px 0; border-radius: 6px; color: #d9dee8; }
.case-info .pourquoi .lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--warn); font-weight: 700; margin-bottom: 3px; }
.case-info .odoo-link { display: inline-block; margin-top: 6px; color: var(--accent); text-decoration: none; font-weight: 600; }
.case-info .odoo-link:hover { text-decoration: underline; }
.phase-badge { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.phase-badge span { color: var(--accent); font-weight: 600; }
.chat { min-height: 260px; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 82%; font-size: 14px; line-height: 1.45; }
.msg .who { display: block; font-size: 11px; opacity: .6; margin-bottom: 3px; }
.msg.sdr { background: var(--sdr); align-self: flex-end; }
.msg.prospect { background: var(--prospect); align-self: flex-start; }
#turnForm { display: flex; gap: 8px; margin-top: 12px; }
#turnForm input { margin: 0; }
#turnForm button { margin: 0; }
.verdict { font-weight: 700; padding: 10px; border-radius: 8px; text-align: center; margin-bottom: 14px; }
.verdict-VALIDE { background: rgba(46,204,113,.18); color: var(--ok); }
.verdict-A-CONSOLIDER { background: rgba(241,196,15,.16); color: var(--warn); }
.verdict-A-RETRAVAILLER { background: rgba(231,76,60,.16); color: var(--bad); }
table.scores { width: 100%; border-collapse: collapse; }
table.scores td { padding: 6px 8px; border-bottom: 1px solid #232d44; font-size: 14px; }
table.scores td:first-child { color: var(--muted); text-transform: capitalize; }
.num { margin-left: 8px; color: var(--muted); font-size: 12px; }
.coach { background: #0e1524; padding: 12px; border-left: 3px solid var(--accent); border-radius: 6px; }
.muted { color: var(--muted); font-size: 12px; }
.req { color: var(--warn); font-size: 11px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.check input { width: auto; margin: 0; }
.role { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-right: 8px; }
.role-SDR { background: rgba(79,140,255,.2); color: var(--accent); }
.role-AE { background: rgba(46,204,113,.2); color: var(--ok); }
.mic { background: #33405c; padding: 10px 14px; }
.mic.listening { background: var(--bad); animation: pulse 1s infinite; }
.msg.pending .dots { letter-spacing: 3px; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.pitch-note { background: linear-gradient(90deg, rgba(46,204,113,.12), rgba(79,140,255,.1)); border: 1px solid #2a3550; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #d9dee8; margin: 6px 0 14px; line-height: 1.5; }
.audio-note { background: rgba(79,140,255,.1); border: 1px solid #2a3550; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #cdd6e6; margin: 10px 0; line-height: 1.5; }
.dash-link { display: inline-block; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 13px; }
.dash-link:hover { text-decoration: underline; }
table.dash { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dash { min-width: 100%; }
table.dash th { text-align: left; color: var(--muted); font-weight: 600; padding: 7px 9px; border-bottom: 1px solid #2a3550; font-size: 10px; text-transform: uppercase; white-space: nowrap; }
table.dash td { padding: 7px 9px; border-bottom: 1px solid #1c2536; white-space: nowrap; }
table.dash td:nth-child(3) { white-space: normal; max-width: 180px; }
table.dash .score { font-weight: 700; color: var(--accent); }
table.dash .ok { color: var(--ok); font-weight: 600; }
table.dash .no { color: var(--muted); }
table.dash .tag { background: rgba(46,204,113,.2); color: var(--ok); font-size: 10px; padding: 1px 6px; border-radius: 4px; }
table.dash .v-VALIDE { color: var(--ok); font-weight: 600; }
table.dash .v-A-CONSOLIDER { color: var(--warn); font-weight: 600; }
table.dash .v-A-RETRAVAILLER { color: var(--bad); font-weight: 600; }
.feedback-box { background: #0e1524; border-radius: 8px; padding: 14px 16px; margin: 16px 0; }
.feedback-box h3 { margin: 0 0 4px; font-size: 15px; }
.feedback-box textarea { width: 100%; margin-top: 8px; padding: 10px; border-radius: 8px; border: 1px solid #2a3550; background: #0b1120; color: var(--ink); resize: vertical; font-family: inherit; }
.fb-row { display: flex; align-items: center; gap: 12px; }
.fb-item { border-bottom: 1px solid #1c2536; padding: 10px 0; }
.fb-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.fb-msg { font-size: 14px; color: #d9dee8; white-space: pre-wrap; }
.challenge-banner { background: linear-gradient(90deg, rgba(79,140,255,.18), rgba(46,204,113,.12)); border: 1px solid #2a3550; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; color: #e8ecf4; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }
.card-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.sotw { background: linear-gradient(135deg, #1b2740, #182031); }
.sotw-name { font-size: 20px; font-weight: 800; color: #ffd76a; }
.sotw-stat { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ch-desc { font-size: 14px; margin-bottom: 8px; }
.ch-bar { background: #0b1120; border-radius: 6px; height: 12px; overflow: hidden; border: 1px solid #2a3550; }
.ch-fill { background: linear-gradient(90deg, var(--accent), var(--ok)); height: 100%; transition: width .4s; }
.ch-val { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }
table.dash .badges span { font-size: 15px; cursor: default; }
.call-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.call-actions button { margin-top: 0; }
button.danger { background: #5a2530; }
button.danger:hover { background: #6e2c39; }
table.dash .v-NON-TERMINE { color: var(--warn); font-style: italic; }
.debrief-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 620px) {
  .debrief-actions button, #turnForm button, #startBtn { flex: 1; }
  .chat { max-height: 52vh; }
  header h1 { font-size: 19px; }
  .msg { max-width: 90%; }
}
footer { text-align: center; color: var(--muted); padding: 20px; }
