/* La journée — reprend l'interface sombre de KubeLab (kubelab.fr, style.css v186, thème dark) :
   fond noir, encre #ededed, filets #222, accent bronze #967A62, aucun arrondi, méta en mono capitales.
   « No cards, no pills, no glass. Hairlines, lists, mono meta. » */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1080px; --pad: 1.25rem; --ease: 0.12s ease; --radius: 0;
}
html[data-theme="dark"] {
  --bg: #000000; --fg: #ededed; --mute: #888; --faint: #777777; --line: #222; --line-strong: #ededed;
  --soft: #0d0d0d; --ok: #3c3; --err: #f44; --warn: #967A62; --accent: #967A62; --link: #967A62;
  --cta: var(--accent); --cta-text: var(--bg);
  color-scheme: only dark; forced-color-adjust: none;
}
html, body { background-color: var(--bg); color: var(--fg); }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; min-height: 100dvh;
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { flex: 1; width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ═══ SHELL / HEADER (header.site de KubeLab) ═══ */
.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
header.site { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top); }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 0.4rem var(--pad) 0.35rem; min-height: 52px;
  display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; white-space: nowrap; color: var(--fg); font-weight: 600;
  font-size: 14px; letter-spacing: -0.02em; }
.logo-word span { color: var(--mute); font-weight: 500; }
.header-date { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.75rem; min-width: 0; }
.header-date h1 { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.header-meta { display: flex; align-items: center; gap: 0.5rem; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--fg); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.daybar { height: 1px; background: var(--line); }
.daybar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }

/* ═══ BOUTONS (.btn KubeLab) ═══ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: inherit; font-size: 12px;
  font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.7rem 1.1rem; min-height: 44px;
  border: 1px solid var(--fg); border-radius: 0; background: transparent; color: var(--fg); line-height: 1;
  white-space: nowrap; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.btn:active { opacity: 0.85; }
.btn:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
.btn-primary { background: var(--cta); color: var(--cta-text); border-color: var(--cta); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-danger { border-color: var(--line); color: var(--mute); background: transparent; }
@media (hover: hover) {
  .btn-primary:hover { background: transparent; color: var(--cta); }
  .btn-ghost:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
  .btn-danger:hover { border-color: var(--err); color: var(--err); }
}
.btn-sm { font-size: 11px; padding: 0.5rem 0.8rem; min-height: 36px; }
.nav { font-size: 16px; min-width: 40px; padding: 0.35rem 0.6rem; letter-spacing: 0; }

/* ═══ BADGES / MÉTA (.badge, .kicker, .manifest-meta KubeLab) ═══ */
.badge { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute); border: 1px solid var(--line); padding: 0.15rem 0.4rem; background: transparent; white-space: nowrap; }
.badge-warn { color: var(--accent); border-color: var(--accent); }
.badge.b-current { color: var(--accent); border-color: var(--accent); }
.badge.b-done { color: var(--ok); border-color: #1d4d1d; }
.badge.b-missed, .badge.b-abandoned { color: var(--err); border-color: #4d1d1d; }
.badge.b-conflict { color: var(--accent); border-color: var(--accent); }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute);
  font-variant-numeric: tabular-nums; }

/* ═══ GRILLE ═══ */
.grid { display: grid; gap: 2rem; padding-top: 2rem; padding-bottom: 3rem; }
@media (min-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 3rem; }
  .col-list { position: sticky; top: 76px; max-height: calc(100dvh - 100px); overflow: auto; }
}
.col-now { display: grid; gap: 2rem; align-content: start; }

/* ═══ MAINTENANT (detail-hero KubeLab) ═══ */
.now { border-bottom: 1px solid var(--line); padding-bottom: 1.75rem; }
.now-title { font-size: clamp(1.85rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05;
  margin: 0.6rem 0 0.75rem; overflow-wrap: anywhere; }
.lede { font-size: 15px; line-height: 1.55; color: var(--mute); margin: 0 0 1.25rem; max-width: 60ch; }
.lede b { color: var(--fg); font-weight: 600; }
.progress { height: 2px; background: var(--line); overflow: hidden; width: 100%; }
.progress > span { display: block; height: 100%; width: 0; background: var(--fg); transition: width 1s linear; }
.progress-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--mute);
  margin: 0.5rem 0 1.5rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.progress-label b { color: var(--fg); font-weight: 500; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ═══ ENSUITE (manifest-row KubeLab) ═══ */
.upnext { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.upnext-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.5rem; }
.upnext h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.upnext .in { font-family: var(--mono); font-size: 11px; color: var(--fg); white-space: nowrap; letter-spacing: 0.02em; }
.stats { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }
.stats b { color: var(--fg); font-weight: 500; }

/* ═══ DÉROULÉ (section-bar + manifest KubeLab) ═══ */
.section-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--fg); }
.section-bar h2 { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.section-meta { font-family: var(--mono); font-size: 11px; color: var(--mute); letter-spacing: 0.04em; text-transform: uppercase; }
.manifest { list-style: none; }
.row { border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-main { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: start; width: 100%;
  min-height: 56px; padding: 0.85rem 0; background: none; border: 0; text-align: left; }
.time { font-family: var(--mono); font-size: 12px; color: var(--fg); line-height: 1.35; font-variant-numeric: tabular-nums; }
.time small { display: block; color: var(--faint); font-size: 11px; }
.ttl { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.ttl .meta { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--faint); letter-spacing: 0.02em; margin-top: 0.15rem; }
.row.s-current { box-shadow: inset 2px 0 0 var(--accent); }
.row.s-current .row-main { padding-left: 0.75rem; }
.row.s-done .ttl, .row.s-missed .ttl, .row.s-abandoned .ttl { color: var(--mute); }
.row.s-missed .ttl, .row.s-abandoned .ttl { text-decoration: line-through; text-decoration-color: #444; }
.row-more { padding: 0 0 1rem 4.5rem; }
.row-more p { color: var(--mute); font-size: 13px; margin-bottom: 0.75rem; max-width: 62ch; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--fg); color: var(--fg); padding: 0.75rem 1rem; font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.02em; max-width: 90vw; z-index: 50; }

/* ═══ TÉLÉPHONE ═══ */
@media (max-width: 560px) {
  :root { --pad: 1rem; }
  .header-inner { min-height: 48px; }
  .logo { display: none; }
  .header-date { justify-content: flex-start; }
  .grid { padding-top: 1.25rem; gap: 1.5rem; }
  .col-now { gap: 1.5rem; }
  .actions .btn { flex: 1; }
  .row-main { grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; }
  .row-more { padding-left: 0; }
}

/* ═══ CONNEXION (.field KubeLab) ═══ */
body.login { display: grid; place-items: center; }
.login-card { width: min(360px, 90vw); }
.login-card .logo { display: block; margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 0.4rem; }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 0.65rem 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent; color: var(--fg); }
.field input:focus { outline: none; border-bottom-color: var(--fg); }
.login-card .btn { width: 100%; }
.err { font-family: var(--mono); font-size: 12px; color: var(--err); margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ═══ SONNERIE (bandeau d'alarme, bouton « Activer le son ») ═══ */
.alarm-btn { color: var(--accent); border-color: var(--accent); }
.ring { position: sticky; top: calc(53px + env(safe-area-inset-top)); z-index: 39; background: var(--bg);
  border-bottom: 1px solid var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.ring-inner { max-width: var(--max); margin: 0 auto; padding: 0.8rem var(--pad); display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; }
.ring-kicker { color: var(--accent); }
.ring-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
