/* Page d'accueil (spec accueil.md, maquette accueil-tableau-de-bord.html). */
.home { gap: 20px; }
.home .page-head { align-items: flex-start; }
.home-date { margin: 4px 0 0; font-size: 13px; }
.home-shortcuts { flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.stat.is-eco { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.stat.is-eco .stat-head .i { color: var(--ok); }
@media (max-width: 1280px) { .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.stat-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.stat-value { font-size: 28px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 400; color: var(--text-2); }
.stat-sub { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat > .btn-split { position: absolute; right: 14px; top: 14px; }
.stat.is-off { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.stat.is-off .stat-value, .stat.is-off .stat-head { color: var(--danger-text); }
.stat.is-warn .stat-value, .stat.is-warn .stat-head { color: var(--warn-text); }
.stat.is-ok .stat-value { color: var(--ok-text); }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.meter > span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.home-main, .home-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.home-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 16px; font-weight: 500; margin: 0; }
.card-note { margin: -6px 0 0; font-size: 13px; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.link-more:hover { color: var(--text); }
.todo-list, .act-list, .steps { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.todo:first-child { border-top: 0; padding-top: 0; }
.todo-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.todo.is-off .todo-icon { background: var(--danger-bg); color: var(--danger-text); }
.todo.is-warn .todo-icon { background: var(--warn-bg); color: var(--warn-text); }
.todo.is-info .todo-icon { background: var(--info-bg); color: var(--info-text); }
.todo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.todo-text b, .act-text b { font-weight: 500; }
.todo-text small, .act-text small { font-size: 12px; color: var(--text-2); }
.home-screens { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.act { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.act:first-child { border-top: 0; padding-top: 0; }
.act .avatar { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--focus); color: #fff; font-size: 11px; font-weight: 500; }
.act .avatar::before { content: attr(data-initials); }
.act-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.act-thumbs { display: flex; gap: 4px; margin-top: 4px; }
.act-thumbs img { width: 44px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.all-good { flex-direction: row; align-items: center; gap: 16px; border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.all-good h2 { font-size: 16px; font-weight: 500; margin: 0 0 2px; }
.all-good p { margin: 0; font-size: 13px; }
.ok-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-text); }
.ok-icon .i { width: 24px; height: 24px; }
/* « Pour commencer » (maquettes/accueil-premier-acces.html) : bandeau avec aperçu de l'écran, puis trois étapes. */
.start { display: flex; flex-direction: column; gap: 24px; }
.start-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 40px; align-items: center; padding: 32px 32px 32px 40px; }
.start-kicker { font-size: 13px; color: var(--text-2); margin: 0 0 12px; }
.start-kicker b { font-weight: 500; color: var(--text); }
.start-hero h2 { font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 10px; }
.start-hero .lead { max-width: 520px; }
.meter-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 360px; margin-top: 28px; }
.meter-steps span { height: 6px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.meter-steps span.on { background: var(--ok); box-shadow: none; }
.start-screen { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.start-bezel { display: block; aspect-ratio: 16 / 9; border-radius: 10px; padding: 7px; background: #050d1a; box-shadow: 0 10px 30px rgba(11, 31, 58, 0.18); }
.start-stage { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; overflow: hidden; background: #0b1f3a; }
.start-stage img { width: 100%; height: 100%; object-fit: cover; }
.start-stand { display: block; width: 26%; height: 8px; margin: -10px auto 0; background: #050d1a; border-radius: 0 0 6px 6px; }
.start-screen figcaption { font-size: 12px; color: var(--text-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.start-wait .wordmark { color: #e8eef5; font-size: 34px; }
.start-wait .wordmark .wm-dot.wm-last { fill: #f2a81d; }
.start-wait small { color: #9aaabd; font-size: 11px; }
.start-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.start-step { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0; }
.start-step.is-current { border-color: var(--border-strong); box-shadow: inset 0 3px 0 var(--primary); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.step-num { width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.is-current .step-num { background: var(--primary); color: var(--primary-text); }
.is-done .step-num { background: var(--ok-bg); color: var(--ok-text); }
.step-state { font-size: 12px; color: var(--text-3); }
.is-done .step-state { color: var(--ok-text); font-weight: 500; }
.start-step h3 { font-size: 17px; font-weight: 500; margin: 0; }
.start-step p { margin: 0; font-size: 14px; color: var(--text-2); }
.step-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-done { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.start-thumbs { display: flex; }
.start-thumbs img { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; border: 2px solid var(--surface); margin-left: -8px; background: var(--surface-2); }
.start-thumbs img:first-child { margin-left: 0; }
.player-url { display: flex; align-items: center; gap: 4px; height: var(--h); padding: 0 4px 0 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); font-family: "JetBrains Mono", monospace; font-size: 13px; width: fit-content; max-width: 100%; }
.player-url > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-url .is-copied { color: var(--ok-text); }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .start-steps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .start-hero { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
}

@media (max-width: 720px) {
  .home { gap: 16px; }
  .start-hero { padding: 20px; gap: 20px; }
  .start-hero h2 { font-size: 22px; }
  .start-step { padding: 20px; }
  .step-foot .btn { flex: 1; }
  .home .page-head { flex-direction: column; align-items: stretch; }
  .home-shortcuts { justify-content: flex-start; }
  .home-shortcuts .btn { flex: 1 1 auto; justify-content: center; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 22px; }
  .stat > .btn-split { position: static; align-self: flex-start; }
  .home-card { padding: 14px; }
  .todo { flex-wrap: wrap; }
  .todo-text { flex-basis: calc(100% - 44px); }
  .todo > .btn, .todo > .btn-split { margin-left: 44px; }
  .home-screens { grid-template-columns: 1fr; }
}
