/* --- Base Styles --- */
/* Import d'une police Ã©lÃ©gante (remplacez-la par une police de votre choix) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Déclaration de la police Neuropol Custom */
@font-face {
    font-family: 'Neuropol Custom';
    src: url('https://assets.team-réality.com/assets/fonts/neuropol/Neuropol X Rg.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --text-color: #333333;
    --light-grey: #f0f0f0;
}

*,
::before,
::after {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
}

body {
    overflow-x: hidden;
}

.back-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0px 20px;
}

.back-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    padding: 1.2rem 2.5rem;
    /* Augmentation du rembourrage */
    margin-top: 2rem;
    font-size: 1.1rem;
    /* Augmentation de la taille de la police */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}


@media screen and (min-width : 0px) {

    .teams_container {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 20px 0px;
    }

    .error-message {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* --- Page Équipe (equipes.php) --- */

    .team-details {
        padding: 30px 0;
    }

    .team-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .game-logo {
        max-width: 150px;
        height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .team-details h1 {
        font-size: 3em;
        color: var(--color-accent);
        margin-bottom: 5px;
        white-space: normal;
        /* autorise le retour à la ligne */
        word-wrap: break-word;
        /* anciens navigateurs */
        overflow-wrap: break-word;
        /* standard moderne */
    }

    .team-details h2 {
        font-size: 1.5em;
        color: #ccc;
        font-weight: normal;
    }

    .team-details hr {
        border: 0;
        border-top: 1px solid #333;
        margin: 30px 0;
    }

    .team-players,
    .team-coach {
        background-color: var(--color-dark-surface);
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .team-details h3 {
        border-left: 4px solid var(--color-accent);
        padding-left: 10px;
        margin-bottom: 15px;
        text-align: center;
    }

    .team-details p {
        text-align: center;
    }

    .team-players ul {
        list-style: none;
    }

    .team-players li {
        padding: 8px 0;
        border-bottom: 1px dotted #333;
        display: flex;
        justify-content: space-between;
    }

    .team-players li:last-child {
        border-bottom: none;
    }

    .real-name {
        color: #999;
        font-size: 0.9em;
    }

    .player-grid {
        display: flex;
        flex-wrap: wrap;
        /* Permet aux cartes de passer à la ligne */
        gap: 20px;
        /* Espace entre les cartes */
        justify-content: center;
        /* Centre les cartes */
        margin-top: 20px;
    }

    /* 2. Style de la carte individuelle */
    .player-card {
        background-color: var(--secondary-color);
        /* Fond clair pour la carte */
        color: var(--text-color);
        /* Texte sombre */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        width: 300px;
        /* Largeur fixe de la carte */
        overflow: hidden;
        /* Assure que l'image est contenue */
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .player-card:hover {
        transform: translateY(-5px);
        /* Effet au survol */
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

    /* 3. Style de l'image (en haut de la carte) */
    .player-photo {
        width: 100%;
        /* L'image prend toute la largeur de la carte */
        object-fit: cover;
        /* Assure que l'image remplit le conteneur */
        border-bottom: 3px solid var(--primary-color);
    }

    /* 4. Conteneur du texte */
    .player-info {
        padding: 15px;
    }

    /* 5. Styles des éléments de texte */
    .player-pseudo {
        font-size: 1.4em;
        color: var(--primary-color);
        margin-bottom: 5px;
    }

    .player-role {
        font-size: 0.95em;
        color: #555;
        margin-bottom: 8px;
    }

    .player-real-name {
        font-size: 0.85em;
        color: #999;
    }

    /* --- Style pour la carte du Coach --- */

    .team-coach {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .coach-card {
        background-color: var(--secondary-color);
        /* Fond clair pour la carte */
        color: var(--text-color);
        /* Texte sombre */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        width: 300px;
        /* Largeur fixe de la carte */
        overflow: hidden;
        /* Assure que l'image est contenue */
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .coach-photo {
        width: 100%;
        /* L'image prend toute la largeur de la carte */
        object-fit: cover;
        /* Assure que l'image remplit le conteneur */
        border-bottom: 3px solid var(--primary-color);
    }

    .coach-info h4 {
        font-size: 1.5em;
        color: var(--primary-color);
        margin-bottom: 5px;
    }

    .coach-info p {
        font-size: 1em;
        color: #555;
        margin: 0px 10px 10px 10px;
    }
}

@media screen and (min-width : 768px) {

    .teams_container {
        display: flex;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 20px 0px;
    }
}