* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    font-family: "poppins", sans-serif;
}

html, body {
    font-family: 'poppins', sans-serif;
    background-color: #242424;
    background-attachment: fixed;
    width: 100%;
    max-width: 100%;
}

header {
    display: block;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    align-items: center;
}

.header-container {
    color: #e65555;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Fix Flexbox général : autorise les enfants flex à rétrécir */
main, main * {
    min-width: 0;
}

main {
    display: flex;
    flex-direction: column;
    min-height: 75vh;
    width: 90%;
    align-items: stretch; /* Remplace normal pour bien caler les blocs en largeur */
    font-family: 'poppins', sans-serif;
    color: aliceblue;
    border: solid #e65555;
    margin: 30px auto;
    font-size: 25px;
    border-radius: 10px;
    box-shadow: 6px 6px 50px rgba(255, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
    padding: 50px;
    /* Bloque impérativement tout débordement hors du cadre rouge */
    max-width: 100%;
    overflow-x: hidden;
}

main h6 {
    font-size: 11px;
    color: #ff0000;
    display: flex;
}

main a {
    color: #e65555;
}

footer {
    color: #e65555;
    text-align: center;
    font-size: 12px;
}

/* Configuration de la barre de navigation */
nav {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 15px 25px;
    background: #242424;
    box-shadow: inset 0px -1px 0px #050505;
}

.nav-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 20px;
}

.nav-icon span {
    font-family: 'poppins', sans-serif;
    font-size: 25px;
    margin-left: 10px;
    font-weight: 400;
    color: aliceblue;
}

.hamburger {
    display: none;
}

.navlinks-container a {
    margin: 0 10px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: aliceblue;
    display: inline-block;
    position: relative;
}

.navlinks-container a::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -3px;
    width: 100%;
    height: 1px;
    transform: scale(0);
    transform-origin: left;
    background: #e65555;
    transition: transform 0.3s ease-in-out;
}

.navlinks-container a:hover::after {
    transform: scale(1);
}

.nav-authentication {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 50px;
}

.nav-authentication button {
    position: relative;
    width: 130px;
    height: 50px;
    background-color: aliceblue;
    color: #242424;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
}

.nav-authentication button:hover {
    background-color: #e65555;
}

.sign-btns button:nth-child(2) {
    background: #e65555;
}

/* Configuration du menu de login */
.form_sign * {
    font-family: 'Poppins', sans-serif;
    color: #e65555;
    letter-spacing: 0.5px;
    outline: none;
    border: none;
}

.form_sign {
    height: 600px;
    width: 400px;
    background-color: rgba(255, 255, 255, 0.13);
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid #e65555;
    box-shadow: 0 0 40px #e65555;
    padding: 50px 35px;
    max-width: 90vw;
}

.form_sign h3 {
    font-size: 32px;
    font-weight: 500;
    line-height: 42px;
    text-align: center;
}

.form_sign h6 {
    text-align: center;
    color: #ff0000;
}

.form_sign label {
    display: block;
    margin-top: 30px;
    font-size: 16px;
    font-weight: 500;
}

.form_sign input {
    display: block;
    height: 50px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 0 10px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 300;
}

.form_sign ::placeholder {
    color: #242424;
}

.form_sign a {
    font-style: italic;
    text-decoration: underline;
}

.form_sign button {
    margin-top: 50px;
    width: 100%;
    background-color: aliceblue;
    color: #242424;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
}

.btn-log:hover {
    background-color: #e65555;
    color: #242424;
}

.podium-kill tr:nth-child(2) {
    background-color: yellow;
}

/* ISOLATION & SCROLL DES TABLEAUX */

/* section et table-container capturent le scroll horizontal */
section, .table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Style unique pour TOUS les tableaux */
table, 
.Classement-saison, 
.podium-kill, 
.stat-session, 
.tableau-membres, 
.classement-perso, 
.bankroll-perso {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

table th, 
.Classement-saison th, 
.podium-kill th, 
.stat-session th, 
.tableau-membres th, 
.classement-perso th, 
.bankroll-perso th {
    border: 1px solid black;
    padding: 12px 8px;
    color: black;
    background-color: #e65555;
    font-size: 14px;
    font-weight: 600;
    white-space: normal;      /* autorise le retour à la ligne */
    word-break: break-word;
    overflow-wrap: break-word;
}

table td, 
.Classement-saison td, 
.podium-kill td, 
.stat-session td, 
.tableau-membres td, 
.classement-perso td, 
.bankroll-perso td {
    border: 1px solid black;
    padding: 10px 6px;
    color: black;
    background-color: aliceblue;
    font-size: 13px;
    text-align: center;
    white-space: normal;      /* autorise le retour à la ligne */
    word-break: break-word;
    overflow-wrap: break-word;
}

.classement-perso td:nth-child(2) {
    text-align: left;
}

/* Formulaires et entrées */
.form-add-member,
.add_club,
.div_add_season,
.form-add-club,
.form-add-season {
    display: flex;
    flex-direction: column;
}

button {
    margin-top: 25px;
    width: 130px;
    height: 50px;
    background-color: aliceblue;
    color: #242424;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
}

button:hover, 
.form-add-member button:hover, 
.valider button:hover, 
.form-add-club button:hover, 
.form-add-season button:hover, 
.form-add-party button:hover, 
.annulation button:hover {
    background-color: #e65555;
}

input {
    width: 200px;
    height: 40px;
    border-radius: 5px;
    font-size: large;
}

select {
    height: 40px;
    border-radius: 5px;
    font-size: large;
}

.checkplayer {
    width: 40px;
    height: 20px;
    border-radius: 7px;
    cursor: pointer;
}

.form-add-member input,
.form-add-season input {
    width: 300px;
    height: 40px;
    border-radius: 5px;
}

.form-add-season select {
    width: 200px;
    height: 40px;
    border-radius: 5px;
}

h5 {
    font-family: Arial, Helvetica, sans-serif;
}

/* Configuration réactive pour petit écran */
@media (max-width: 900px) {
    main {
        width: 95%;
        padding: 15px 10px;
        font-size: 16px;
        overflow-x: hidden; /* garde le cadre net */
    }

    /* Taille de police et rembourrage réduits dans le tableau */
    table th, table td,
    .Classement-saison th, .Classement-saison td,
    .stat-session th, .stat-session td,
    .podium-kill th, .podium-kill td,
    .tableau-membres th, .tableau-membres td,
    .classement-perso th, .classement-perso td,
    .bankroll-perso th, .bankroll-perso td {
        padding: 6px 4px;
        font-size: 11px;
        white-space: normal;
        word-break: break-word;
    }

    input, select, 
    .form-add-member input, 
    .form-add-season input, 
    .form-add-season select {
        max-width: 100%;
        width: 100%;
    }

    nav {
        padding: 15px 20px;
        position: relative;
        z-index: 4;
    }

    .nav-icon {
        order: 2;
        margin: 0 auto;
    }

    .nav-icon span {
        font-size: 22px;
    }

    .main-navlinks {
        order: 1;
    }

    .hamburger {
        width: 20px;
        height: 20px;
        cursor: pointer;
        border: none;
        display: flex;
        background: #242424;
        align-items: center;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: #e65555;
        position: absolute;
        pointer-events: none;
        transition: opacity 0.4s 0.15s ease-out;
    }

    .hamburger span:nth-child(1),
    .hamburger span:nth-child(3) {
        transition: transform 0.4s ease-out;
    }

    .hamburger span:nth-child(1) {
        transform: translateY(7px);
    }

    .hamburger span:nth-child(3) {
        transform: translateY(-7px);
    }

    .hamburger.open span:nth-child(1) {
        transform: translate(0) rotate(135deg);
    }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
        transition: opacity 0s ease-out;
    }

    .hamburger.open span:nth-child(3) {
        transform: translate(0) rotate(-135deg);
    }

    .navlinks-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        background: #242424;
        top: 100%;
        left: 0;
        height: 100vh;
        padding: 15px 30px 15px 20px;
        border-right: 1px solid #050505;
        transform: translate(-100%);
        transition: transform 0.4s ease-out;
    }

    .open {
        transform: translate(0%);
    }

    .navlinks-container a {
        font-size: 18px;
        margin: 10px 0;
    }

    .nav-authentication {
        order: 3;
        margin-left: 0;
        margin-right: 20px;
    }

    .sign-btns {
        display: none;
    }

    .sign-user {
        display: block;
        cursor: pointer;
        border: none;
    }

    .sign-user img {
        width: 20px;
        color: #e65555;
    }
}