/* Style global pour la page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f9f9f9;
    padding-top: 80px; /* Ajustement pour ne pas cacher le fond avec la barre */
}

nav ul {
    display: none; /* Cacher le menu par défaut */
}

.menu-toggle {
    display: block;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    font-size: 20px;
}

@media (min-width: 768px) {
    nav ul {
        display: flex; /* Afficher le menu sur les écrans larges */
    }
    .menu-toggle {
        display: none; /* Cacher le bouton sur les grands écrans */
    }
}

/* En-tête */
header {
    background-color: #1E2A38;
    color: #fff;
    padding: 10px 0; /* Réduction de l'épaisseur de la barre */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header .logo img {
    max-height: 60px;  /* Limite la hauteur du logo à 50px */
    width: auto;       /* Garde les proportions du logo */
    display: block;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: 0 auto;
}

header .logo h1 {
    font-size: 2rem; /* Réduction de la taille de la police pour s'adapter à la nouvelle taille de la barre */
    letter-spacing: 2px;
}

nav ul {
    list-style-type: none;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    border-radius: 5px;
}

nav ul li a:hover {
    background-color: #fff;
    color: #1E2A38;
}

.search-btn img {
    width: 30px; /* Ajuste la taille selon tes préférences */
    height: 30px; /* Ajuste la taille selon tes préférences */
}

/* Barre de recherche */
.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    width: 200px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
}

/* Cacher le bouton au départ */
.scroll-to-top {
    display: none; /* Le bouton est caché par défaut */
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;

}

.scroll-to-top:hover {
    background-color: #2980b9;
}

/* Section Hero */
.hero {
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero .btn-primary {
    background-color: #3498db;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 5px;
}

.hero .btn-primary:hover {
    background-color: #2980b9;
}

.recettes-completes h2 {
    font-size: 2.5rem; /* Taille du texte */
    font-weight: bold; /* Rendre le titre plus épais */
    text-align: center; /* Centrer le titre */
    margin-top: 50px; /* Ajouter de l'espace au-dessus du titre */
    color: #1E2A38; /* Choisir une couleur qui correspond à ton thème */
    text-transform: uppercase; /* Mettre le titre en majuscules */
    letter-spacing: 2px; /* Espacer légèrement les lettres */
    padding-bottom: 20px; /* Espacement en bas du titre */
    position: relative;
}

/* Ajouter un effet de texte (ombre, ombre portée, etc.) */
.recettes-completes h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3498db; /* Ajouter une ligne décorative en bas du titre */
}

/* Section des recettes populaires */
.recettes-populaires {
    background-color: #fff;
    padding: 50px 0;
    text-align: center;
}

.recettes-populaires h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.recettes-completes .recettes-list {
    margin-top: 30px; /* Décaler les recettes vers le bas */
}

.recettes-list {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.recette-card {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 30%;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
	margin-bottom: 20px; /* Ajouter un espace entre chaque carte de recette */
}

.recette-card:hover {
    transform: translateY(-10px);
}

.recette-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.recette-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.recette-card p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.recette-card .btn-primary {
    background-color: #3498db;
    color: white;
    padding: 10px 25px;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 5px;
}

.recette-card .btn-primary:hover {
    background-color: #2980b9;
}

.recette-form form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.recette-form label {
    font-weight: bold;
}
.recette-form input, .recette-form textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}


/* Animation fade-in lors du défilement */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section À propos du fondateur */
.about-founder {
    background-color: #f1f1f1;
    padding: 50px 0;
    text-align: center;
}

.about-founder h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-founder p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Section Newsletter */
.newsletter {
    background-color: #1E2A38;
    color: white;
    padding: 50px 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.newsletter form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.newsletter input {
    padding: 10px;
    font-size: 1rem;
    width: 250px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.newsletter button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.newsletter button:hover {
    background-color: #2980b9;
}

/* Footer */
footer {
    background-color: #1E2A38;
    color: white;
    padding: 20px 0;
    text-align: center;
}

footer .container {
    width: 80%;
    margin: 0 auto;
}

/* Bouton "Retour en haut" */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
}

.scroll-to-top:hover {
    background-color: #2980b9;
}

/* Section recette */
.recette {
    background-color: #fff;
    padding: 50px 0;
    text-align: center;
}

.recette h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.recette img {
    width: 100%;              /* Remplira toute la largeur disponible de son parent */
    max-width: 600px;         /* Limite la taille à 600px (ou une autre taille de ton choix) */
    height: auto;             /* Garde le ratio de l'image */
    border-radius: 10px;
    margin-bottom: 30px;
    display: block;           /* Évite l'espacement en bas de l'image */
    margin-left: auto;
    margin-right: auto;       /* Centre l'image horizontalement */
}

.recette-card {
    width: 30%;             /* Garde une largeur raisonnable pour la carte */
    max-width: 500px;       /* Limite la largeur maximale de la carte */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    margin: 0 auto;         /* Centre la carte dans son conteneur */
}

.recette-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}

.ingredients {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.ingredients .ingredient {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ingredients .ingredient h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.instructions {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
}

.instructions h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.instructions ol {
    list-style-type: decimal;
    padding-left: 40px;
    text-align: left;
}

.instructions ol li {
    margin-bottom: 20px;
}

.instructions ol li:last-child {
    margin-bottom: 0;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* Footer spécifique à la page recette */
footer {
    background-color: #1E2A38;
    color: white;
    padding: 20px 0;
    text-align: center;
}

footer .container {
    width: 80%;
    margin: 0 auto;
}
