/* ONE HOUR — v2. Sobre, grave, déclaratif. Le soin partout, le clin d'œil nulle part. */
:root {
  --bg: #0a0908;
  --bg2: #12100d;
  --ink: #ded7c8;         /* bone */
  --ink-dim: #93897a;     /* ash */
  --ink-faint: #55504a;
  --line: rgba(222, 215, 200, .09);
  --line-strong: rgba(222, 215, 200, .2);
  --ember: #c89b5a;       /* bonfire */
  --ember-dim: rgba(200, 155, 90, .45);
  --ember-glow: rgba(200, 155, 90, .12);
  --death: #9c4a41;       /* dried blood */
  --clear: #84996b;       /* moss */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/* atmosphère : lueur de braise en haut, vignette, grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 38% at 50% -6%, var(--ember-glow), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 30%, transparent 55%, rgba(0, 0, 0, .6) 100%),
    repeating-conic-gradient(rgba(255, 255, 255, .007) 0% .25%, transparent .25% .5%);
}
main, nav.top, footer { position: relative; z-index: 1; }
::selection { background: rgba(200, 155, 90, .28); }
:focus-visible { outline: 1px solid var(--ember); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; align-items: baseline;
  padding: 1.05rem 1.6rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 9, 8, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: "IBM Plex Mono", monospace; font-size: .7rem;
  letter-spacing: .16em; text-transform: uppercase;
}
nav.top a {
  color: var(--ink-dim); text-decoration: none; white-space: nowrap;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
nav.top a:hover { color: var(--ink); }
nav.top a[aria-current] { color: var(--ink); border-bottom-color: var(--ember-dim); }
nav.top .brand { color: var(--ember); margin-right: auto; border-bottom: none; }

main { max-width: 740px; margin: 0 auto; padding: 0 1.4rem 6rem; }

/* ---------- hero ---------- */
.hero { padding: 7.5rem 0 5rem; text-align: center; }
.hero h1 {
  font-size: clamp(2.8rem, 12vw, 7rem); font-weight: 500;
  letter-spacing: .14em; line-height: 1.04;
  text-shadow: 0 0 70px rgba(200, 155, 90, .16);
  animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
.hero .rule {
  width: 170px; height: 1px; margin: 2.1rem auto;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  animation: rise 1.4s .25s cubic-bezier(.2, .7, .2, 1) both;
}
.kicker {
  font-family: "IBM Plex Mono", monospace; font-size: .68rem;
  letter-spacing: .34em; text-transform: uppercase; color: var(--ink-faint);
  animation: rise 1.4s .35s both;
}
.hero p { color: var(--ink-dim); font-size: 1.25rem; animation: rise 1.4s .45s cubic-bezier(.2, .7, .2, 1) both; }
.hero p.kicker { font-size: .68rem; margin-bottom: 1.6rem; color: var(--ink-faint); animation: rise 1.4s .35s both; }
.hero p strong { color: var(--ink); font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.strip {
  display: flex; justify-content: center; gap: 1.2rem 2.4rem; flex-wrap: wrap;
  font-family: "IBM Plex Mono", monospace; font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
  margin-top: 3rem; animation: rise 1.4s .6s both;
}
.strip b { color: var(--ink-dim); font-weight: 500; }

.cta-row { display: flex; justify-content: center; gap: 1rem; margin-top: 3rem; flex-wrap: wrap; animation: rise 1.4s .7s both; }
.cta {
  display: inline-block; padding: .85rem 2.2rem; text-decoration: none;
  font-family: "IBM Plex Mono", monospace; font-size: .74rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ember); border: 1px solid var(--ember-dim); background: transparent;
  transition: background .3s, color .3s, box-shadow .3s, border-color .3s;
  cursor: pointer;
}
.cta:hover { background: var(--ember); border-color: var(--ember); color: var(--bg); box-shadow: 0 0 34px rgba(200, 155, 90, .22); }
.cta.ghost { color: var(--ink-dim); border-color: var(--line-strong); }
.cta.ghost:hover { background: var(--bg2); color: var(--ink); border-color: var(--ink-faint); box-shadow: none; }

/* ---------- sections ---------- */
section { margin-top: 6rem; }
html.js main > section { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
html.js main > section.in { opacity: 1; transform: none; }
h2 {
  display: flex; align-items: center; gap: 1.1rem;
  font-family: "IBM Plex Mono", monospace; font-size: .68rem; font-weight: 500;
  letter-spacing: .3em; text-transform: uppercase; color: var(--ember);
  margin-bottom: 1.8rem;
}
h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
p + p { margin-top: 1rem; }
.dim { color: var(--ink-dim); }
a { color: var(--ink); text-decoration-color: var(--ink-faint); text-underline-offset: 3px; transition: text-decoration-color .25s; }
a:hover { text-decoration-color: var(--ember); }

.decl {
  font-size: 1.45rem; line-height: 1.55; font-style: italic; margin: 2.2rem 0;
  padding-left: 1.5rem;
  border-left: 1px solid transparent;
  border-image: linear-gradient(180deg, var(--ember), transparent) 1;
}

/* panneau à coins gravés */
.panel {
  border: 1px solid var(--line); padding: 1.6rem 1.8rem; margin-top: 1.2rem;
  background:
    linear-gradient(var(--ember-dim), var(--ember-dim)) 0 0 / 13px 1px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 0 0 / 1px 13px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 0 / 13px 1px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 0 / 1px 13px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 0 100% / 13px 1px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 0 100% / 1px 13px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 100% / 13px 1px,
    linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 100% / 1px 13px;
  background-repeat: no-repeat;
  background-color: rgba(18, 16, 13, .5);
}

/* checklist à états */
.checklist { border-top: 1px solid var(--line-strong); }
.checkrow { display: flex; gap: 1rem; align-items: baseline; padding: 1rem .4rem; border-bottom: 1px solid var(--line); }
.checkrow .mark { font-family: "IBM Plex Mono", monospace; font-size: .9rem; width: 1.2rem; flex: none; }
.checkrow .mark.ok { color: var(--clear); }
.checkrow .mark.ko { color: var(--death); }
.checkrow b { color: var(--ink); font-weight: 600; }
.checkrow span { color: var(--ink-dim); font-size: .95rem; }
.checkrow a.fix { font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); margin-left: auto; white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--ember-dim); }

/* étapes d'entrée */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 2rem 0; }
.steps div { background: var(--bg); padding: 1.6rem 1.2rem; text-align: center; }
.steps b {
  display: block; font-family: "IBM Plex Mono", monospace; font-weight: 400;
  font-size: 1.6rem; color: var(--ember); margin-bottom: .5rem; letter-spacing: .1em;
}
.steps span { color: var(--ink-dim); font-size: 1rem; }

/* ---------- règles : ledger ---------- */
ol.rules { list-style: none; border-top: 1px solid var(--line-strong); }
ol.rules li {
  counter-increment: r; padding: 1.3rem .6rem; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 3.2rem 1fr; gap: 1.1rem;
  transition: background .3s;
}
ol.rules li:hover { background: var(--bg2); }
ol.rules li::before {
  content: counter(r, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace; font-size: .78rem; color: var(--ember-dim);
  padding-top: .35rem;
}
ol.rules b { color: var(--ink); font-weight: 600; display: block; }
ol.rules span { color: var(--ink-dim); font-size: .95rem; }

/* ---------- l'argent : reçu ---------- */
table.money {
  width: 100%; border-collapse: collapse; margin: 1.6rem 0;
  font-family: "IBM Plex Mono", monospace; font-size: .8rem;
}
table.money td { padding: .7rem .3rem; border-top: 1px dashed var(--line-strong); color: var(--ink-dim); }
table.money td:last-child { text-align: right; color: var(--ink); white-space: nowrap; }
table.money tr.total td { border-top: 1px solid var(--ember); color: var(--ember); padding-top: .9rem; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line); margin-top: 7rem; padding: 2.4rem 1.4rem 2.8rem;
  text-align: center; font-family: "IBM Plex Mono", monospace;
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
footer::before {
  content: ""; display: block; width: 3px; height: 3px; margin: 0 auto 1.6rem;
  background: var(--ember); border-radius: 50%;
  box-shadow: 0 0 12px 2px rgba(200, 155, 90, .35);
}
footer a { color: var(--ink-dim); text-decoration: none; margin: 0 .8rem; line-height: 2.2; transition: color .25s; }
footer a:hover { color: var(--ember); }

/* ---------- board ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 3.5rem 0;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.stats div { padding: 1.8rem .5rem 1.5rem; text-align: center; border-left: 1px solid var(--line); }
.stats div:nth-child(4n+1) { border-left: none; }
.stats div:nth-child(n+5) { border-top: 1px solid var(--line); }
.stats .n { font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 2.1rem; color: var(--ink); display: block; line-height: 1.2; }
.stats .l { font-family: "IBM Plex Mono", monospace; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.stats .n.zero { color: var(--death); }


table.runs { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.runs th {
  font-family: "IBM Plex Mono", monospace; font-size: .6rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
  text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line-strong);
}
table.runs td { padding: 1rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; transition: background .3s; }
table.runs tbody tr:hover td { background: var(--bg2); }
table.runs td.num { font-family: "IBM Plex Mono", monospace; font-size: .8rem; white-space: nowrap; }
.tag {
  font-family: "IBM Plex Mono", monospace; font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; padding: .18rem .55rem; border: 1px solid var(--line-strong);
  color: var(--ink-dim); white-space: nowrap;
}
.tag.clear, .tag.settled { color: var(--clear); border-color: var(--clear); }
.tag.death { color: var(--death); border-color: var(--death); }
.tag.settling { color: var(--ember); border-color: var(--ember-dim); }
.tag.live { color: var(--ember); border-color: var(--ember); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.method { color: var(--ink-dim); font-size: .88rem; max-width: 34ch; }

/* ---------- run / profil ---------- */
.avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line-strong); padding: 3px; background: var(--bg);
  box-shadow: 0 0 30px rgba(200, 155, 90, .1);
}
.timer {
  font-family: "IBM Plex Mono", monospace; font-weight: 400;
  font-size: clamp(3.4rem, 16vw, 6.5rem);
  text-align: center; letter-spacing: .04em; margin: 1.8rem 0 .4rem;
  text-shadow: 0 0 50px rgba(200, 155, 90, .25);
  font-variant-numeric: tabular-nums;
}
.timer.low { color: var(--death); text-shadow: 0 0 50px rgba(156, 74, 65, .4); animation: breathe 1.2s ease-in-out infinite; }
.gross-live { font-family: "IBM Plex Mono", monospace; font-size: 1.35rem; text-align: center; color: var(--ember); }
.progress { height: 2px; background: var(--line); margin: 2rem auto 0; max-width: 420px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-dim)); transition: width 1s linear; }
/* la bande des 60 minutes */
.minutes { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin: 2.5rem 0 1rem; }
.minutes i {
  display: block; aspect-ratio: 1; background: var(--bg2); border: 1px solid var(--line);
}
.minutes i.past { background: var(--line); }
.minutes i.now { border-color: var(--ember); background: var(--ember-glow); animation: breathe 1.6s ease-in-out infinite; }
.minutes i.page { border-color: var(--ember-dim); background: rgba(200, 155, 90, .18); }
.minutes i.sale { border-color: var(--clear); background: rgba(132, 153, 107, .35); }

/* journal minute par minute */
.tickrow {
  display: flex; gap: 1.1rem; align-items: baseline; padding: .6rem .2rem;
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace; font-size: .76rem; color: var(--ink-dim);
}
.tickrow .min { color: var(--ink-faint); flex: none; width: 4.2rem; letter-spacing: .08em; }
.tickrow.now .min { color: var(--ember); }
.tickrow b { font-weight: 500; color: var(--ink); }
.tickrow .sale { color: var(--clear); }
.tickrow .refund { color: var(--death); }
.tickrow .quiet { color: var(--ink-faint); }
.tickrow .k-decision { color: var(--ember); }
.tickrow .k-action { color: var(--ink); }
.tickrow .k-obstacle { color: var(--death); }
.tickrow .k-note { color: var(--ink-faint); }
.tickrow .k-human { color: var(--ink); border-bottom: 1px solid var(--ember-dim); }
.tickrow .metric { color: var(--ink-faint); font-style: italic; }
.panel + .panel { margin-top: 1rem; }
.linkrow { font-family: "IBM Plex Mono", monospace; font-size: .76rem; padding: .8rem 0; border-top: 1px solid var(--line); word-break: break-all; }
.linkrow b { color: var(--ember); font-weight: 500; }

/* ---------- formulaires ---------- */
form.submit { display: grid; gap: 1.1rem; margin-top: 1.6rem; }
form.submit label {
  font-family: "IBM Plex Mono", monospace; font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: .4rem;
}
form.submit input, form.submit textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line-strong);
  color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: .85rem;
  padding: .75rem .85rem; outline: none; transition: border-color .25s, box-shadow .25s;
}
form.submit input:focus, form.submit textarea:focus {
  border-color: var(--ember-dim); box-shadow: 0 0 0 1px var(--ember-dim);
}
form.submit button { justify-self: start; }
#submit-msg { font-family: "IBM Plex Mono", monospace; font-size: .76rem; color: var(--ember); }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 0 1.1rem 4rem; }
  nav.top { gap: .4rem 1rem; padding: .95rem 1.1rem; font-size: .64rem; }
  .hero { padding: 4.5rem 0 3.2rem; }
  .strip { gap: .8rem 1.4rem; margin-top: 2.2rem; }
  .cta-row { display: grid; gap: .8rem; margin-top: 2.2rem; }
  .cta { text-align: center; }
  .decl { font-size: 1.22rem; }
  section { margin-top: 4.2rem; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(odd) { border-left: none; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }

  /* runs : la table devient des cartes */
  table.runs, table.runs tbody, table.runs tr, table.runs td { display: block; }
  table.runs thead { display: none; }
  table.runs tr {
    border: 1px solid var(--line); padding: 1.1rem 1.2rem; margin-bottom: 1rem;
    background:
      linear-gradient(var(--ember-dim), var(--ember-dim)) 0 0 / 11px 1px,
      linear-gradient(var(--ember-dim), var(--ember-dim)) 0 0 / 1px 11px,
      linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 100% / 11px 1px,
      linear-gradient(var(--ember-dim), var(--ember-dim)) 100% 100% / 1px 11px;
    background-repeat: no-repeat;
  }
  table.runs td { border: none; padding: .45rem 0; }
  table.runs tbody tr:hover td { background: transparent; }
  table.runs td::before {
    content: attr(data-l); display: block;
    font-family: "IBM Plex Mono", monospace; font-size: .56rem; font-weight: 500;
    letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
    margin-bottom: .15rem;
  }
  .method { max-width: none; }
}
