/* ==========================================================================
   ARCADE — Hub (arcade/index.php) + Classements (arcade/leaderboard.php)
   Restyle "app mobile" : lignes de jeu + carte de classement.
   100% basé sur les tokens --ac-* du site (assets/css/style.css) pour rester
   compatible avec les thèmes clair / fleur / événements.
   ========================================================================== */

/* ---- Wrapper / héros communs ---- */
.arcade-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.arcade-wrap--narrow {
    max-width: 760px;
}

.arcade-hero {
    text-align: center;
    padding: 48px 20px 32px;
}

.arcade-hero h1 {
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    color: var(--ac-accent1);
    font-family: var(--ac-font-h1);
    margin: 0 0 10px;
    letter-spacing: 1px;
    animation: arcadeGlow 3s ease-in-out infinite alternate;
}

@keyframes arcadeGlow {
    from { text-shadow: 0 0 18px rgba(212, 175, 55, .35); }
    to   { text-shadow: 0 0 38px rgba(212, 175, 55, .85), 0 0 70px rgba(212, 175, 55, .25); }
}

.arcade-hero p {
    font-size: clamp(.95rem, 2.2vw, 1.1rem);
    color: var(--ac-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ---- Mise en page : liste de jeux + carte classement ---- */
.arcade-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

@media (min-width: 900px) {
    .arcade-layout {
        display: grid;
        grid-template-columns: 1.15fr .85fr;
        align-items: start;
        gap: 30px;
    }

    .hof-card {
        position: sticky;
        top: 20px;
    }
}

/* ==========================================================================
   Liste de jeux (lignes façon maquette app)
   ========================================================================== */
.arcade-game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arcade-game-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--ac-border);
    background: var(--ac-bg2);
    transition: border-color .2s ease, transform .2s ease;
}

.arcade-game-row:hover {
    transform: translateY(-2px);
}

.arcade-game-row--fox:hover   { border-color: #e67e22; }
.arcade-game-row--stel:hover  { border-color: #00ffff; }
.arcade-game-row--match:hover { border-color: #9d00ff; }

.arcade-game-row__main {
    display: flex;
    align-items: center;
    gap: 13px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
}

.arcade-game-row__main:focus-visible {
    outline: 2px solid var(--ac-accent1);
    outline-offset: 3px;
}

.arcade-game-row__icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 21px;
}

.arcade-game-row--fox .arcade-game-row__icon   { background: rgba(230, 126, 34, .16); color: #e67e22; }
.arcade-game-row--stel .arcade-game-row__icon  { background: rgba(0, 255, 255, .14);  color: #00ffff; }
.arcade-game-row--match .arcade-game-row__icon { background: rgba(157, 0, 255, .16);  color: #9d00ff; }

.arcade-game-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.arcade-game-row__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--ac-font-h2);
    font-size: 1.02rem;
    color: var(--ac-text);
}

.arcade-game-row__status {
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ac-success);
    background: rgba(46, 204, 113, .14);
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}

.arcade-game-row__sub {
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .8rem;
    color: var(--ac-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.arcade-game-row__side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-left: 4px;
}

.arcade-game-row__best {
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .8rem;
    font-weight: 700;
    color: var(--ac-accent1);
    white-space: nowrap;
}

.arcade-game-row__best--empty {
    color: var(--ac-muted);
    font-weight: 500;
}

.arcade-game-row__lb {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--ac-border);
    color: var(--ac-muted);
    text-decoration: none;
    font-size: .85rem;
    transition: border-color .2s, color .2s;
}

.arcade-game-row__lb:hover {
    border-color: var(--ac-accent1);
    color: var(--ac-accent1);
}

/* ==========================================================================
   Carte "Hall of Fame" (façon carte classement de la maquette)
   ========================================================================== */
.hof-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--ac-border);
    background: var(--ac-card, #1a1a24);
}

.hof-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.hof-card__label {
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ac-muted);
}

.hof-card__label i {
    color: var(--ac-accent1);
    margin-right: 6px;
}

/* ── Onglets par jeu (hofTab() en JS bascule .visible / .active-*) ── */
.hof-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hof-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 20px;
    border: 1px solid var(--ac-border);
    background: transparent;
    color: var(--ac-muted);
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.hof-tab.active-fox   { border-color: #e67e22; color: #e67e22; background: rgba(230, 126, 34, .12); }
.hof-tab.active-stel  { border-color: #00ffff; color: #00ffff; background: rgba(0, 255, 255, .08); }
.hof-tab.active-match { border-color: #9d00ff; color: #9d00ff; background: rgba(157, 0, 255, .1); }

.hof-pane { display: none; }
.hof-pane.visible { display: block; }

.hof-list {
    display: flex;
    flex-direction: column;
}

.hof-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--ac-border);
}

.hof-row:last-child { border-bottom: none; }

.hof-rank {
    flex: none;
    width: 22px;
    text-align: center;
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .82rem;
    font-weight: 700;
}

.hof-avatar {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ac-bg2);
    border: 1px solid var(--ac-border);
    font-family: var(--ac-font-h2);
    font-size: .8rem;
    color: var(--ac-text);
    overflow: hidden;
}

.hof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hof-name {
    flex: 1;
    min-width: 0;
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .85rem;
    font-weight: 600;
    color: var(--ac-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hof-score {
    flex: none;
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: .82rem;
    font-weight: 700;
}

.hof-empty {
    text-align: center;
    color: var(--ac-muted);
    padding: 24px 10px;
    font-style: italic;
    font-size: .85rem;
}

.hof-footer {
    text-align: center;
    margin-top: 16px;
}

/* ==========================================================================
   Page Classements complets (arcade/leaderboard.php)
   ========================================================================== */
.lb-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    justify-content: center;
}

.lb-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 24px;
    border: 1px solid var(--ac-border);
    background: var(--ac-bg2);
    color: var(--ac-muted);
    font-size: .88rem;
    font-family: var(--ac-font-h2);
    text-decoration: none;
    transition: all .2s;
}

.lb-tab:hover { border-color: var(--ac-text); color: var(--ac-text); }

.lb-tab--fox.active    { border-color: #e67e22; color: #e67e22; background: rgba(230, 126, 34, .12); }
.lb-tab--stel.active   { border-color: #00ffff; color: #00ffff; background: rgba(0, 255, 255, .08); }
.lb-tab--match.active  { border-color: #9d00ff; color: #9d00ff; background: rgba(157, 0, 255, .1); }
.lb-tab--all.active    { border-color: var(--ac-accent1); color: var(--ac-accent1); background: rgba(212, 175, 55, .1); }

.lb-card {
    background: var(--ac-card, #1a1a24);
    border-radius: 16px;
    border: 1px solid var(--ac-border);
    padding: 8px 16px;
}

.lb-list {
    display: flex;
    flex-direction: column;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 4px;
    border-bottom: 1px solid var(--ac-border);
}

.lb-row:last-child { border-bottom: none; }

.lb-row--top1 { background: linear-gradient(90deg, rgba(212, 175, 55, .1), transparent); }
.lb-row--top2 { background: linear-gradient(90deg, rgba(192, 192, 192, .07), transparent); }
.lb-row--top3 { background: linear-gradient(90deg, rgba(205, 127, 50, .07), transparent); }

.lb-rank {
    flex: none;
    width: 30px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}

.lb-avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ac-bg2);
    border: 1px solid var(--ac-border);
    font-family: var(--ac-font-h2);
    font-size: .9rem;
    color: var(--ac-text);
    overflow: hidden;
}

.lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lb-name {
    font-family: var(--ac-font-body, 'Quicksand', sans-serif);
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-game-name {
    font-size: .74rem;
    color: var(--ac-muted);
    margin-top: 2px;
}

.lb-score {
    flex: none;
    font-family: 'Orbitron', var(--ac-font-body, 'Quicksand', sans-serif);
    font-size: 1.02rem;
    font-weight: bold;
}

.lb-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ac-muted);
    font-style: italic;
}

.lb-empty a { color: var(--ac-accent1); }

.lb-back {
    text-align: center;
    margin-top: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .arcade-game-row__icon { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
    .arcade-game-row__title { font-size: .92rem; }
    .hof-tabs { gap: 6px; }
    .hof-tab { padding: 6px 11px; font-size: .74rem; }
    .lb-tabs { gap: 6px; }
    .lb-tab { padding: 7px 13px; font-size: .8rem; }
}
