/* La Chronologie: six moments to put in order of time, one at a time, on a timeline. The board, the
   boxes, the progress strip and the buttons are shared (assets/styles.css, DESIGN.md). */

/* The five placements, the strip of Le Quiz. */
.tl-steps {
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tl-steps .slot {
  height: 40px;
  font-size: 16px;
}

.tl-steps .slot em {
  font-size: 16px;
}

/* The moment to place, in a night blue band: which one and what kind, its name, what it was. */
.tl-question {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 12px 14px 14px;
  text-align: center;
  background: var(--cover);
  color: var(--paper);
  border-bottom: 3px solid var(--gold);
}

.tl-step {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sand);
}

.tl-question strong {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tl-context {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
}

.tl-feedback {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.tl-feedback.is-bad {
  color: var(--red-strong);
}

/* The verdict after a placement: the ✓ / ✘ square of Le Quiz (.feedback, .verdict-mark, assets/styles.css). */
.tl-verdict {
  margin: 14px 0 0;
  font-size: 16px;
}

.tl-verdict b {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 4px;
}

.tl-left {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* The timeline, as the career of Le Parcours: a night blue line on the left, a gold dot and the year
   in Anton for each moment; earlier on top, later below. */
.tl-line-wrap {
  margin-top: 18px;
}

.tl-edge {
  margin: 0;
  padding-left: 70px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.tl-line {
  position: relative;
  list-style: none;
  margin: 6px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tl-line::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 59px;
  width: 2px;
  background: var(--cover);
}

.tl-item,
.tl-slot {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.tl-year {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-align: right;
  color: var(--ink);
}

.tl-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  box-sizing: border-box;
  border: 2px solid var(--cover);
  border-radius: 50%;
  background: var(--gold);
}

.tl-moment {
  grid-template-columns: minmax(0, 1fr);
}

.tl-moment .stk-foil {
  padding: 8px 12px 10px;
  gap: 2px;
}

.tl-kind {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.tl-moment .stk-name {
  font-size: 18px;
  line-height: 1.15;
}

.tl-moment .stk-sub {
  font-size: 13px;
}

/* The first moment, given: night blue, as the start and end of Le Lien. A moment placed the first time
   is framed in green, its year too; the one that ended the game in red (DESIGN.md, « Indices et erreurs »). */
.tl-item.is-anchor .tl-moment {
  background: var(--cover);
  color: var(--paper);
}

.tl-item.is-anchor .stk-name {
  color: var(--paper);
}

.tl-item.is-anchor .tl-kind,
.tl-item.is-anchor .stk-sub {
  color: var(--sand);
}

.tl-item.is-good .tl-moment {
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
}

.tl-item.is-good .tl-year {
  color: var(--green);
}

/* Placed after one miss or more: framed in gold, « proche » in the colours of the charter. */
.tl-item.is-retry .tl-moment {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--gold);
}

.tl-item.is-retry .stk-name::after {
  content: ' ✓';
  color: var(--green);
}

.tl-item.is-bad .tl-moment {
  border-color: var(--red-strong);
  box-shadow: inset 0 0 0 2px var(--red-strong);
}

.tl-item.is-bad .tl-year {
  color: var(--red-strong);
}

.tl-item.is-good .stk-name::after {
  content: ' ✓';
  color: var(--green);
}

.tl-item.is-bad .stk-name::after {
  content: ' ✘';
  color: var(--red-strong);
}

/* Where the next moment can go: a dashed box, as the empty boxes of the other games. */
.tl-slot button {
  grid-column: 2;
  min-height: 36px;
  padding: 4px 12px;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: 2px dashed var(--ink);
  cursor: pointer;
  transition: background 0.08s;
}

/* The hover only with a mouse (DESIGN.md, « Survol ») : on a phone it stayed on the box under the
   finger once the timeline was drawn again, and read as a choice. */
.tl-slot button:focus-visible {
  background: var(--gold-soft);
  border-color: var(--gold);
  border-style: solid;
}

@media (hover: hover) {
  .tl-slot button:hover {
    background: var(--gold-soft);
    border-color: var(--gold);
    border-style: solid;
  }
}

/* A place already tried for the moment in play: struck through in red, no longer a target. */
.tl-slot button.is-tried {
  color: var(--red-strong);
  border-color: var(--red-strong);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  cursor: default;
  opacity: 0.8;
}

@media (hover: hover) {
  .tl-slot button.is-tried:hover {
    background: var(--card);
    border-color: var(--red-strong);
    border-style: dashed;
  }
}

@media (max-width: 560px) {
  .tl-steps {
    gap: 4px;
  }

  .tl-steps .slot {
    height: 34px;
    padding: 2px 0;
  }

  .tl-question strong {
    font-size: 20px;
  }

  .tl-context {
    font-size: 14px;
  }

  .tl-item,
  .tl-slot {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
  }

  .tl-line::before {
    left: 48px;
  }

  .tl-item::after {
    left: 43px;
  }

  .tl-edge {
    padding-left: 56px;
  }

  .tl-year {
    font-size: 16px;
  }

  .tl-moment .stk-name {
    font-size: 16px;
  }

  .tl-slot button {
    position: relative;
  }

  /* A touch target of 44 px, the dashed box staying low (DESIGN.md, « Téléphone »). */
  .tl-slot button::after {
    content: '';
    position: absolute;
    inset: -5px 0;
  }
}
