@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');


body {
    font-family: 'Inter', Arial, sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;


}

/* Style de l'en-tête */

header {
    padding: 20px 0;
    text-align: center;
}

/* Style de la barre de navigation */

.navbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0 40px;
    max-width: 90%;
}

.navbar-left {
    flex: 1;
    text-align: left;
}

.navbar-center {
    flex: 2;
    text-align: center;
}

.navbar-right {
    flex: 1;
    text-align: right;
}

.site-name {
    font-size: 2.2em;
    font-weight: bold;
}

/* Style des liens de navigation */

.nav-link {
    display:inline-block;
    padding:15px 20px;
    margin: 10px;
    color: #333;
    text-decoration:none;
    font-weight:bold;
    font-size:1.1em;
}

.nav-link:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: #fff;
    color: #4e4e4e;
    border-radius: 30px;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Style des messages d'erreur */

.erreur {
    color: red;
    font-weight: bold;
}

/* Style des conteneurs de recettes */

.recettes-liste {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.recette-container {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius:8px;
    padding: 20px;
    margin:16px 0;
    background: #fff;
    width:500px;
    height: auto;
}

.recette-container h3 {
    font-size: 1.6em;
    margin-top: 0;
    text-align: center;
    color: #333;
}

/* Affichage ingrédients à gauche, photo à droite */
.ingredients-photo-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
}

.ingredients-list {
    flex: 2;
}

.photo-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}
.photo-right img {
    width: 180px;
    height: auto;
    border-radius: 8px;
}

/* boutons pour ajouter ou retirer des favoris */

.favori-form {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-ajouter, .btn-retirer {
    padding: 10px 20px;
    margin-top: 10px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-ajouter {
    background: #28a745; /* vert */
}

.btn-ajouter:hover {
    background: #218838;
    transition: background 0.3s ease;    
}

.btn-retirer {
    background: #dc3545; /* rouge */
}

.btn-retirer:hover {
    background: #c82333;
    transition: background 0.3s ease;    
}

/* Style de la hiérarchie */

.hierarchie-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.hierarchie-container p {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.hierarchie-container p a {
    font-weight: normal;
}

.sous-categories {
    text-align: center;
}
.sous-categories a {
    display: inline-flex;
    margin: 5px 10px;
    padding: 8px 12px;
    background: #650eac;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.sous-categories a:hover {
    background: #520b8a;
    transition: background 0.3s ease;    
}

/* Style des champs de formulaire */

input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="tel"] {
    padding: 5px;
    margin: 5px 0;
}

/* Style du formulaire de recherche */

.recherche-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.recherche-categories {
    display: flex;
    width: 100%;
}

.recherche-inclure , .recherche-exclure {
    flex: 1;
    margin: 0 5px;
    text-align: left;
}

.recherche-inclure label,
.recherche-exclure label {
    display: block;
}


/* Style de l'autocomplétion */

.autocomplete-list {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    width: 250px;
}

.input-autocomplete-wrapper {
    position: relative;
    display: inline-block;
}

.suggestion-item {
    padding: 5px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #eee;
}

.aliment-tag {
    margin: 2px;
    padding: 3px 8px;
    background: #e0e0e0;
    border-radius: 12px;
    display: inline-block;
    cursor: pointer;
}

/* Style du formulaire de connexion */

.connexion-form {
    display: flex;
    flex-direction: column;
    max-width: 200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

legend {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}


/* Style du formulaire d'inscription */

.inscription-form, .profil-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}


.form-content {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.form-col {
    flex: 1 1 0;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}

/* Style des labels */

label {
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Style des boutons de soumission */

input[type="submit"] {
    padding: 10px 20px;
    width: 100%;
    margin-top: 10px;
    background: #650eac;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background: #520b8a;
    transition: background 0.3s ease;    
}