/* Vue de Pierre sur grand écran (≥ 900 px) — mise en page inspirée de la cible vidéo du 09/11
   (rail d'icônes à pastille glissante, barre du haut, grands titres, entonnoir, tableau en colonnes),
   aux couleurs de la charte de Pierre. Sur téléphone, la vue coach garde la barre du bas. */
.rail, .deskbar { display: none; }

@media (min-width: 900px) {
  body.desk { background:
      radial-gradient(1200px 520px at 18% -10%, rgba(201,164,92,.10), transparent 60%),
      radial-gradient(900px 480px at 100% 0%, rgba(201,164,92,.05), transparent 60%), var(--bg); }
  body.desk .nav { display: none; }
  body.desk .top, body.desk .demo { display: none; }
  body.desk .app { max-width: 1240px; margin: 0 0 0 76px; padding-inline: 32px; padding-block: 0 48px; }
  body.desk .view { padding-top: 26px; gap: 26px; }

  /* rail */
  body.desk .rail { display: flex; position: fixed; inset: 12px auto 12px 12px; width: 52px; z-index: 20; flex-direction: column; align-items: center;
    gap: 6px; padding: 10px 0; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); }
  .rail .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
    font-family: var(--display); font-weight: 800; font-size: 12px; margin-bottom: 10px; }
  .rail nav { position: relative; display: flex; flex-direction: column; gap: 4px; }
  .rail a { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
  .rail a:hover { color: var(--text); }
  .rail a[aria-current="page"] { color: var(--on-accent); }
  .rail a .tip { position: absolute; left: 48px; white-space: nowrap; font-size: 12px; padding: 5px 9px; border-radius: 8px; background: var(--raised);
    border: 1px solid var(--line-2); color: var(--text); opacity: 0; pointer-events: none; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
  .rail a:hover .tip, .rail a:focus-visible .tip { opacity: 1; transform: none; }
  .rail .pill-bg { position: absolute; left: 0; width: 38px; border-radius: 11px; background: var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 0; top: 0; height: 38px; }
  .rail .bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .rail .me { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--raised); display: grid; place-items: center;
    font-size: 11px; font-weight: 700; color: var(--text); cursor: pointer; }

  /* barre du haut */
  body.desk .deskbar { display: flex; position: sticky; top: 12px; z-index: 15; align-items: center; gap: 14px; margin-top: 12px; padding: 8px 10px 8px 16px;
    border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px); }
  .deskbar .crumbs { font-size: 13px; color: var(--muted); white-space: nowrap; }
  .deskbar .crumbs b { color: var(--text); font-weight: 600; }
  .deskbar .crumbs span { margin-inline: 6px; color: var(--faint); }
  .deskbar .search { position: relative; flex: 1; max-width: 380px; margin-left: 8px; }
  .deskbar .search input { width: 100%; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 8px 44px 8px 34px; font-size: 13.5px; color: var(--text); }
  .deskbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
  .deskbar .search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted);
    border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
  .deskbar .results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
    padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.4); display: flex; flex-direction: column; }
  .deskbar .results a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; }
  .deskbar .results a:hover, .deskbar .results a:focus-visible { background: var(--raised); }
  .deskbar .results small { color: var(--muted); }
  .deskbar .spacer { flex: 1; }
  .deskbar .live { font-family: var(--mono); font-size: 11.5px; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
    background: var(--green-soft); border-radius: 999px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; }
  .deskbar .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .deskbar .live.is-demo { color: var(--amber); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
  .deskbar .new { width: auto; padding: 8px 14px; font-size: 13.5px; }

  /* en-tête de page */
  body.desk .hero h1 { font-size: 38px; letter-spacing: -.03em; }
  body.desk .hero .eyebrow { order: 2; font-family: var(--mono); font-size: 12.5px; }
  body.desk .hero { gap: 8px; }
}

/* panneaux, entonnoir, tableau en colonnes — aussi utilisés sur téléphone */
.panel { background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  box-shadow: inset 0 1px 0 rgba(239,232,220,.04); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel-head h3 { font-size: 15px; }
.panel-head p { font-size: 12.5px; color: var(--muted); margin: 0; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); } }

.funnel { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; }
.funnel .step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.funnel .step small { font-size: 12px; color: var(--muted); }
.funnel .step b { font-family: var(--mono); font-weight: 500; font-size: 24px; letter-spacing: -.02em; }
.funnel .step em { font-style: normal; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.funnel .col { position: relative; height: 150px; border-radius: 10px; border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(239,232,220,.05) 6px 7px); overflow: hidden; }
.funnel .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--bg))); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.funnel .rate { position: absolute; top: 8px; left: 8px; font-family: var(--mono); font-size: 11px; color: var(--text); background: var(--raised);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }

.bigstat { display: flex; flex-direction: column; gap: 4px; }
.bigstat b { font-family: var(--mono); font-weight: 500; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.bigstat span { font-size: 12.5px; color: var(--muted); }
.statlist { display: flex; flex-direction: column; font-size: 13.5px; }
.statlist div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.statlist div span:last-child { font-family: var(--mono); }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.board .lane { background: color-mix(in srgb, var(--raised) 60%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.board .lane-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 4px 6px; }
.board .lane-head span:last-child { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.kcard:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); }
.kcard small { color: var(--muted); font-size: 12.5px; }
.kcard .kmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.meter { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bars { width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: reduce) { .funnel .fill, .kcard, .rail .pill-bg { transition: none !important; } }
