/* Variables pour les couleurs */
:root {
    --bg-color: #f0f2f5;
    --primary-color: #ff3b3b; /* Rouge Pokédex */
    --text-color: #333;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    padding-top: 50px;
    min-height: 100vh;
}

/* Conteneur Principal */
.pokedex-container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 450px;
    text-align: center;
}

h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Barre de recherche */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex-grow: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #d32f2f;
}

/* États (Chargement, Erreur, Caché) */
.hidden {
    display: none;
}

#loading {
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

#error-msg {
    color: var(--primary-color);
    font-weight: bold;
    margin: 20px 0;
    background-color: #ffecec;
    padding: 10px;
    border-radius: 5px;
}

/* Carte de résultat */
.pokemon-card {
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

#poke-name {
    text-transform: capitalize; /* Met la première lettre en majuscule */
    margin-bottom: 10px;
}

.img-container {
    background-color: #f8f9fa;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #ddd;
}

#poke-img {
    width: 180px;
    height: 180px;
}

.stats-container {
    text-align: left;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 10px;
}

.stats-list {
    list-style: none;
    margin-top: 10px;
}

.stats-list li {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.stats-list span {
    float: right;
    color: var(--primary-color);
}

/* Animation d'apparition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}