body {
    background-image: url('../images/pixel-bg3.png');
    background-size: repeat;
    background-color: #181825;
    background-attachment: fixed;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Formulaire de recherche */
.search-container {
    text-align: center;
    margin: 2rem 0;
}

.search-container h2 {
    font-size: 1rem;
    color: #00ffff;
    text-shadow: 0 0 6px #00ffffaa;
    margin-bottom: 1rem;
}

.search-container form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 12px;
    font-size: 0.7rem;
    border: 2px solid #ff00ff;
    border-radius: 8px;
    background: #1e1a35;
    color: #fff;
    outline: none;
    font-family: 'Press Start 2P', cursive;
    transition: box-shadow 0.3s ease;
}

#searchInput:focus {
    box-shadow: 0 0 10px #ff00ff88;
}

#searchInput::placeholder {
    color: #ccc;
}


.result-count {
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.2em;
	 text-align: center;
	justify-content:center;
}


.search-button {
    padding: 6px 6px;
    background: linear-gradient(90deg, #ffcc00, #ff00ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px #ffcc0088;
}

/* Conteneur des cartes */
.card-container {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    margin: 0 auto;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

.card {
    min-width: 200px;
    width: 100%;
    min-height: 300px; /* Hauteur minimum pour accueillir plus de contenu */
    box-sizing: border-box;
    padding: 1rem;
    background: #1e1a35;
    border: 2px solid #00ffff;
    border-radius: 16px;
    box-shadow: 0 0 12px #00ffff33;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    overflow: hidden;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #00ffff88;
}

.card h4 {
    font-size: 0.8rem;
    color: #00ffcc;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 4px #00ffccaa;
}

.card img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.7rem;
    color: #ccc;
    margin: 0.2rem 0;
    line-height: 1.2;
}

/* Style spécifique pour le champ informations */
.card p.infos {
    color: #ffcc00;
    font-style: italic;
    font-size: 0.65rem;
    max-height: 40px; /* Limite la hauteur pour éviter un débordement excessif */
    overflow-y: auto; /* Ajoute un défilement si le texte est trop long */
    padding: 0.2rem;
}

.card a {
    color: #ffcc00;
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.3s ease;
}

.card a:hover {
    color: #00ffff;
    text-shadow: 0 0 6px #00ffffaa;
}

.no-results {
    text-align: center;
    font-size: 1rem;
    color: #ffcc00;
    text-shadow: 0 0 4px #ffcc00aa;
    margin: 2rem 0;
}

/* Media Queries pour la grille */
@media (max-width: 520px) {
    .card-container {
        grid-template-columns: 1fr; /* 1 carte par ligne */
    }
}

@media (min-width: 521px) and (max-width: 800px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr); /* 2 cartes par ligne */
    }
}

@media (min-width: 801px) and (max-width: 1023px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr); /* 3 cartes */
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .card-container {
        grid-template-columns: repeat(4, 1fr); /* 4 cartes */
    }
}

@media (min-width: 1280px) {
    .card-container {
        grid-template-columns: repeat(5, 1fr); /* 5 cartes */
    }
}

/* Responsivité du formulaire */
@media (max-width: 720px) {
    .search-container h2 {
        font-size: 0.8rem;
    }

    #searchInput {
        font-size: 0.8rem;
        padding: 10px;
    }

    .search-button {
        font-size: 0.8rem;
        padding: 10px 15px;
    }

    .search-container form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-button {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}