/* ============================================================
   REPÊCHAGE — écran d'entrée du pool actif
   ============================================================ */

.rp-container { padding-top: 26px; padding-bottom: 40px; }
.rp-content { max-width: 720px; margin: 0 auto; }

.rp-card {
    background: var(--card);
    border: 1px solid var(--border-gray);
    border-radius: 18px;
    overflow: hidden;
}

/* ==================== EN-TÊTE ==================== */

.rp-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--card-white);
    border-bottom: 1px solid var(--border-light);
}

.rp-img { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.rp-head-txt { flex: 1; min-width: 0; }

.rp-eyebrow {
    margin: 0 0 3px;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-gray);
}

.rp-title { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--text-main); word-break: break-word; }

.rp-state {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
}

.rp-state-attente { background: rgba(255, 179, 0, .15); color: var(--warning); }
.rp-state-pret    { background: rgba(0, 230, 118, .15); color: var(--success); }
.rp-state-termine { background: rgba(0, 212, 255, .14); color: var(--primary); }

/* ==================== CORPS ==================== */

.rp-body { padding: 22px 20px 24px; }
.rp-lead { margin: 0 0 16px; font-size: 1rem; color: var(--text-main); line-height: 1.55; }
.rp-note { margin: 0 0 18px; font-size: .84rem; color: var(--text-secondary); line-height: 1.5; }

.rp-progress {
    height: 9px;
    border-radius: 999px;
    background: var(--bg-gray-light);
    overflow: hidden;
}

.rp-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, #00B8D9 100%);
    transition: width .4s ease;
}

.rp-progress-lbl { margin: 8px 0 18px; font-size: .82rem; font-weight: 700; color: var(--text-secondary); }

.rp-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.rp-btn {
    padding: 11px 20px;
    border-radius: 11px;
    font-weight: 800;
    font-size: .92rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .18s ease, border-color .18s ease, color .18s ease;
}

.rp-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #00B8D9 100%);
    color: var(--bg);
}

.rp-btn.primary:hover { transform: translateY(-1px); }
.rp-btn.primary:disabled { opacity: .6; transform: none; cursor: default; }

.rp-btn.secondary {
    background: var(--bg-gray-light);
    border-color: var(--border-gray);
    color: var(--text-secondary);
}

.rp-btn.secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== CHARGEMENT ==================== */

.rp-loading { padding: 70px 20px; text-align: center; color: var(--text-secondary); }
.rp-loading p { margin: 16px 0 0; font-size: .95rem; }
.rp-loading strong { color: var(--text-main); }

.rp-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 3px solid var(--border-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rp-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .rp-spinner { animation-duration: 2.4s; }
    .rp-progress-fill { transition: none; }
}

@media (max-width: 560px) {
    .rp-head { flex-wrap: wrap; }
    .rp-actions .rp-btn { flex: 1; text-align: center; }
}

/* ============================================================
   IDENTITÉ LNH — choix avant le repêchage
   ------------------------------------------------------------
   La seule couleur libre du système entre ici : chaque tuile porte la
   teinte réelle du club qu'elle représente (Real Teams Only Rule). Le
   cyan reste réservé à UN signal — la tuile qu'on a soi-même choisie —
   jamais à la grille entière.
   ============================================================ */
.nhlclub-picker { margin: 22px 0 26px; }
.nhlclub-picker-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}
.nhlclub-picker-sub {
    margin: 0 0 16px;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 58ch;
}

.nhlclub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 8px;
}

.nhlclub-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 96px;
    padding: 12px 8px 10px;
    /* --club-wash est calculé en JS (mixHex), pas par color-mix() CSS : voir
       la note de teamColors.js sur le support mobile plus ancien. */
    background: linear-gradient(180deg, var(--club-wash, var(--card)) 0%, var(--card) 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.nhlclub-tile:hover:not(:disabled) {
    border-color: var(--club-a, var(--border-gray));
    transform: translateY(-2px);
}
.nhlclub-tile:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, .15);
}
.nhlclub-tile:active:not(:disabled) { transform: translateY(0); }

.nhlclub-logo { width: 40px; height: 40px; object-fit: contain; }
.nhlclub-name {
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}
/* Fiche V-D-DP · PTS : un chiffre qu'on compare d'une tuile à l'autre, donc
   en monospace comme partout ailleurs dans l'app où des stats s'alignent. */
.nhlclub-record {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-secondary);
}

/* La tuile choisie : seule autorisée à porter le cyan (Règle du Signal
   Unique) — c'est l'unique chose « active » dans cette grille. */
.nhlclub-tile.is-mine {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, .18);
}
.nhlclub-tile.is-mine .nhlclub-tile-tag {
    background: var(--primary);
    color: var(--bg);
}

.nhlclub-tile.is-taken {
    opacity: .38;
    cursor: not-allowed;
    filter: grayscale(.6);
}
.nhlclub-tile.is-taken .nhlclub-tile-tag {
    background: var(--bg-gray-light);
    color: var(--text-secondary);
}

.nhlclub-tile-tag {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhlclub-grid[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---- Statut de l'équipe du pool ---- */
.nhlclub-roster-wrap { margin: 20px 0; }
.nhlclub-roster-title {
    margin: 0 0 10px;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-gray);
}
.nhlclub-roster {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border-light);
}
.nhlclub-roster-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--card);
}
.nhlclub-roster-item.is-pending { opacity: .7; }
.nhlclub-roster-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.nhlclub-roster-logo.is-empty {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px dashed var(--border-gray);
    flex-shrink: 0;
}
.nhlclub-roster-team {
    flex: 0 0 auto;
    font-size: .84rem;
    font-weight: 700;
    color: var(--text-main);
}
.nhlclub-roster-club {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .84rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    .nhlclub-tile:hover:not(:disabled),
    .nhlclub-tile:active:not(:disabled) { transform: none; }
}

@media (max-width: 480px) {
    .nhlclub-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .nhlclub-roster-club { text-align: left; }
    .nhlclub-roster-item { flex-wrap: wrap; }
}
