/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

body a{

}

/* Header */
header {
    background: url("/images/image-header.png") center/cover no-repeat;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    height: 200px;
}

header h1 {
    font-size: 2.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #000000;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
    border: #333 solid;
    background-color: #f0f0f0;
}

nav ul li a:hover {
    background-color: #555;
    border-radius: 5px;
}

/* Sections principales */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    background-color: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

article {
    border: 2px solid #f4f4f4;
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.center {
    text-align: center;
}

h1 {
    font-size: 2rem;
    padding: 20px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

label {
    font-weight: bold;
}

select, input, button {
    padding: 10px;
    margin: 10px 0;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
}

button {
    background-color: #4CAF50;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

input[type="number"] {
    width: 100%;
}

ul {
    margin-left: 50px;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    font-size: 1rem;
}

th {
    background-color: #4CAF50;
    color: #fff;
    font-weight: bold;
}

td {
    background-color: #f9f9f9;
    color: #333;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

tr:nth-child(even) {
    background-color: #f4f4f4;
}

/* Footer */
footer {
    text-align: center;
}

/* Result displays */
#resultat, #hp-result, #combat-result, #montant-actuel, #timer {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
}

#montant-actuel {
    color: #007BFF;
}

#timer {
    text-align: center;
    font-size: 2.5rem;
    padding: 10px;
}

#timer-display {
    font-size: 2rem;
    text-align: center;
    border: 1px solid black;
    padding: 10px;
}

/* List styles */
#sorts-list {
    list-style: none;
}

#sorts-list li {
    margin: 5px 0;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

/* Form-specific styles */
select {
    width: auto;
    display: inline-block;
}

input[type="number"], input[type="text"] {
    width: 80%;
    display: inline-block;
}

#ajouter-montant button {
    margin-right: 10px;
}

/* Responsive styles */
@media (max-width: 957px){
    header h1 {
        font-size: 2rem;
    }

    /* Masquer le menu classique pour les petits écrans */
    nav ul {
        display: none; /* Masque le menu classique sur petits écrans */
    }

    /* Affichage du menu déroulant pour les petits écrans */
    nav select {
        display: inline-block; /* Affiche le menu déroulant */
        width: 100%; /* Largeur pleine pour le menu déroulant */
        padding: 10px;
        font-size: 1.5rem;
        background-color: #333;
        color: #fff;
        border: 1px solid #555;
        border-radius: 5px;
    }

    nav select option {
        background-color: #333;
        color: #fff;
        padding: 10px;
    }

    nav select option:hover {
        background-color: #555;
    }

    /* Ajustement des autres éléments */
    select, button, input[type="number"] {
        width: 100%;
    }

    /* Adaptation du tableau pour petits écrans */
    table {
        font-size: 0.1em;
    }

    td {
        word-wrap: break-word; /* Permet de couper les mots longs */
    }

    /* Optionnel: Transforme le tableau en version plus lisible */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 10%;
        border: 1px solid #ddd;
    }

    td {
        display: block;
        text-align: center;
        font-size: 1rem;
        position: static;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #333;
        display: none;
    }
}

/* Button states */
button:active {
    background-color: #45a049;
}

button:disabled {
    background-color: #bbb;
    cursor: not-allowed;
}