/* ===============================
ROOT
=============================== */

:root {
    --blue: #1dcbdd;
    --black: #2d2b27;
    --gold: #a58960;
}


/* ===============================
RESET
=============================== */
.player-glow {
    pointer-events: none;
}
html, body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}
.app-footer,
.app-nav,
.app-bottom-nav {
    z-index: 9999;
}

/* ===============================
APP STRUCTURE
=============================== */

body.app-mode {
    background: var(--blue);
     background: linear-gradient(180deg, #1f9ca5, #0f6d73);
}

.app {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px; /* espace navbar */
    box-sizing: border-box;
}

/* ===============================
HEADER
=============================== */

.app-header-global {
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.app-header-global img {
    width: 140px;
}


/* ===============================
FOOTER NAV
=============================== */

.app-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
}

.app-nav {
    height: 70px;
    background: var(--black);

    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    color: var(--blue);
    font-size: 11px;
    text-align: center;
}

.nav-icon img {
    width: 22px;
    height: 22px;
}


/* ===============================
BUTTON
=============================== */

.btn-main {
    display: inline-block;
    background: var(--black);
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    border: none;
}
/* ===============================
NAV LINKS RESET
=============================== */

.app-nav a {
    text-decoration: none;
    color: inherit;
}

.nav-label {
    color: var(--blue);
    font-size: 11px;
}
.nav-item.active .nav-label {
    color: var(--gold);
    font-weight: 600;
}


/* ===============================
NAV FIX TOTAL
=============================== */

.app-nav a {
    text-decoration: none !important;
    color: var(--blue) !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex: 1;
    height: 100%;

    text-align: center;

    color: var(--blue);
    font-size: 11px;
}

/* force les enfants */
.nav-item * {
    color: inherit !important;
    text-decoration: none !important;
}

.nav-icon img {
    display: block;
    margin-bottom: 2px;
}


/* ===============================
HOME
=============================== */

.page-home .app-content {
    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;
}

/* LOGO */
.page-home .app-logo {
    margin-bottom: 40px;
}

.page-home .app-logo img {
    width: 180px;
}

/* ACTIONS */
.page-home .app-actions {
    display: flex;
    gap: 15px;
}

/* BOUTONS */
.page-home .btn-main,
.page-home .btn-secondary {
    min-width: 140px;
}

/* bouton secondaire */
.page-home .btn-secondary {
    background: transparent;
    border: 2px solid var(--black);
    color: var(--black);
}

@media (max-width: 480px) {

    .page-home .app-actions {
        flex-direction: column;
        width: 100%;
    }

    .page-home .btn-main,
    .page-home .btn-secondary {
        width: 60%;
          margin: 0 auto;
  display: block;
    }

}
.page-home .app-content {
    padding-top: 40px;
}

/* ===============================
RESET LIENS
=============================== */

a {
    text-decoration: none;
    color: inherit;
}

.page-home a,
.page-login a,
.page-profil a {
    text-decoration: none;
}
/* ===============================
LOGIN PAGE
=============================== */


.page-login .app-content {
    display: flex;
    flex-direction: column;

    justify-content: flex-start; /* 🔥 au lieu de center */
    align-items: center;

    gap: 20px; /* espace propre */
}

.page-login .login-card {
    margin-top: 10px;
}
/* CARD */
.page-login .login-card {
    width: 100%;
    max-width: 380px;

    background: #fff;
    border-radius: 18px;
    padding: 25px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.page-match .match-card-v2 {
    width: 90%;
    max-width: 370px;
    margin-right:20px;
    background: #fff;
    border-radius: 18px;
    padding: 25px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
/* TITLE */
.page-login h2 {
    margin-bottom: 20px;
}

.page-match h2 {
    margin-bottom: 20px;
}

/* FORM */
.page-login .form-group {
    margin-bottom: 15px;
}

.page-login label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

/* INPUT */
.page-login input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--black);
    box-sizing: border-box;
}

/* BUTTON */
.page-login .btn-main {
    width: 100%;
    margin-top: 10px;
}

/* LINKS */
.page-login .login-links {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

/* ===============================
PAGE TOURNOI
=============================== */
/* ===============================
PAGE TOURNOI
=============================== */

.page-tournoi .app-content {
    padding: 20px;
}

/* ===============================
HEADER
=============================== */

.page-tournoi .tournoi-header h1 {
    margin-bottom: 15px;
}

/* ===============================
CARDS
=============================== */

.page-tournoi .card {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

/* ===============================
INPUTS
=============================== */

.page-tournoi input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #333;
    font-size: 14px;
}

/* ===============================
AJOUT JOUEUR
=============================== */

.page-tournoi .add-player {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.page-tournoi .add-player input {
    flex: 1;
}

.page-tournoi .add-player button {
    width: 50px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* ===============================
LISTE JOUEURS (SWIPE SIMPLE)
=============================== */

.page-tournoi .player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #f5f5f5;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;

    /* 💥 swipe fluide */
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* NOM */
.page-tournoi .player-item span {
    font-size: 14px;
}

.page-tournoi input {
    width:80%;
}

/* BOUTON SUPPRIMER (visible direct) */
.page-tournoi .player-delete {
    width: 40px;
    height: 40px;

    background: #e53935;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    cursor: pointer;

    flex-shrink: 0;
}

/* 💥 animation swipe suppression */
.page-tournoi .player-item.removing {
    transform: translateX(-100%);
    opacity: 0;
}

/* ===============================
FORMAT
=============================== */

.page-tournoi .radio-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.page-tournoi .radio-card {
    flex: 1;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}

/* ===============================
BOUTONS
=============================== */

.page-tournoi .btn-main,
.page-tournoi .btn-secondary {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
    cursor: pointer;
}

.page-tournoi .btn-main {
    background: #333;
    color: white;
}

.page-tournoi .btn-secondary {
    background: #ddd;
}

/* ====================================
CSS du moteur de recherche des joueurs actifs
================================ */


#player-suggestions {
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

/* CONTENEUR */
.add-player {
    position: relative;
}

/* INPUT */
#player-search {
    width: 100%;
}
/* CONTENEUR */
.add-player {
    position: relative;
}

/* INPUT */
#player-search {
    width: 100%;
}

/* SUGGESTIONS */
/* LIGNE ADD PLAYER */
.add-player {
    display: flex;
    gap: 10px;
}

/* WRAPPER INPUT */
.input-wrapper {
    position: relative;
    flex: 1;
}

/* INPUT */
#player-search {
    width: 100%;
}

/* SUGGESTIONS */
#player-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: white;
    border-radius: 10px;
    margin-top: 5px;

    z-index: 9999;

    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ITEM */
.suggestion-item {
    padding: 12px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f5f5f5;
}


.player-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.player-delete {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e53935;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
}

.player-item.removing {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.2s ease;
}

/* ===============================
PAGE MATCH — NORMALISATION
=============================== */

.page-match .app-content {
    padding: 15px;
}


/* ===============================
HEADER
=============================== */

.page-match .app-header {
    text-align: center;
    margin-bottom: 15px;
}

.page-match .app-header h1 {
    font-size: 20px;
    margin: 0;
}


/* ===============================
MATCH CARD
=============================== */

.page-match .match-card-v2 {
    margin-bottom: 15px;
}


/* HEADER MATCH */
.page-match .match-header {
    text-align: center;
    margin-bottom: 10px;
}

.page-match .match-title {
    font-size: 14px;
    color: #888;
}


/* BODY MATCH */
.page-match .match-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


/* ===============================
TEAMS
=============================== */

.page-match .team {
    flex: 1;
}

.page-match .team-left {
    text-align: left;
}

.page-match .team-right {
    text-align: right;
}

.page-match .team-name {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}


/* JOUEURS */
.page-match .player {
    font-size: 14px;
    margin-bottom: 3px;
    color: #fff;
}


/* ===============================
SCORE
=============================== */

.page-match .score-box.big {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
}


/* ===============================
SAISIE MÈNE
=============================== */

.page-match .mene-grid {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.page-match .team-input {
    flex: 1;
}


/* BOUTONS JOUEURS */
.page-match .player-btn {
    width: 100%;
    margin-bottom: 6px;
}


/* ===============================
MÈNE EN COURS
=============================== */

.page-match .mene-current {
    margin-top: 10px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}


/* ===============================
ACTIONS
=============================== */

.page-match .actions-card {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.page-match .actions-card .btn-secondary {
    flex: 1;
}

.page-match .actions-card .btn-main {
    flex: 2;
}


/* ===============================
PAGE MATCH — MÈNE
=============================== */

.page-match .mene-card {
    margin-top: 15px;
}


/* TITRE */
.page-match .mene-card h2 {
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}


/* ===============================
GRID
=============================== */

.page-match .mene-grid {
    display: flex;
    gap: 10px;
}

.page-match .team-input {
    flex: 1;
}


/* ===============================
TEAM NAME
=============================== */

.page-match .team-input .team-name {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
    text-align: center;
}


/* ===============================
BOUTONS JOUEURS
=============================== */

.page-match .player-btn {
    width: 80%;
    padding: 12px;
    margin-bottom: 6px;

    border: none;
    border-radius: 8px;

    background: #1e1e1e;
    color: #fff;
    font-size: 14px;

    transition: transform 0.1s ease, background 0.2s ease;
}

.page-match .btn-tir {
    width: 10%;
    padding: 12px;
    margin-bottom: 6px;

    border: none;
    border-radius: 8px;

    background: #1e1e1e;
    color: #fff;
    font-size: 14px;

    transition: transform 0.1s ease, background 0.2s ease;
}

/* feedback tactile */
.page-match .player-btn:active {
    transform: scale(0.96);
    background: #333;
}


/* ===============================
MÈNE EN COURS
=============================== */

.page-match .mene-current {
    margin-top: 12px;
    padding: 10px;

    font-size: 14px;
    text-align: center;

    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

/* ===============================
FIN MATCH SINGLE
================================= */