/* Réinitialisation de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Conteneur principal */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    font-style: italic;
    color: #777;
    border-top: 1px solid #333;
}

/* La grille pour nos cartes de serveurs */
#server-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* La carte pour un serveur */
.server-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    /* Ombre pour un peu de relief */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-left-width: 5px;
}

.server-card h2 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.4rem;
}

.server-info p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #ccc;
}

.server-info p strong {
    color: #fff;
    font-weight: 600;
}

/* --- Statuts --- */

.status-text {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Statut EN LIGNE */
.server-card.status-online {
    border-left-color: #4CAF50; /* Vert */
}
.status-online .status-text {
    color: #4CAF50;
}

/* Statut HORS LIGNE */
.server-card.status-offline {
    border-left-color: #F44336; /* Rouge */
    opacity: 0.7;
}
.status-offline .status-text {
    color: #F44336;
}

/* Statut DÉMARRAGE / ERREUR */
.server-card.status-loading {
    border-left-color: #FFC107; /* Jaune */
}
.status-loading .status-text {
    color: #FFC107;
}

/* Section pour le lien de connexion */
.server-connect {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

/* Lien de connexion (ex: Steam) */
.connect-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #4CAF50; /* Vert */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.connect-link:hover {
    background-color: #45a049;
}
.connect-link.connect-steam {
    background-color: #1b2838; /* Bleu Steam */
}
.connect-link.connect-steam:hover {
    background-color: #2c435e;
}


/* Champ "Copier" (pour Minecraft) */
.connect-copy {
    display: flex;
}
.connect-copy input[type="text"] {
    flex-grow: 1; /* Prend toute la place restante */
    background-color: #111;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 5px 0 0 5px;
    font-family: monospace;
    font-size: 0.95rem;
}
.connect-copy button {
    background-color: #555;
    color: #fff;
    border: 1px solid #444;
    border-left: 0;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}
.connect-copy button:hover {
    background-color: #666;
}
.connect-copy button.copied {
    background-color: #4CAF50; /* Vert quand copié */
}
