* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-image: url("../img/fond_ecran2.jpg"); /* Chemin vers votre image de fond */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #2d6a4f;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
}

/* From Uiverse.io by Jedi-hongbin */
button {
    display: flex;
    height: 3em;
    width: 100px;
    align-items: center;
    justify-content: center;
    background-color: #000; /* Couleur noire pour le bouton */
    color: #fff; /* Texte blanc */
    border-radius: 3px;
    letter-spacing: 1px;
    transition: all 0.2s linear;
    cursor: pointer;
    border: none;
    background: #000;
    position: fixed; /* Fixe le bouton à un endroit */
    top: 35px; /* Remonte le bouton */
    left: 10px; /* Positionne à gauche */
    z-index: 1000; /* Assure que le bouton soit au-dessus des autres éléments */
}

button > svg {
    margin-right: 5px;
    margin-left: 5px;
    font-size: 20px;
    transition: all 0.4s ease-in;
    fill: #fff; /* Change la couleur de la flèche en blanc */
}

button:hover > svg {
    font-size: 1.2em;
    transform: translateX(-5px);
}

button:hover {
    box-shadow: 9px 9px 33px #d1d1d1, -9px -9px 33px #ffffff;
    transform: translateY(-2px);
}



main {
    display: flex;
    justify-content: center;
    align-items: center; /* Centre les cartes verticalement dans le conteneur */
    padding: 2rem;
    flex: 1;
}

.recettes {
    display: flex;
    gap: 1rem; /* Réduit l'espace entre les cartes */
    flex-wrap: wrap;
    justify-content: center; /* Centre les cartes horizontalement */
    max-width: 1000px; /* Limite la largeur totale pour mieux centrer les éléments */
}

.recette-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 320px; /* Taille fixe plus petite pour les cartes */
    max-width: 100%;
    text-decoration: none;
}

.recette-card img {
    width: 100%;
    height: 180px; /* Hauteur légèrement réduite */
    object-fit: cover;
}

.recette-card h2 {
    color: #2d6a4f;
    font-size: 1.4rem;
    margin: 1rem 0;
    text-decoration: none;
}

.recette-card p {
    padding: 0 1rem 1.5rem;
    color: #555;
    text-decoration: none;
}

.recette-card a {
    text-decoration: none;
}

.recette-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.recette-card-detail {
    display: flex;
    flex-direction: column; /* Alignement vertical du contenu */
    align-items: center; /* Centrer horizontalement tout le contenu */
    justify-content: center; /* Centrer verticalement si nécessaire */
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    border: none; /* Pas de bordures */
    border-radius: 15px; /* Coins arrondis */
    background-image: url("../img/fond-detail.avif");
    background-size: cover; /* Adapter l'image au conteneur */
    background-position: center; /* Centrer l'image */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Ombre autour de l'encadré */
    color: inherit; /* Conserver la couleur du texte */
    text-align: center; /* Centrer le texte */
}

.recette-card-detail img {
    width: 50%; /* Image plus petite */
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.recette-card-detail h1, .recette-card-detail h2 {
    color: #333;
    font-family: 'Arial', sans-serif;
    margin-bottom: 10px;
}

.recette-card-detail p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.recette-card-detail ul, .recette-card-detail ol {
    font-size: 1.1em;
    color: #555;
    margin: 15px auto;
    text-align: left; /* Alignement à gauche pour une meilleure lisibilité */
    padding: 0;
}



footer {
    text-align: center;
    padding: 1rem;
    background-color: #2d6a4f;
    color: #fff;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recettes {
        flex-direction: column;
        align-items: center;
    }

    .recette-card {
        width: 90%; /* Largeur ajustée pour mobile */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .recette-card h2 {
        font-size: 1.3rem;
    }

    .recette-card p {
        font-size: 0.9rem;
    }
}
