/* Atelier Équipes & POC — styles partagés (console, page d'équipe, écran de projection) */
:root {
  --bg: #f3f5f7; --surface: #ffffff; --sunken: #e8ecf0; --fg: #16202b; --muted: #5a6876; --line: #d3dae1;
  --accent: #0d6b6e; --accent-fg: #ffffff; --accent-soft: #d6ecec;
  --moe: #b4580f; --moe-soft: #fbe7d4; --n2: #a3245a; --n2-soft: #f8dbe7; --dev: #3b4fb8; --dev-soft: #dfe3fa;
  --ok: #2c7a3f; --ok-soft: #dcf0e0; --warn: #9a6a00; --warn-soft: #fbf0cf; --hot: #c0392b; --hot-soft: #fbe0dc;
  --lock: #6b4fa0; --lock-soft: #ebe4f6;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11171d; --surface: #1a222a; --sunken: #232d37; --fg: #e6ebf0; --muted: #9aa8b5; --line: #2f3b47;
    --accent: #4fb8b9; --accent-fg: #0b1a1b; --accent-soft: #173638;
    --moe: #f0a35e; --moe-soft: #3a2614; --n2: #ef7fab; --n2-soft: #3b1a28; --dev: #96a6f5; --dev-soft: #1f2650;
    --ok: #74c88a; --ok-soft: #173322; --warn: #e7c25a; --warn-soft: #3a2f10; --hot: #ff8a7a; --hot-soft: #3d1a16;
    --lock: #b9a2e6; --lock-soft: #2b2340;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header.top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lede { color: var(--muted); max-width: 62ch; margin-top: 4px; }
.hint { font-size: 12px; color: var(--muted); }
.stack { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

nav.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
nav.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
nav.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; display: inline-block; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.danger { color: var(--hot); }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 3px 9px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; }
textarea { width: 100%; resize: vertical; }
label.lbl { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.notice { border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 16px; background: var(--warn-soft); border: 1px solid var(--line); }
.empty { color: var(--muted); font-size: 14px; padding: 16px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 30; font-size: 14px; max-width: calc(100% - 32px); }

.tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 5px; letter-spacing: 0.04em; }
.tag.MOE { background: var(--moe-soft); color: var(--moe); }
.tag.N2 { background: var(--n2-soft); color: var(--n2); }
.tag.DEV { background: var(--dev-soft); color: var(--dev); }
.tag.missing { background: transparent; border: 1px dashed currentColor; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.lock { background: var(--lock-soft); color: var(--lock); }
.pill.hot { background: var(--hot-soft); color: var(--hot); }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.scroll-x { overflow-x: auto; }

/* Chrono */
.clock { display: grid; gap: 6px; }
.clock .time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(3rem, 12vw, 6rem); line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.clock.low .time { color: var(--warn); }
.clock.over .time { color: var(--hot); }
.clock.paused .time { opacity: 0.5; }
.clock .phase-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.bar { height: 8px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 1s linear; }
.clock.low .bar > span { background: var(--warn); }
.clock.over .bar > span { background: var(--hot); }
.timeline { display: flex; gap: 4px; flex-wrap: wrap; }
.timeline span { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--sunken); color: var(--muted); }
.timeline span.done { text-decoration: line-through; }
.timeline span.now { background: var(--accent); color: var(--accent-fg); font-weight: 600; }

/* Cartes événement */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ev-card { background: var(--surface); border: 2px solid var(--lock); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-card.joker { border-style: dashed; border-color: var(--accent); }
.ev-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ev-time { font-family: var(--font-mono); font-size: 12px; color: var(--lock); white-space: nowrap; }
.ev-todo { font-size: 14px; background: var(--sunken); border-radius: 8px; padding: 8px 10px; }

/* Mission */
.need { margin: 0; background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; }
.need blockquote { margin: 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.45; }
.need figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.cdc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cdc label { display: flex; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 8px; background: var(--sunken); cursor: pointer; }
.cdc input { margin-top: 4px; accent-color: var(--accent); }
.cdc .done span { text-decoration: line-through; color: var(--muted); }
.pipeline { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.pipeline span { background: var(--sunken); border-radius: 5px; padding: 1px 7px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: 14px; }
dl.facts { margin: 12px 0 0; display: grid; gap: 10px; }
dl.facts dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; }

@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }

/* Pas à pas « brancher votre IA » (page de mission et board) */
.ia-setup { display: grid; gap: 12px; }
.ia-status { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.ia-status.ok { background: var(--ok-soft); } .ia-status.wait { background: var(--warn-soft); }
.ia-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.ia-tabs button { border: 0; background: none; padding: 8px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.ia-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.ia-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; font-size: 14px; }
.ia-steps li { display: grid; gap: 6px; }
.ia-cmd { display: flex; gap: 8px; align-items: center; background: var(--sunken); border-radius: 8px; padding: 6px 6px 6px 10px; }
.ia-cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-family: var(--font-mono); font-size: 12px; }

/* Feuille de route : tâches proposées par étape (page de mission et board) */
.attendu { margin: 0; background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.taches { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.taches li { display: grid; gap: 2px; font-size: 14px; }
.taches .hint { font-size: 13px; }
.role { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; margin-right: 6px; white-space: nowrap; vertical-align: 1px; }
.role.equipe { background: var(--sunken); color: var(--fg); }
.role.po { background: var(--lock-soft); color: var(--lock); }
.role.build { background: var(--dev-soft); color: var(--dev); }
.role.qualite { background: var(--ok-soft); color: var(--ok); }
.role.commercial { background: var(--moe-soft); color: var(--moe); }

/* Fin d'étape : page floutée en attendant que le maître du jeu lance la suite */
body.is-time-up .wrap { filter: blur(6px); user-select: none; }
.time-up { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 0.25); }
.time-up-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); padding: 28px 24px; max-width: 520px; text-align: center; display: grid; gap: 10px; }
.time-up-card .big { font-size: 40px; line-height: 1; }
.time-up-card .lede { margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) { body .wrap { transition: filter 0.4s; } }
