/* Parcours d'équipe (correctif 51) : inscription guidée à un tournoi (/inscrire-equipe) et lien d'invitation d'une
   équipe (/rejoindre-equipe). Chargé seulement sur ces deux pages, après app.css et refonte.css. */

/* --- Inscription guidée ------------------------------------------------------------------------------------------- */
.signup { max-width: 880px; padding-top: 32px; padding-bottom: 64px; }
.signup__crumb a { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--steel); }
.signup__crumb a:hover { color: var(--frost); text-decoration: none; }
.signup__head { margin: 18px 0 30px; }
.signup__head h1 { margin: 0 0 10px; font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -.02em; }
.signup__lead { margin: 0; max-width: 62ch; font-size: 1.0625rem; line-height: 1.55; color: #C3CCDC; }
.signup__lead strong { color: var(--frost); }

/* Les trois étapes : une pastille numérotée reliée à la suivante par un trait */
.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding-bottom: 26px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 50px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--line); }
.step.is-done:not(:last-child)::before { background: linear-gradient(var(--ice), rgba(118, 215, 255, .25)); }
.step__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); font-size: 1.125rem; font-weight: 800; color: var(--steel); }
.step__mark .icon { width: 20px; height: 20px; }
.step.is-current .step__mark { border-color: var(--ice); background: var(--ice); color: var(--bg); box-shadow: 0 0 0 6px rgba(118, 215, 255, .16); }
.step.is-done .step__mark { border-color: var(--ice); color: var(--ice); }
.step__body { min-width: 0; padding: 18px 22px 20px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.step.is-current .step__body { border-color: rgba(118, 215, 255, .4); background: #0F172A; }
.step.is-todo .step__body { background: transparent; border-style: dashed; }
.step__title { margin: 0 0 12px; font-size: 1.375rem; line-height: 1.2; }
.step.is-todo .step__title { color: var(--steel); margin-bottom: 6px; }
.step__body > p { margin: 0 0 14px; }
.step__body > p:last-child { margin-bottom: 0; }
.step__later { color: var(--steel-dim); font-size: var(--fs-sm); }
.step__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.step__note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-3); font-size: var(--fs-sm); color: #C3CCDC; }
.step__note > .icon { flex: none; margin-top: 3px; color: var(--ice); }
.step__note .btn { margin-left: 4px; vertical-align: middle; }

/* Étape faite : son résumé, avec « Changer » */
.step__summary { display: flex; align-items: center; gap: 14px; }
.step__summary p { display: flex; flex-direction: column; margin: 0; flex: 1; min-width: 0; }
.step__summary strong { font-size: 1.125rem; }
.step__summary span { font-size: var(--fs-sm); color: var(--steel); }
.step__change { font-size: var(--fs-sm); font-weight: 600; }

/* Choix de l'équipe */
.team-pick { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.team-pick__item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-3); border: 1px solid var(--line); color: var(--frost); }
.team-pick__item:hover { text-decoration: none; border-color: var(--ice); color: var(--frost); }
.team-pick__item > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.team-pick__item small { font-size: var(--fs-xs); color: var(--steel); }
.team-pick__item > .icon { color: var(--steel); }

/* Création de l'équipe, repliée quand il en a déjà une */
.team-create { border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); }
.team-create summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; }
.team-create summary::-webkit-details-marker { display: none; }
.team-create summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--ice); font-weight: 800; }
.team-create[open] summary::before { content: "–"; }
.team-create__form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4px 14px; padding: 0 16px 16px; }
.team-create__form .field--wide, .team-create__form .btn, .team-create__hint { grid-column: 1 / -1; }
.team-create__hint { margin: 0 0 12px; }
.team-create__form .btn { justify-self: start; }

/* Joueurs */
.players__count { margin: 0 0 8px; color: var(--steel); }
.players__count strong { font-size: 1.25rem; color: var(--frost); }
.players__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.players__list li { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--bg-3); font-size: var(--fs-sm); font-weight: 600; }
.players__list small { font-weight: 400; color: var(--steel-dim); }
.players__list li.is-busy { opacity: .6; }
.players__list li.is-pending { background: transparent; border: 1px dashed var(--line-strong); }

/* Lien d'invitation */
.invite { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.invite__title { margin: 0 0 4px; font-size: 1.0625rem; }
.invite__text { margin: 0 0 12px; font-size: var(--fs-sm); color: #C3CCDC; max-width: 62ch; }
.invite .input-group .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875rem; }
.invite__more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.invite__pseudo { margin-top: 18px; }
.invite__pseudo .input-group { max-width: 420px; }
.invite__refresh { margin: 14px 0 0; font-size: var(--fs-sm); color: var(--steel); }
.invite__refresh a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

/* --- Rejoindre une équipe avec son lien ------------------------------------------------------------------------- */
.join-page { display: grid; place-items: center; min-height: calc(100svh - var(--header-h) - 120px); padding-top: 40px; padding-bottom: 64px; }
.join-card { width: 100%; max-width: 560px; padding: 34px 32px 30px; text-align: center; border-radius: 22px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(118, 215, 255, .12), transparent 70%), var(--bg-2); }
.join-card .team-logo { margin: 0 auto 16px; }
.join-card__kicker { margin: 0; font-size: var(--fs-sm); color: var(--steel); }
.join-card h1 { margin: 4px 0 6px; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.join-card__meta { margin: 0 0 18px; color: var(--steel); }
.join-card__members { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 24px; padding: 0; }
.join-card__members li { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 72px; font-size: var(--fs-xs); color: #C3CCDC; }
.join-card__members li span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-card__note { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 16px; color: #C3CCDC; }
.join-card__note .icon { color: var(--success, #40D68C); }
.join-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.join-card__hint { margin: 12px 0 0; font-size: var(--fs-xs); color: var(--steel-dim); }
.join-card--gone h1 { font-size: 1.75rem; }

@media (max-width: 719px) {
  .signup { padding-top: 20px; }
  .step { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .step:not(:last-child)::before { left: 16px; top: 40px; }
  .step__mark { width: 34px; height: 34px; font-size: 1rem; }
  .step__body { padding: 16px; }
  .team-create__form { grid-template-columns: 1fr; }
  .join-card { padding: 28px 20px 24px; }
  .join-card__actions .btn { flex: 1 1 100%; }
}
