/* ============================================================
   LABS — jeu « Autopilot », ligne des services et thématiques
   (ex-accueil Autopilot, sorti de styles.css)
   À charger uniquement sur la page Labs, APRÈS styles.css :
   <link rel="stylesheet" href="../labs.css" />
   ============================================================ */
.home { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 48px; }

/* ---------- intro ---------- */
.home__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
.home__badge { margin-bottom: 0; }
.home__lead { font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-soft); max-width: 66ch; line-height: 1.55; }

/* ---------- carte du jeu ---------- */
.game { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.game__stage { position: relative; background: var(--surface); }
.game__canvas { display: block; width: 100%; height: 320px; }

.game__hud {
  position: absolute; top: 16px; left: 18px; right: 18px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  font-family: 'Press Start 2P', monospace; font-size: 10px; line-height: 1.2; color: var(--ink-soft);
  pointer-events: none;
}
.hud__col { display: flex; flex-direction: column; gap: 8px; }
.hud__col--right { align-items: flex-end; }
.hud__row { display: flex; align-items: center; gap: 8px; }
.hud__now { color: var(--muted); }
.hud__bars { display: inline-flex; gap: 3px; }
.hud__bars span { width: 8px; height: 12px; background: #d9dbe4; }
.hud__meter { position: relative; width: 64px; height: 10px; background: #d9dbe4; }
.hud__meter span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.hud__meter--ink span { background: var(--ink); }
.hud__val { min-width: 40px; text-align: right; }

.game__veil {
  position: absolute; inset: 0; background: rgba(214, 216, 224, 0.72);
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}
.game__banner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border: 2px solid var(--ink); padding: 16px 20px;
  font-family: 'Press Start 2P', monospace; font-size: 11px; line-height: 1.8; color: var(--ink); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}
.game[data-autopilot="off"] .game__veil,
.game[data-autopilot="off"] .game__banner { opacity: 1; }

/* ---------- barre de commande ---------- */
.game__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 14px 18px; border-top: 1px solid var(--border); background: var(--bg);
}
.game__hint { font-size: 15px; color: var(--muted); max-width: 60ch; }

.autopilot {
  display: inline-flex; align-items: center; gap: 14px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 16px; cursor: pointer; font-family: var(--font-body); color: var(--ink);
  transition: border-color .3s var(--ease);
}
.autopilot:hover { border-color: var(--ink); }
.autopilot__label { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.autopilot__name { font-size: 13px; color: var(--muted); }
.autopilot__state { font-family: 'Press Start 2P', monospace; font-size: 12px; }
.autopilot__track { position: relative; width: 48px; height: 26px; border-radius: var(--radius-pill); background: var(--muted-2); transition: background .3s var(--ease); }
.autopilot__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.autopilot[aria-pressed="true"] .autopilot__track { background: var(--accent); }
.autopilot[aria-pressed="true"] .autopilot__knob { transform: translateX(22px); }

/* ---------- tiroir du menu ---------- */
.home__drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.home__drawer-inner { overflow: hidden; min-height: 0; }
.home__drawer .svc-line { opacity: 0; transform: translateY(-10px); transition: opacity .45s var(--ease) .1s, transform .45s var(--ease) .1s; }
.home__drawer[data-open="true"] { grid-template-rows: 1fr; }
.home__drawer[data-open="true"] .svc-line { opacity: 1; transform: none; }
.home__all { margin-top: 4px; }

/* ---------- ligne des services (composant) ---------- */
.svc-line { margin-top: 22px; }
.svc-line__scroll {
  overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); scrollbar-width: thin;
}
.svc-line__svg { display: block; width: 100%; min-width: 860px; height: auto; }
.sl-sky { fill: var(--surface); }
.sl-skyline { fill: #dcdfe8; }
.sl-window { fill: var(--surface); }
.sl-water { fill: #e3e8fc; }
.sl-wave { stroke: #b7c3f9; stroke-width: 3; stroke-dasharray: 8 12; }
.sl-belt { fill: var(--ink); }
.sl-leg { fill: var(--ink); }
.sl-ink { fill: var(--ink); }
.sl-acc { fill: var(--accent); }
.sl-line-ink { stroke: var(--ink); fill: none; }
.sl-line-acc { stroke: var(--accent); fill: none; }
.sl-station { cursor: pointer; outline: none; }
.sl-station .sl-body { transition: transform .45s var(--ease); transform-box: fill-box; }
.sl-station .sl-pedestal { fill: #dcdfe8; transition: fill .35s var(--ease); }
.sl-station .sl-num { font: 700 13px var(--font-head); fill: var(--muted-2); letter-spacing: .06em; transition: fill .3s; }
.sl-station .sl-title { font: 700 15px var(--font-head); fill: var(--ink); letter-spacing: -.01em; transition: fill .3s; }
.sl-station .sl-hit { fill: transparent; }
.sl-station.is-active .sl-body { transform: translateY(-6px); }
.sl-station.is-active .sl-pedestal { fill: var(--accent); }
.sl-station.is-active .sl-num,
.sl-station.is-active .sl-title { fill: var(--accent-ink); }
.sl-station:focus-visible .sl-title { text-decoration: underline; }
.svc-line__panel {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  margin-top: 14px; padding: 16px 22px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); min-height: 74px;
}
.svc-line__num { font: 700 15px var(--font-head); color: var(--accent); letter-spacing: .04em; }
.svc-line__txt { flex: 1 1 320px; min-width: 0; }
.svc-line__title { display: block; font: 700 18px var(--font-head); letter-spacing: -.01em; color: var(--ink); margin-bottom: 3px; }
.svc-line__desc { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; }
.svc-line__cta { font: 500 14.5px var(--font-body); color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.svc-line__cta:hover { color: var(--accent); }
.svc-line__cta .arrow { transition: transform .35s var(--ease); }
.svc-line__cta:hover .arrow { transform: translateX(4px); }
.svc-line__hint { display: none; margin-top: 8px; font-size: 12.5px; color: var(--muted-2); }

/* ---------- petits écrans ---------- */
@media (max-width: 920px) {
  .home { padding-top: calc(var(--nav-h) + 18px); }
  .game__hud { top: 10px; left: 10px; right: 10px; font-size: 7px; gap: 8px; }
  .hud__col { gap: 5px; }
  .hud__bars span { width: 5px; height: 8px; }
  .hud__meter { width: 36px; height: 7px; }
  .hud__val { min-width: 26px; }
  .game__banner { font-size: 8px; padding: 10px 12px; }
  .game__hint { font-size: 14px; }
  .svc-line__hint { display: block; }
}
@media (max-width: 520px) {
  .hud__now { display: none; }
}

/* ---------- thématiques de recherche ---------- */
.themes { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--border); }
.themes .eyebrow { margin-bottom: 16px; }
.themes__intro { display: flex; flex-direction: column; gap: 6px; max-width: 62ch; }
/* titre discret, ton personnel */
.themes__title { font: italic 400 clamp(18px, 1.6vw, 21px)/1.4 var(--font-body); letter-spacing: 0; color: var(--ink-soft); margin: 0; }
.themes__lead { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 46ch; }
.themes__list { list-style: none; margin: 32px 0 0; padding: 0; max-width: 78ch; display: flex; flex-direction: column; gap: 14px; }
.theme { font-size: 16px; line-height: 1.6; color: var(--muted); }
.theme__title { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.theme__desc { font-style: italic; }
.themes__cta { margin-top: 32px; font-size: 15px; font-style: italic; color: var(--muted); }
.themes__cta a { font-style: normal; font-weight: 500; color: var(--accent-ink); text-decoration: none; display: inline-flex; gap: 6px; }
.themes__cta a:hover { color: var(--accent); }
.themes__cta .arrow { transition: transform .35s var(--ease); }
.themes__cta a:hover .arrow { transform: translateX(4px); }

@media (max-width: 640px) {
  .themes { margin-top: 56px; padding-top: 40px; }
  .themes__list { margin-top: 24px; gap: 12px; }
  .theme { font-size: 15px; }
}

/* ---------- page Labs : bouton du hero sans sous-titre ---------- */
.hero h1 + .btn { margin-top: 36px; }

/* ---------- page Labs : bloc ambition + grand visuel ---------- */
.labs-ambition { max-width: 44ch; }
.labs-figure { margin: 40px 0 0; }
.labs-figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg);
}

#recherche { padding-top: 0; }
#recherche .themes { margin-top: 0; padding-top: 48px; }

.about__big .muted {
  display: block;
  font-size: 0.62em;
  line-height: 1.3;
  margin-top: 0.5em;
}

#recit {
  margin-top: 32px;
}