/* xdt-food/style.css — styles spécifiques (shared.css chargé en premier, voir docs/design-system.md) */

.app-container {
    max-width: 1300px; margin: 0 auto; padding: 2rem 1.5rem;
    display: flex; flex-direction: column; gap: 2rem;
}

.hidden { display: none !important; }

/* Banner "mode aperçu" — même pattern que xdt-sanrio/xdt-trophy */
.banner {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; background: rgba(79,172,254,.15);
    border: 1px solid var(--secondary); border-radius: 16px;
    box-shadow: var(--shadow-sm); animation: fadeIn .4s ease-out;
    flex-wrap: wrap; gap: 1rem;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.banner-content { display: flex; align-items: center; gap: 1rem; }
.banner-icon { font-size: 1.3rem; color: var(--primary); }
.banner-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.note { color: var(--text-muted); font-size: .85rem; line-height: 1.5; margin: .6rem 0 0; }
.empty-msg { color: var(--text-muted); font-size: .85rem; font-style: italic; padding: 1.5rem; text-align: center; }

/* ── Carte animaux ─────────────────────────────────────────────────── */
.food-pets-card {
    background: var(--bg-card); backdrop-filter: blur(12px);
    border: 1px solid var(--border-color); border-radius: 20px;
    padding: 1.5rem; box-shadow: var(--shadow-md);
}
.food-pets-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem;
}
.food-pets-head h2 {
    font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700;
    color: var(--primary); display: flex; align-items: center; gap: .5rem; margin: 0;
}
.food-pet-add { display: flex; gap: .5rem; flex-wrap: wrap; }
.food-pet-add input, .food-pet-add select {
    padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--border-color);
    background: rgba(0,0,0,.25); color: var(--text-main); font-family: var(--font-body); font-size: .85rem;
}
.food-pet-add input { min-width: 160px; }

.food-pets-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.food-pet-chip {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--border-color);
    background: rgba(255,255,255,.05); color: var(--text-main); cursor: pointer;
    font-family: var(--font-body); font-size: .88rem; transition: all .15s;
}
.food-pet-chip:hover { border-color: var(--secondary); }
.food-pet-chip.active { background: rgba(0,242,254,.15); border-color: var(--primary); color: var(--primary); }
.food-pet-emoji { font-size: 1.05rem; }
.food-pet-fav-badge {
    font-family: var(--font-heading); font-size: .72rem; font-weight: 700;
    color: #ffd54f; background: rgba(255,213,79,.15); border-radius: 6px; padding: .1rem .4rem;
}
.food-pet-remove {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.1rem; height: 1.1rem; border-radius: 50%; color: var(--text-muted);
    font-size: .7rem; margin-left: .1rem;
}
.food-pet-remove:hover { color: var(--danger); background: rgba(255,23,68,.15); }

/* ── Carte catalogue ───────────────────────────────────────────────── */
.food-catalog-card {
    background: var(--bg-card); backdrop-filter: blur(12px);
    border: 1px solid var(--border-color); border-radius: 20px;
    padding: 1.5rem; box-shadow: var(--shadow-md);
}
.food-catalog-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: .6rem;
}

.detail-toggle { display: flex; gap: .4rem; background: rgba(0,0,0,.2); border-radius: 12px; padding: .3rem; }
.toggle-btn {
    padding: .5rem 1rem; border-radius: 9px; border: none; background: transparent;
    color: var(--text-muted); font-family: var(--font-body); font-size: .85rem; cursor: pointer; transition: all .15s;
}
.toggle-btn:hover { color: var(--text-main); }
.toggle-btn.active { background: var(--primary); color: var(--bg-darker); font-weight: 600; }

.food-search {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .9rem; border-radius: 10px; border: 1px solid var(--border-color);
    background: rgba(0,0,0,.25); color: var(--text-muted); min-width: 220px;
}
.food-search i { flex-shrink: 0; }
.food-search input {
    border: none; background: transparent; color: var(--text-main); font-family: var(--font-body);
    font-size: .85rem; width: 100%; outline: none;
}

.food-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .8rem; margin-top: 1rem;
}
.food-item {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    padding: .8rem .5rem; border-radius: 14px; border: 1px solid var(--border-color);
    background: rgba(255,255,255,.04); cursor: pointer; transition: all .15s; text-align: center;
}
.food-item:hover { border-color: var(--secondary); transform: translateY(-2px); }
.food-item-visual { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.food-item-visual img { width: 100%; height: 100%; object-fit: contain; }
.food-item-emoji { font-size: 1.8rem; }
.food-item-name {
    font-size: .75rem; color: var(--text-muted); line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.food-item-status-badge { font-size: .68rem; font-weight: 700; font-family: var(--font-heading); min-height: 1em; }

.food-item.food-status-neutral { border-color: var(--secondary); background: rgba(79,172,254,.08); }
.food-item.food-status-neutral .food-item-status-badge { color: var(--secondary); }
.food-item.food-status-favorite { border-color: #ffd54f; background: rgba(255,213,79,.12); }
.food-item.food-status-favorite .food-item-status-badge { color: #ffd54f; }

/* ── Modale de partage ─────────────────────────────────────────────── */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4,13,26,.8); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; animation: fadeIn .25s ease-out;
}
.modal-content {
    background: var(--bg-card); border: 1px solid var(--border-color-active);
    border-radius: 24px; padding: 2rem; max-width: 500px; width: 90%;
    box-shadow: var(--shadow-lg); animation: scaleUp .3s cubic-bezier(.175,.885,.32,1.275) forwards;
}
@keyframes scaleUp { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: color .2s; }
.modal-close:hover { color: var(--danger); }
.modal-body p { color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.5; }
.share-url-box { display: flex; gap: .8rem; flex-wrap: wrap; }
.share-url-box input {
    flex-grow: 1; padding: .75rem 1rem; border-radius: 12px;
    border: 1px solid var(--border-color); background: rgba(0,0,0,.3);
    color: var(--primary); font-family: var(--font-body); font-size: .9rem; min-width: 150px;
}
.share-url-box input:focus { outline: none; }

@media (max-width: 640px) {
    .food-catalog-head { flex-direction: column; align-items: stretch; }
    .food-search { min-width: 0; }
}
