/* public/css/style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 900px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

header {
    background-color: #333;
    padding: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #444;
}

header h1 {
    margin: 0;
    color: #ffa500;
}

header p {
    margin: 5px 0 0;
    color: #aaa;
}

header a {
    color: #ffc966;
    text-decoration: none;
}
header a:hover {
    text-decoration: underline;
}

main {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

section {
    background-color: #333;
    padding: 15px;
    border-radius: 6px;
}

h2 {
    margin-top: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    color: #ffa500;
}

/* --- Styles pour les listes et tables --- */

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 8px 0;
    border-bottom: 1px solid #444;
}
li:last-child {
    border-bottom: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #444;
}

th {
    color: #ccc;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Styles pour le lobby --- */
.lobby-main {
    grid-template-columns: 1fr;
}
.parties ul a {
    color: #e0e0e0;
}

/* --- Styles pour les formulaires --- */
form {
    display: flex;
    flex-direction: column;
}
input[type="text"] {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #222;
    color: #e0e0e0;
    font-size: 1em;
}
button {
    padding: 10px 15px;
    background-color: #ffa500;
    color: #1a1a1a;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
}
button:hover {
    background-color: #ffc966;
}


/* =================================
   Styles pour la carte du monde
==================================== */

/* Layout spécifique pour la page carte (plus de place pour la grille) */
.main-map {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
}

.map-container {
    overflow-x: auto; /* Permet de scroller si la carte est trop large */
    background-color: #1a1a1a;
    padding: 5px;
    border-radius: 4px;
}

.map-grid {
    display: grid;
    border: 1px solid #444;
    width: fit-content; /* S'adapte à la taille de la grille */
    margin: 0;
}

.tile {
    width: 25px;
    height: 25px;
    box-sizing: border-box;
    border: 1px solid #222; /* Bordure sombre et subtile */
}

.tile.village {
    border: 2px solid #ffa500; /* Utilise la couleur d'accent du thème */
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.6);
    position: relative; /* Pour d'éventuels indicateurs futurs */
}

.legend li {
    display: flex;
    align-items: center;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0; /* Empêche la couleur de rétrécir */
    margin-right: 10px;
    border: 1px solid #555;
}

.village-legend {
    border: 2px solid #ffa500;
    background-color: transparent;
}


/* --- Pied de page --- */
footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    color: #777;
    border-top: 1px solid #444;
}