/* Le Parcours : le verso d'une vignette (la carrière) puis son recto (le joueur).
   Couleurs, polices, boutons et champ de saisie viennent de /assets/styles.css. */

.levels {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: -4px 0 18px;
}

.levels .ghost.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.levels[hidden] {
  display: none;
}

/* verso */

.verso {
  position: relative;
  padding: 20px 20px 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-card);
}

.verso--empty {
  text-align: center;
}

.notice {
  margin: 26px 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

.loading::after {
  content: '';
  display: block;
  width: 26px;
  height: 26px;
  margin: 16px auto 0;
  border: 3px solid var(--rule);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: parcours-spin 0.8s linear infinite;
}

@keyframes parcours-spin {
  to { transform: rotate(360deg); }
}

.career {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.career th {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-soft);
  padding: 0 6px 6px;
  border-bottom: 3px double var(--rule);
}

.career th:nth-last-child(-n + 2) {
  text-align: right;
}

.career td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(42, 24, 16, 0.1);
  vertical-align: middle;
}

.career tbody tr:nth-child(even) {
  background: rgba(201, 183, 143, 0.14);
}

.career .years {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 15px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  width: 1%;
}

.career .is-current .years {
  color: var(--orange);
}

.career .club {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.career .num {
  width: 1%;
  text-align: right;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.loan {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cover-deep);
  background: var(--gold);
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: 2px;
}

/* indices : les cases de l'album, remplies à chaque erreur */

.hints {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
  padding: 0;
}

.hint {
  min-width: 0;
  padding: 7px 6px 8px;
  text-align: center;
  border: 2px dashed var(--rule);
  color: var(--rule);
}

.hint span {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.hint strong {
  display: block;
  margin-top: 2px;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hint.is-open {
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  animation: parcours-stick 0.3s ease-out;
}

.hint.is-open span {
  color: var(--ink);
}

@keyframes parcours-stick {
  from { transform: scale(1.12) rotate(-3deg); opacity: 0; }
}

.tried {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

/* One row per guess: the name, then how it compares to the answer. */
.tried li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tried-name {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border: 2px solid currentColor;
}

.tried .is-ko .tried-name {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.tried .is-ok .tried-name {
  color: var(--green);
}

.tried .is-skip .tried-name {
  color: var(--ink-soft);
  border-style: dashed;
}

/* « Indice » et « J’abandonne », comme au Onze (.xi-actions). */
.cp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}


/* recto : la vignette se retourne */

.recto {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-card);
  animation: parcours-flip 0.6s cubic-bezier(0.2, 0.7, 0.3, 1.2);
  transform-origin: center;
}

@keyframes parcours-flip {
  from { transform: perspective(900px) rotateY(90deg); }
}

/* The key figures, as on the back of a real sticker. */
.recto-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 0;
}

.recto-facts div {
  padding-top: 6px;
  border-top: 1px solid var(--rule);
}

.recto-facts dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.recto-facts dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.recto-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.recto-body p {
  margin: 0;
}

.recto-sub {
  margin-top: 4px !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.recto-name {
  margin: 10px 0 0 -4px !important;
  padding: 6px 12px 5px;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.5deg);
}

.recto-meta {
  margin-top: 8px !important;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.recto-actions {
  margin-top: auto;
  padding-top: 14px;
}

@media (max-width: 560px) {
  .verso {
    padding: 16px 16px 18px; /* DESIGN.md: at least 16px inside a card, phones included */
  }

  .career .years {
    font-size: 13px;
  }

  .career .club {
    font-size: 14px;
  }

  .career td {
    padding: 6px 4px;
  }

  .recto {
    gap: 14px;
    padding: 12px;
  }

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

  .recto-name {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recto,
  .hint.is-open {
    animation: none;
  }
}

/* Maquettes du 13 octobre 2026: a plain table, labels in normal case, a hairline between the
   seasons, the years in the body face, the club in bold. */
.career th {
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--rule);
}

.career td {
  border-bottom: 1px solid var(--rule);
}

.career tbody tr:nth-child(even) {
  background: none;
}

.career .years {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.career .is-current .years {
  color: var(--orange-strong);
}

.career .club {
  font-weight: 600;
}

.career .num {
  color: var(--ink);
}

/* The four hints (DESIGN.md, « Indices et erreurs »): a hint given in a pale gold box with a gold
   frame (gold says « hint »), the value in Anton capitals; one still to come is dark hardwood (below). */
.hint {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 8px 6px;
  box-sizing: border-box;
  background: transparent;
  border: 2px dashed var(--rule);
  color: var(--ink-soft);
}

.hint span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hint strong {
  font-size: 16px;
  line-height: 1.15;
  color: var(--rule);
}

.hint.is-open {
  background: var(--gold-soft);
  border: 2px solid var(--gold);
  color: var(--ink);
  box-shadow: none;
}

.hint.is-open span {
  color: var(--ink-soft);
}

.hint.is-open strong {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .hint {
    min-height: 54px;
    padding: 6px 3px;
  }

  .hint strong {
    font-size: 13px;
  }
}

/* A loan: pale gold with a gold outline, the word in ink (the same dress as a hint). */
.loan {
  color: var(--ink);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  letter-spacing: 0.06em;
}

/* The career as a timeline (DESIGN.md, « Le plateau »), like the drawing of the game on the home
   page: a dark-hardwood line on the left with a gold dot per club (dark hardwood for the current one: one red a screen, DESIGN.md) and the years
   in Anton. No bar measured on the matches (13 October 2026). */
.career th:first-child {
  padding-left: 26px;
}

.career .years {
  position: relative;
  padding-left: 26px;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.career .years::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: -1px;
  left: 7px;
  width: 2px;
  background: var(--cover);
}

.career tbody tr:first-child .years::before {
  top: 50%;
}

.career tbody tr:last-child .years::before {
  bottom: 50%;
}

.career tbody tr:only-child .years::before {
  content: none;
}

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

.career .is-current .years::after {
  background: var(--cover);
}

.career td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.career .club {
  font-weight: 700;
}

.career .num {
  font-weight: 600;
}

/* Above the hints, what they are: one with every miss. */
.hints-title {
  margin: 18px 0 -10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* A hint still hidden: a dark-hardwood card, its name and « ? » in gold (the hints given stay pale gold). */
.hint {
  background: var(--cover);
  border: 2px solid var(--cover);
  color: var(--paper);
}

.hint span {
  color: rgba(246, 239, 224, 0.75);
}

.hint strong {
  font-size: 20px;
  color: var(--gold);
}

@media (max-width: 560px) {
  .career th:first-child,
  .career .years {
    padding-left: 22px;
  }

  .career .years {
    font-size: 13px;
  }

  .career .years::before {
    left: 5px;
  }

  .career .years::after {
    left: 0;
  }

  /* Phone: the hints two by two, read like a fact sheet: the name small on top, the value (or « ? »)
     under it, on the left; the four boxes the same size, given or not. */
  .hints {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .hint,
  .hint.is-open {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2px;
    min-height: 54px;
    padding: 6px 10px;
    text-align: left;
  }

  .hint strong {
    margin: 0;
    font-size: 17px;
    line-height: 1.15;
  }
}

/* The player revealed at the end (DESIGN.md, « Le plateau »): no shirt, no initials, no tilted red
   label; the name in Anton, a gold rule under it, then the key figures across the card. */
.recto {
  display: block;
}

.recto-name {
  margin: 6px 0 0 !important;
  padding: 0 0 6px;
  font-size: 30px;
  color: var(--ink);
  background: none;
  box-shadow: none;
  transform: none;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

.recto-facts {
  align-self: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* The tries already made: small chips on one line, a skipped try discreet (no dashed box). */
.tried {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tried-name {
  padding: 3px 9px;
  border-width: 1px;
  font-size: 12px;
}

.tried .is-skip .tried-name {
  border: 1px solid var(--rule);
  border-style: solid;
  background: none;
}

@media (max-width: 560px) {
  .recto-name {
    font-size: 24px;
  }

  .recto-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
