:root {
  color-scheme: light;
  --blue: #245bdb;
  --blue-deep: #1745ac;
  --ink: #192f48;
  --muted: #586b7e;
  --line: #dce4ed;
  --card: #fff;
  --gold: #b47b17;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f3f6fa;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 100% 0%, #e4edff 0%, transparent 42%), #f3f6fa; min-height: 100vh; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; border-bottom: 1px solid #d5dfeb; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.brand-name { font-size: 1.03rem; letter-spacing: -.03em; }
.brand strong { font-weight: 760; }
.brand small { display: block; font-size: .75rem; letter-spacing: .14em; color: var(--muted); margin-top: 6px; font-weight: 650; }
.brand-mark { display: flex; align-items: baseline; justify-content: center; width: 48px; height: 48px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 1.7rem; font-weight: 800; line-height: 48px; box-shadow: 0 5px 14px #192f4814; flex-shrink: 0; }
.brand-mark>span { color: #eeb858; font-size: 1.1rem; margin-left: 1px; }
.connection { display: flex; align-items: center; justify-content: flex-end; gap: 13px; flex-wrap: wrap; max-width: 45%; font-size: .875rem; }
.connection-state { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid #d7e0eb; border-radius: 24px; background: #ffffffb8; color: var(--muted); }
#connection-label { overflow-wrap: anywhere; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8292a5; flex-shrink: 0; }
.status-dot.online { background: #178260; box-shadow: 0 0 0 4px #17826014; }
.status-dot.connecting { background: #b67a14; }
.page-heading { margin: 34px 0 26px; }
.eyebrow { margin: 0 0 11px; font-size: .75rem; font-weight: 750; letter-spacing: .12em; color: var(--blue); line-height: 1.5; }
h1 { font-size: clamp(1.7rem, 3.1vw, 2.55rem); letter-spacing: -.055em; line-height: 1.17; font-weight: 760; margin: 0 0 10px; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin: 0; }
.offline-panel { margin: 0 0 22px; border: 1px solid #d3dfed; border-radius: 15px; background: #ffffffc9; }
.offline-panel>summary { padding: 13px 17px; cursor: pointer; font-size: .875rem; font-weight: 680; color: #3b5479; line-height: 1.6; }
.offline-panel[data-state="ready"] { border-color: #bcd7c9; background: #f0f7f3; }
.offline-panel[data-state="ready"]>summary { color: #285b43; }
.offline-panel[data-state="unavailable"]>summary, .offline-panel[data-state="incomplete"]>summary { color: #745019; }
.offline-help { padding: 0 17px 15px; max-width: 850px; }
.offline-help p { font-size: .875rem; color: var(--muted); line-height: 1.7; margin: 0 0 12px; }
.offline-help p:last-child { margin-bottom: 0; }
.offline-help .offline-update { color: #244d97; font-weight: 650; }
.offline-help .button { margin: 0 0 15px; min-height: 44px; padding: 10px 15px; font-size: .875rem; }
h2 { font-size: 1rem; margin: 0; line-height: 1.45; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.session-card { min-width: 0; background: var(--card); border: 1px solid #dbe4ef; border-radius: 24px; overflow: hidden; box-shadow: 0 12px 35px #1d355708; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 22px 28px; margin: 0; border-bottom: 1px solid var(--line); background: #fcfdff; }
.steps li { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .875rem; color: #66788d; position: relative; line-height: 1.4; }
.steps li>span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; color: #687b90; background: #edf1f7; font-size: .875rem; flex-shrink: 0; }
.steps li.current { color: var(--blue); font-weight: 750; }
.steps li.current>span { background: var(--blue); color: #fff; box-shadow: 0 3px 9px #245bdb22; }
.steps li.done { color: #376951; }
.steps li.done>span { color: #2c6c52; background: #e8f2ed; }
.stage { padding: 38px 34px 32px; min-height: 348px; }
.stage h2 { max-width: 590px; font-size: clamp(1.45rem, 2.2vw, 1.9rem); letter-spacing: -.04em; line-height: 1.25; margin: 0 0 14px; font-weight: 730; outline: none; }
.stage>p:not(.eyebrow) { color: var(--muted); margin: 0 0 22px; max-width: 580px; }
.stage>#stage-footnote { font-size: .875rem; line-height: 1.65; margin: 21px 0 0; }
#stage-footnote:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 25px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 50px; padding: 13px 20px; border-radius: 13px; border: 1px solid transparent; text-decoration: none; font-size: .9375rem; font-weight: 680; line-height: 1.45; transition: background .16s, box-shadow .16s, transform .16s; text-align: center; }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 4px 10px #245bdb18; }
.button.primary:hover:not(:disabled) { background: var(--blue-deep); transform: translateY(-1px); box-shadow: 0 6px 14px #245bdb24; }
.button.secondary { color: var(--ink); background: #fff; border-color: #cfdae8; }
.button.secondary:hover:not(:disabled) { background: #f0f5ff; border-color: #a9bde0; }
.text-button { color: var(--blue); border: 0; background: none; padding: 7px 3px; font-size: .875rem; font-weight: 680; line-height: 1.5; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 28px; border-top: 1px solid var(--line); background: #fafcfe; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.card-bottom>span { max-width: 64%; }
.card-bottom>button { text-align: right; }
.sidebar { display: grid; gap: 20px; min-width: 0; }
.summary-card { padding: 26px; border: 1px solid #dbe4ef; border-radius: 24px; background: #fff; box-shadow: 0 8px 24px #1d355704; }
.section-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.section-top h2 { font-size: 1.03rem; font-weight: 730; letter-spacing: -.025em; }
.pill { font-size: .75rem; border-radius: 20px; padding: 5px 10px; background: #eef3fc; color: #425f8c; font-weight: 650; }
.muted { color: var(--muted); font-size: .875rem; }
.summary-card>.muted { margin: 12px 0 20px; }
.session-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.session-metrics>div { min-width: 0; padding: 16px 14px; border-radius: 15px; }
.metric-sprint { background: #edf3ff; color: #244d97; }
.metric-pause { background: #eaf3ef; color: #306651; }
.session-metrics .metric-label { display: block; font-size: .875rem; letter-spacing: .07em; font-weight: 750; margin-bottom: 10px; }
.session-metrics strong { font-size: 2.45rem; letter-spacing: -.055em; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; }
.session-metrics .metric-unit { font-size: .875rem; padding-left: 4px; }
.session-metrics>div>span:last-child { display: block; font-size: .875rem; margin-top: 5px; }
.session-metrics>.metric-cycles { display: flex; grid-column: 1 / -1; align-items: baseline; gap: 10px; padding: 12px 15px; background: #f5f7fa; }
.metric-cycles strong { font-size: 1.6rem; }
.session-metrics>.metric-cycles>span { margin: 0; color: var(--muted); }
.summary-note { font-size: .875rem; margin: 19px 0 0; color: var(--muted); line-height: 1.6; }
.guide-card { background: #192f48; color: #fff; border-radius: 24px; padding: 27px 26px; }
.guide-card .eyebrow { color: #b8cae6; font-size: .75rem; }
.guide-card h2 { font-size: 1.2rem; line-height: 1.5; letter-spacing: -.025em; font-weight: 620; }
.guide-card ol { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 22px; }
.guide-card li { display: flex; align-items: flex-start; gap: 13px; }
.guide-number { font-size: .75rem; color: #e9bb6c; font-weight: 700; border-top: 1px solid #e9bb6c77; padding-top: 5px; flex-shrink: 0; }
.guide-card li p { font-size: .875rem; color: #c8d4e3; margin: 0; line-height: 1.65; }
.guide-card li strong { color: #fff; display: block; margin-bottom: 4px; font-weight: 650; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 27px; }
.option { display: flex; align-items: center; gap: 13px; padding: 17px 15px; border: 1px solid #d3deeb; border-radius: 16px; background: #fff; color: var(--ink); min-height: 76px; text-align: left; font-size: 1rem; line-height: 1.5; transition: border-color .15s, background .15s; }
.option>span { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; color: #456188; background: #eef3fc; font-size: .875rem; font-weight: 750; flex-shrink: 0; }
.option:hover:not(:disabled) { border-color: var(--blue); background: #f6f9ff; }
.option.selected { background: #eaf1ff; border-color: var(--blue); opacity: 1; }
.option.selected>span { background: var(--blue); color: white; }
.stage-form label { display: block; margin-top: 24px; font-size: .9375rem; font-weight: 650; }
.stage-form .actions { margin-top: 17px; }
input, select { display: block; width: 100%; min-width: 0; margin-top: 6px; border: 1px solid #b9c9dd; border-radius: 11px; padding: 12px 13px; color: var(--ink); background: #fff; font-size: 1rem; }
input:disabled, select:disabled { background: #f1f4f8; color: #607184; }
input:focus, select:focus { outline: 3px solid #245bdb24; border-color: var(--blue); }
button:focus-visible, a:focus-visible, summary:focus-visible, pre:focus-visible { outline: 3px solid #527de0; outline-offset: 4px; }
.action-note { border: 1px solid #edd6a8; border-radius: 16px; background: #fff7e7; padding: 19px; font-size: 1rem; color: #745019; }
.quiet-note { border-radius: 15px; background: #eff4fc; padding: 18px; margin: 22px 0; color: #3b5479; font-size: .9375rem; }
.pre-session-tips { list-style: none; padding: 0; margin: 26px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.tip { padding: 21px; border-radius: 18px; border: 1px solid #dce5ef; background: #fbfcfe; }
.tip-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #e9f0ff; color: #2c58aa; margin-bottom: 15px; }
.tip-icon svg { width: 23px; height: 23px; }
.tip h3 { font-size: 1rem; line-height: 1.4; font-weight: 740; letter-spacing: -.02em; margin: 0 0 8px; }
.tip p { font-size: .9375rem; line-height: 1.7; color: var(--muted); margin: 0; }
.tip-phone { background: #edf3ff; border-color: #dbe6ff; }
.tip-phone .tip-icon { color: #fff; background: var(--blue); }
.tip-pause { background: #eef5f1; border-color: #dbe9e1; }
.tip-pause .tip-icon { color: #2f6d51; background: #dcebe2; }
.tip-move .tip-icon { color: #845e22; background: #fbefd8; }
.tip-snack .tip-icon { color: #5e5987; background: #efedf9; }
.start-cue { display: flex; align-items: center; gap: 15px; background: #fff6e5; border: 1px solid #ecd4a4; padding: 20px; border-radius: 17px; }
.cue-icon { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; background: #f4dfb4; border-radius: 50%; color: #7b5314; }
.cue-icon svg { width: 25px; height: 25px; }
.start-cue strong { font-size: 1rem; font-weight: 730; color: #634612; }
.start-cue p { font-size: .875rem; margin: 5px 0 0; color: #785822; }
.review-cue { display: flex; align-items: flex-start; gap: 12px; font-size: .9375rem; line-height: 1.65; color: #3d5677; margin: 23px 0 0; }
.blue-light { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #e7eefc; margin: 8px 3px 0; flex-shrink: 0; }
.missed-review { padding: 15px 17px; margin: 19px 0 0; color: #785218; background: #fff7e7; border-left: 3px solid #c78b23; border-radius: 0 12px 12px 0; font-size: .9375rem; }
.stage[data-screen="ready"]>.eyebrow { color: #8b621e; }
.session-success { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: 18px; background: #eaf4ef; color: #2c674c; margin-top: 23px; }
.session-success svg { width: 29px; height: 29px; flex-shrink: 0; }
.session-success strong { font-size: 1rem; font-weight: 680; }
.notice { padding: 19px 23px; border: 1px solid #cbd9f5; background: #edf3ff; border-radius: 17px; margin-bottom: 22px; font-size: 1rem; }
.notice h2 { font-size: 1.05rem; margin-bottom: 7px; }
.notice p { margin: 0; }
.notice .actions { margin-top: 15px; }
.notice.error { background: #fff1f2; border-color: #edcdd1; color: #922d3a; }
.notice.information { background: #fff7e7; border-color: #ecd49f; color: #765016; }
.diagnostics { margin-top: 25px; border: 1px solid #d9e2ec; border-radius: 18px; background: #ffffff9c; }
.diagnostics>summary { cursor: pointer; padding: 19px 23px; font-size: .9375rem; font-weight: 680; }
.diagnostics>summary>span { font-weight: 400; color: var(--muted); font-size: .875rem; margin-left: 14px; }
.diagnostics[open] { background: #fff; }
.diagnostics-body { padding: 0 24px 25px; }
.technical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.technical-grid label { min-width: 0; font-size: .875rem; }
.check-label { display: flex; align-items: center; grid-column: 1 / -1; gap: 10px; }
.check-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex-shrink: 0; }
#gatt-info { overflow-wrap: anywhere; }
.log-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 25px; }
.log-toolbar>div { display: flex; gap: 15px; flex-wrap: wrap; }
.log { height: 240px; overflow: auto; background: #162c44; color: #e0e9f7; padding: 18px; border-radius: 14px; font: .8125rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.manual-form { font-size: .875rem; }
.manual-form>div { display: flex; gap: 10px; align-items: center; }
.manual-form .button { margin-top: 6px; flex-shrink: 0; }
.manual-form p { margin-bottom: 0; }
.waiting-line { display: flex; align-items: center; gap: 11px; padding: 18px 0; color: var(--muted); font-size: .875rem; }
.spinner { width: 16px; height: 16px; border: 2px solid #d5dfed; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { display: flex; justify-content: space-between; gap: 20px; font-size: .75rem; color: #617388; margin: 27px 0 34px; }
.footer>span:first-child { font-weight: 600; }
.footer>span:first-child>span { padding-inline: 5px; }
.skip { position: fixed; left: 16px; top: -90px; z-index: 10; background: var(--blue); color: #fff; padding: 12px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 40px); }
  .workspace { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; }
  .stage { padding: 30px 26px; }
  .steps { padding: 19px 17px; }
  .steps li { flex-direction: column; gap: 6px; }
  .summary-card, .guide-card { padding: 23px; }
  .pre-session-tips { gap: 10px; }
  .tip { padding: 17px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; align-items: start; }
  .stage { padding: 32px; min-height: 0; }
  .steps { padding: 21px; }
  .steps li { flex-direction: row; }
  .page-heading { margin-top: 28px; }
  .footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 28px); }
  .header { min-height: 0; padding-block: 19px 16px; gap: 14px; flex-wrap: wrap; }
  .brand { gap: 11px; }
  .brand-mark { width: 43px; height: 43px; font-size: 1.5rem; line-height: 43px; border-radius: 14px; }
  .brand-name { font-size: 1rem; }
  .brand small { font-size: .75rem; }
  .connection { max-width: 100%; width: 100%; justify-content: space-between; gap: 9px; }
  .connection-state { padding: 5px 10px; font-size: .875rem; }
  .connection .text-button { padding: 3px; }
  .page-heading { margin: 24px 3px 23px; }
  .page-heading .eyebrow { font-size: .75rem; letter-spacing: .1em; margin-bottom: 9px; }
  h1 { font-size: 1.8rem; }
  .page-heading p:not(.eyebrow) { font-size: .9375rem; }
  .session-card { border-radius: 21px; }
  .steps { padding: 18px 10px; }
  .steps li { flex-direction: column; gap: 7px; font-size: .875rem; }
  .steps li>span { width: 29px; height: 29px; }
  .stage { padding: 28px 21px 25px; }
  .stage h2 { font-size: 1.6rem; }
  .stage>.eyebrow { font-size: .75rem; letter-spacing: .09em; }
  .stage .button { width: 100%; }
  .actions { gap: 10px; margin-top: 23px; }
  .card-bottom { padding: 15px 20px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .card-bottom>span { max-width: none; }
  .card-bottom>button { text-align: left; }
  .sidebar { grid-template-columns: 1fr; gap: 18px; }
  .summary-card, .guide-card { padding: 24px; border-radius: 21px; }
  .section-top { flex-wrap: nowrap; }
  .section-top h2 { font-size: 1rem; }
  .session-metrics .metric-label { font-size: .875rem; }
  .guide-card .eyebrow { font-size: .75rem; }
  .guide-card h2 { font-size: 1.25rem; }
  .options { grid-template-columns: 1fr; gap: 10px; margin-top: 23px; }
  .option { min-height: 66px; padding: 14px; border-radius: 14px; }
  .pre-session-tips { grid-template-columns: 1fr; gap: 11px; }
  .tip { display: grid; grid-template-columns: 37px minmax(0, 1fr); gap: 6px 13px; padding: 18px; border-radius: 16px; }
  .tip-icon { width: 37px; height: 37px; border-radius: 12px; grid-row: 1 / 3; margin: 0; }
  .tip-icon svg { width: 22px; height: 22px; }
  .tip h3 { margin: 0; align-self: center; }
  .tip p { grid-column: 2; line-height: 1.65; }
  .start-cue { padding: 18px; align-items: flex-start; gap: 13px; }
  .cue-icon { width: 38px; height: 38px; }
  .cue-icon svg { width: 23px; height: 23px; }
  .review-cue { font-size: .9375rem; }
  .diagnostics { margin-top: 21px; border-radius: 17px; }
  .diagnostics>summary { padding: 18px; font-size: .875rem; }
  .diagnostics>summary>span { display: block; margin: 5px 0 0 17px; font-size: .8125rem; }
  .diagnostics-body { padding: 0 18px 20px; }
  .technical-grid { grid-template-columns: 1fr; }
  .technical-grid .check-label { grid-column: auto; }
  .manual-form>div { flex-direction: column; align-items: stretch; }
  .notice { padding: 18px; font-size: .9375rem; }
  .notice .actions .button { width: 100%; }
  .log-toolbar>div { gap: 10px; }
  .footer { margin: 24px 3px 30px; }
}
@media (max-width: 350px) {
  .stage { padding-inline: 16px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .steps li { flex-direction: row; justify-content: flex-start; font-size: .875rem; }
  .section-top { flex-wrap: wrap; }
  .tip { grid-template-columns: 1fr; }
  .tip-icon { grid-row: auto; margin-bottom: 6px; }
  .tip p { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Conserver une séance lisible pendant une interruption de la liaison. */
.status-dot.interrupted { background: #b37a20; box-shadow: 0 0 0 4px #b37a2014; }
.notice.success { background: #edf6f0; border-color: #cbdfd2; color: #2c6248; }
.stage[data-screen="recovery"]>.eyebrow { color: #8b621e; }
.stage[data-screen="recovery"][data-connection="online"]>.eyebrow { color: #30684d; }
.connection-assurance { padding: 19px 21px; border-radius: 16px; border: 1px solid #e8d9b5; background: #fff8e9; color: #6a501f; font-size: 1rem; line-height: 1.7; margin: 23px 0 0; }
.last-question { padding: 19px 21px; border-radius: 16px; border: 1px solid #dbe4ef; background: #f4f7fc; margin: 23px 0 0; }
.last-question>span { display: block; color: #596d84; font-size: .875rem; margin-bottom: 8px; }
.last-question strong { display: block; font-size: 1rem; font-weight: 680; }
.last-question p { color: #715622; font-size: .9375rem; margin: 12px 0 0; }
.reconnect-help { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 17px; }
.reconnect-help>summary { cursor: pointer; color: var(--blue); font-size: .875rem; font-weight: 650; }
.reconnect-help>p { font-size: .875rem; color: var(--muted); margin: 15px 0 12px; }
.reconnect-help .button { font-size: .875rem; min-height: 44px; padding-block: 10px; }
