x/* Style de base */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #FFFFFF;
    margin: 0;
    padding: 0;
}

main {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Barre de recherche */
.search-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: #43659F;
    border-radius: 50px;
    padding: 5px 10px;
    width: 40%;
    max-width: 600px;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 50px;
    outline: none;
    width: 80%;
}

.search-form button {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    margin-right: 10px;
}

.search-form img {
    width: 20px;
    height: 20px;
}

/* Par défaut, on cache les boutons de filtre sur les grands écrans */
.types-filter {
    display: none;
    margin-top: 10px;
    text-align: center;
}

/* Sur mobile (exemple : jusqu'à 768px de largeur), on affiche les filtres */
@media (max-width: 768px) {
    .types-filter {
        display: block;
    }
}

.type-filter {
    background-color: #f3f3f3;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-size: 16px;
}

.type-filter:hover {
    background-color: #e0e0e0;
}

/* Section des productions */
.productions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.productions .type-titre {
    margin: 20px 0;
    font-size: 1.8rem;
    color: #E76130;
    text-align: center;
}

/* Grille des cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    max-width: 1200px; /* Pour éviter que les cartes s'étalent trop sur grand écran */
}

/* Centre une seule carte */
@media (min-width: 300px) {
    .cards-grid:has(.card:nth-child(1):nth-last-child(1)) {
        display: flex;
        justify-content: center;
    }
}

.card {
    max-width: 400px;
    height: 500px;
    background: #43659F;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card a {
    text-decoration: none;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card h3 {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #FFFFFF;
}

.card .date, 
.card .producteurs {
    font-size: 0.9rem;
    color: #fff;
    margin: 5px 0;
}

.card .contourcategorie {
    background-color: #fff;
    border: solid 1px black;
    border-radius: 15px;
    color: #43659F;
    width: fit-content;
    min-width: 40px;
    text-align: center;
    padding: 5px;
    margin-top: 10px;
    font-size: small;
}

.card .pastilles {
    display: flex;
    gap: 5px;
}

.card .synopsis {
    font-size: 0.9rem;
    color: #fff;
}

/* Message d'erreur */
.no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #E76130;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    main {
        margin: 0;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    main {
        margin: 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .search-form {
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }
}