/* ============================= */
/* Général */
/* ============================= */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ============================= */
/* Titre principal */
/* ============================= */
h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 20px;
}

/* ============================= */
/* Image Recette */
/* ============================= */
img {
    display: block;
    margin: 0 auto 20px;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================= */
/* 🔹 INGREDIENTS EN CARDS */
/* ============================= */
.ingredients-grid {
    display: flex;
    flex-wrap: wrap;      /* Retour à la ligne si trop large */
    gap: 20px;            /* Espace entre les cartes */
    justify-content: center;  /* ✅ Centrer horizontalement */
    margin-top: 20px;
}


.ingredient-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    width: 120px;             /* Taille fixe en carré */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ingredient-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.ingredient-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 50%;
    background: #f5f5f5;
    padding: 5px;
}

.ingredient-card h4 {
    font-size: 15px;
    font-weight: bold;
    margin: 8px 0 4px;
    text-transform: uppercase;
}

.ingredient-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Ingrédients en bulles */
.ingredient-bubble {
    display: inline-block;
    padding: 10px 15px;
    margin: 6px;
    border-radius: 20px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.ingredient-bubble:hover {
    background-color: #eaf4ff;
    transform: scale(1.05);
    cursor: pointer;
}


/* ============================= */
/* Liste classique */
/* ============================= */
ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

ul li {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

ul li:hover {
    background-color: #eaf4ff;
    transform: translateX(5px);
}

/* ============================= */
/* Tableau des étapes */
/* ============================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #ddd;
}

table th {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* ============================= */
/* Formulaire d'avis */
/* ============================= */
.review-form {
    margin-top: 30px;
}

.review-form textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    resize: none;
    margin-bottom: 15px;
    font-size: 1rem;
}

.review-form button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.review-form button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* ============================= */
/* Étoiles de notation */
/* ============================= */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: start;
    gap: 10px;
}

.rating-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
}

/* ============================= */
/* Responsive */
/* ============================= */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    @media (max-width: 768px) {
        .ingredients-grid {
            justify-content: center;  /* ✅ Centré sur mobile */
        }
    }


    .ingredient-card {
        width: 120px;
        padding: 10px;
    }

    .ingredient-card img {
        width: 55px;
        height: 55px;
    }

    table th,
    table td {
        padding: 10px;
    }
}
