
/* La Draft : le verso d'une vignette (le choix de draft) puis son recto (le joueur), repris du Box score.
   Couleurs, polices, boutons et champ de saisie viennent de /assets/styles.css. */

/* 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: box-spin 0.8s linear infinite;
}

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

/* 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: box-stick 0.3s ease-out;
}

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

@keyframes box-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: box-flip 0.6s cubic-bezier(0.2, 0.7, 0.3, 1.2);
  transform-origin: center;
}

@keyframes box-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 */
  }

  .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;
  }
}
/* The 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;
  }
}

/* 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) {

  /* 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));
  }
}

/* The draft above the pick: « Draft 2009 », and the round in a frame of ink on the right. */
.dr-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 2px 0 14px;
}

.dr-context strong {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dr-round {
  padding: 3px 10px;
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
}

/* The pick in big, in pale gold (what the day is about), then the team that made it, as wide as it
   needs: « Portland Trail Blazers » on one line on a computer. */
.dr-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 12px;
  margin: 0;
}

.dr-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px 10px;
  border: 2px solid var(--ink);
  background: var(--card);
}

.dr-cell--pick {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.dr-cell dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.dr-cell dd {
  margin: 0;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 40px;
  line-height: 1.1;
  text-transform: uppercase;
}

/* « 7e », « 7th »: the ordinal keeps its small letters, only the team goes in capitals. */
.dr-cell--pick dd {
  text-transform: none;
}

.dr-cell--team dd {
  font-size: 24px;
  letter-spacing: 0.02em;
}

@media (max-width: 560px) {
  .dr-context strong {
    font-size: 19px;
  }

  .dr-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 8px;
  }

  .dr-cell {
    padding: 6px 8px 8px;
  }

  .dr-cell dd {
    font-size: 32px;
  }

  .dr-cell--team dd {
    font-size: 18px;
  }
}
