/* ============================================================
   CookQuick - ingredient-search.css
   - Recherche par ingrédients (champ multi-tags)
   - Bloc "Vous aimerez aussi" (recettes similaires)
   À inclure dans le bundle ~/Content/css après site.css.
   ============================================================ */

/* ============================================================
   RECHERCHE PAR INGRÉDIENTS
   ============================================================ */
.ingredient-search {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 40px;
}

.ingredient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.ingredient-tags:empty {
    margin-bottom: 0;
}

.ingredient-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 6px 8px 6px 14px;
    font-size: 14px;
    font-weight: 500;
    animation: tag-in .15s ease-out;
}

@keyframes tag-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.ingredient-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: background .15s ease;
}
.ingredient-tag-remove:hover {
    background: rgba(0, 0, 0, 0.4);
}

.ingredient-entry {
    display: flex;
    gap: 10px;
}

.ingredient-textbox {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 16px; /* 16px : évite le zoom auto iOS */
    font-family: inherit;
}
.ingredient-textbox:focus {
    outline: none;
    border-color: var(--accent);
}

.ingredient-hint {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.ingredient-results-head {
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .ingredient-search { padding: 18px; }
    .ingredient-entry { flex-direction: column; }
    .ingredient-entry .btn-primary { width: 100%; }
}

/* ============================================================
   RECETTES SIMILAIRES ("Vous aimerez aussi")
   ============================================================ */
.similar-recipes {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.similar-recipes .section-title {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .similar-recipes {
        margin-top: 40px;
        padding-top: 36px;
    }
}
