@charset "UTF-8";
/* ==========================================================================
   GameBase — Communauté : annuaire des joueurs, palmarès, médailles
   ========================================================================== */

/* ---------- Médailles (or, argent, bronze) ---------- */
.medals {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    vertical-align: middle;
}

.medal {
    --medal: var(--amber);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.medal i {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 20%), var(--medal);
    box-shadow: 0 0 0 2px rgba(7, 7, 15, 0.9), 0 0 12px -2px var(--medal);
}

.medal--gold { --medal: #fbbf24; }
.medal--silver { --medal: #cbd5e1; }
.medal--bronze { --medal: #e8936a; }

/* Pastille numérotée (podium d'un jeu) */
.medal-dot {
    display: inline-grid;
    flex-shrink: 0;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--medal, var(--surface-3));
    color: #14100a;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
}

.medal-dot--gold { --medal: #fbbf24; }
.medal-dot--silver { --medal: #cbd5e1; }
.medal-dot--bronze { --medal: #e8936a; }

/* ---------- En-tête des pages communauté ---------- */
.community-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 32px;
}

.community-head .eyebrow {
    margin-bottom: 10px;
}

.community-head .eyebrow .icon {
    width: 15px;
    height: 15px;
    color: var(--violet-2);
}

.community-head__lead {
    max-width: 62ch;
    margin-top: 8px;
    color: var(--text-2);
}

.community-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Annuaire des joueurs ---------- */
.directory-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.directory-toolbar__search {
    flex: 1 1 280px;
    max-width: 520px;
    margin-top: 0;
}

.directory-toolbar__search .search__input {
    height: 50px;
    padding-right: 20px;
}

.directory-results {
    margin-top: 20px;
    transition: opacity 0.2s;
}

.directory-results[aria-busy="true"],
.live-results[aria-busy="true"] {
    opacity: 0.55;
}

.results-count {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.9rem;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.player-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    align-items: center;
    gap: 12px 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(16, 16, 30, 0.75);
    animation: card-in 0.5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
    transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.player-card:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 16px 40px -18px rgba(139, 92, 246, 0.7);
}

.player-card.is-me {
    border-color: rgba(167, 139, 250, 0.55);
    background:
        radial-gradient(300px 120px at 0% 0%, rgba(139, 92, 246, 0.2), transparent 70%),
        rgba(16, 16, 30, 0.75);
}

.player-card__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.player-card__name {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Toute la carte mène au profil ; le bouton d'action reste cliquable au-dessus */
.player-card__name::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.player-card__name:focus-visible {
    outline: none;
}

.player-card:has(.player-card__name:focus-visible) {
    outline: 2px solid var(--violet-2);
    outline-offset: 2px;
}

.player-card__meta {
    color: var(--text-2);
    font-size: 0.88rem;
}

.player-card__seen {
    color: var(--muted);
    font-size: 0.8rem;
}

.player-card__medals,
.player-card__action {
    grid-column: 1 / -1;
}

.player-card__action {
    position: relative;
    z-index: 1;
    display: flex;
    justify-self: start;
}

.player-card__action:empty {
    display: none;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(10px); }
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}

.pagination__link {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding-inline: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-2);
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

.pagination__link:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.pagination__link.is-active {
    border-color: transparent;
    background: var(--grad);
    color: #fff;
}

.pagination__link .icon {
    width: 18px;
    height: 18px;
}

.pagination__gap {
    align-self: center;
    color: var(--muted);
}

/* Recherche en direct de la page Amis */
.live-results {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    transition: opacity 0.2s;
}

.live-empty {
    padding: 12px 0;
    color: var(--muted);
}

.live-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--cyan);
    font-weight: 600;
}

.live-more .icon {
    width: 16px;
    height: 16px;
}

.add-friend__hint {
    font-size: 0.88rem;
}

.add-friend__hint a {
    color: var(--violet-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Palmarès ---------- */
.hof-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(7, 7, 15, 0.6);
}

.segmented__item {
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.segmented__item:hover {
    color: var(--text);
}

.segmented__item.is-active {
    background: var(--grad);
    color: #fff;
}

.hof-empty {
    margin-top: 32px;
}

/* Podium des trois premiers : 2e — 1er — 3e */
.hof-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: clamp(8px, 2vw, 18px);
    max-width: 760px;
    margin: 40px auto 0;
}

.hof-step {
    --step: #cbd5e1;
    --height: 96px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    grid-row: 1;
    min-width: 0;
    text-align: center;
}

.hof-step--1 { --step: #fbbf24; --height: 136px; grid-column: 2; }
.hof-step--2 { --step: #cbd5e1; --height: 100px; grid-column: 1; }
.hof-step--3 { --step: #e8936a; --height: 76px; grid-column: 3; }

.hof-step__crown {
    color: var(--amber);
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
    animation: crown-float 3s ease-in-out infinite;
}

.hof-step__crown .icon {
    width: 32px;
    height: 32px;
}

.hof-step__name {
    max-width: 100%;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hof-step:hover .hof-step__name,
.hof-step.is-me .hof-step__name {
    color: var(--violet-2);
}

.hof-step__titles {
    color: var(--muted);
    font-size: 0.8rem;
}

.hof-step__block {
    display: grid;
    place-items: center;
    width: 100%;
    height: var(--height);
    margin-top: 4px;
    border: 1px solid color-mix(in srgb, var(--step) 45%, transparent);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--step) 26%, transparent), color-mix(in srgb, var(--step) 4%, transparent));
    color: var(--step);
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    transition: filter 0.25s;
}

.hof-step:hover .hof-step__block {
    filter: brightness(1.25);
}

@keyframes crown-float {
    50% { transform: translateY(-5px) rotate(-4deg); }
}

.hof-podium + .hof-notice {
    max-width: 760px;
    margin: 0 auto;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.hof-notice .medals {
    margin-left: 4px;
}

.hof-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    margin-top: 28px;
}

.hof-table-wrap {
    overflow-x: auto;
    margin-inline: -8px;
}

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

.hof-table th {
    padding: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.hof-table th .medal {
    margin-right: 6px;
    vertical-align: -1px;
}

.hof-table td {
    padding: 9px 8px;
    border-top: 1px solid var(--border);
}

.hof-table tr.is-me td {
    background: rgba(139, 92, 246, 0.12);
}

.hof-table__rank {
    width: 52px;
    text-align: center !important;
}

.hof-table__num {
    width: 74px;
    text-align: center !important;
    font-family: var(--font-display);
    font-weight: 600;
}

.hof-table__num.is-zero {
    color: var(--muted);
    font-weight: 400;
}

.hof-table__total {
    color: var(--text);
    font-weight: 700;
}

.hof-table__player {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.hof-table__player:hover span {
    color: var(--violet-2);
}

.hof-more,
.hof-caption {
    font-size: 0.85rem;
}

.hof-caption {
    margin: -6px 0 14px;
}

/* Joueurs les plus assidus : barres horizontales, valeur écrite en clair */
.activity-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.activity-list__row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
}

.activity-list__rank {
    color: var(--muted);
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
}

.activity-list__player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 600;
}

.activity-list__player span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-list__player:hover span:last-child,
.activity-list__row.is-me .activity-list__player span:last-child {
    color: var(--violet-2);
}

.activity-list__value {
    color: var(--text-2);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.activity-list__bar {
    grid-column: 2 / -1;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-3);
    overflow: hidden;
}

.activity-list__bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--violet-2);
}

/* Podium de chaque jeu */
.hof-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 20px;
}

.hof-game {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(16, 16, 30, 0.75);
    transition: border-color 0.2s;
}

.hof-game:hover {
    border-color: var(--border-strong);
}

.hof-game__head {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.hof-game__head img {
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.hof-game__head:hover img {
    transform: scale(1.06);
}

.hof-game__title {
    font-size: 1.1rem;
}

.hof-game__head:hover .hof-game__title {
    color: var(--violet-2);
}

.hof-game__top {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 10px 16px;
    list-style: none;
}

.hof-game__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.hof-game__row.is-me .hof-game__player span:last-child {
    color: var(--violet-2);
}

.hof-game__player {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 600;
}

.hof-game__player span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hof-game__player:hover span:last-child {
    color: var(--violet-2);
}

.hof-game__score {
    font-family: var(--font-display);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hof-game__empty {
    flex: 1;
    padding: 18px 16px;
}

.hof-game__link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    color: var(--cyan);
    font-size: 0.9rem;
    font-weight: 600;
}

.hof-game__link .icon {
    width: 15px;
    height: 15px;
}

.hof-game__link:hover {
    background: rgba(34, 211, 238, 0.06);
}

/* ---------- Profil : médailles ---------- */
.member-hero__fame {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(251, 191, 36, 0.07);
    color: var(--text-2);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.member-hero__fame:hover {
    border-color: rgba(251, 191, 36, 0.6);
}

.member-hero__titles {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-hero__titles .icon {
    width: 16px;
    height: 16px;
    color: var(--amber);
}

/* ---------- Accueil : les champions ---------- */
.champions-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.champion-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 10px 18px 10px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(16, 16, 30, 0.75);
    transition: border-color 0.2s, transform 0.25s var(--ease);
}

.champion-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.5);
}

.champion-chip__rank {
    width: 18px;
    color: var(--muted);
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
}

li:first-child > .champion-chip .champion-chip__rank {
    color: var(--amber);
}

.champion-chip__info {
    display: grid;
    gap: 3px;
}

.champion-chip__info strong {
    font-family: var(--font-display);
}

.champion-chip--more {
    gap: 8px;
    padding-inline: 18px;
    border-style: dashed;
    color: var(--text-2);
    font-weight: 600;
}

.champion-chip--more .icon {
    width: 18px;
    height: 18px;
    color: var(--violet-2);
}

/* ---------- Adaptations ---------- */
@media (max-width: 900px) {
    .hof-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .hof-step--1 { --height: 104px; }
    .hof-step--2 { --height: 78px; }
    .hof-step--3 { --height: 60px; }

    .hof-step .player-avatar--xl { --avatar-size: 64px; }
    .hof-step .player-avatar--lg { --avatar-size: 48px; }

    .hof-step__titles {
        display: none;
    }

    .hof-table__num {
        width: 48px;
    }

    .hof-table th .medal {
        margin-right: 0;
    }

    /* Colonnes de médailles : seule la pastille reste visible, le libellé reste lu */
    .hof-table__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .directory-toolbar .select {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player-card,
    .hof-step__crown {
        animation: none;
    }
}
