/* ── Variables ── */
:root {
  --green: #198754;
  --green-light: #d1e7dd;
}

body {
  background: #f0f2f5;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Navbar ── */
.navbar-brand { font-size: 1.3rem; letter-spacing: .4px; }

/* ── Navigation pills ── */
#mainNav .nav-link {
  color: #495057;
  border-radius: .5rem;
  transition: background .15s, color .15s;
}
#mainNav .nav-link:hover  { background: #e9ecef; }
#mainNav .nav-link.active { background: var(--green); color: #fff; }

/* ── Cards ── */
.card          { border: none; border-radius: .75rem; }
.card-header   { border-radius: .75rem .75rem 0 0 !important; }

/* ── Autocomplete ── */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  max-height: 220px;
  overflow-y: auto;
}
.suggestions-list .suggestion-item {
  padding: .45rem .75rem;
  cursor: pointer;
  font-size: .9rem;
}
.suggestions-list .suggestion-item:hover { background: var(--green-light); }
.suggestions-list .suggestion-item.create { color: var(--green); font-style: italic; }

/* ── Upload zone ── */
.upload-area {
  border: 2px dashed #ced4da;
  border-radius: .5rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--green);
  background: var(--green-light);
}

/* ── Badges type ── */
.badge-type { font-size: .72rem; padding: .2em .55em; border-radius: .3em; font-weight: 600; }
.badge-eco     { background: #ffc107; color: #000; }
.badge-normal  { background: #6c757d; color: #fff; }
.badge-bio     { background: #28a745; color: #fff; }
.badge-premium { background: #6f42c1; color: #fff; }

/* ── Dernières saisies ── */
.entry-item {
  padding: .65rem 1.1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background .1s;
}
.entry-item:last-child  { border-bottom: none; }
.entry-item:hover       { background: #f8f9fa; }

/* ── Comparaison ── */
.price-per-kg { color: var(--green); font-weight: 700; font-size: 1.05rem; }

/* ── OCR item cards ── */
.ocr-item-card {
  border: 1.5px solid #dee2e6;
  border-radius: .5rem;
  padding: .7rem;
  margin-bottom: .5rem;
  transition: border-color .15s, background .15s;
}
.ocr-item-card.selected {
  border-color: var(--green);
  background: var(--green-light);
}

/* ── Chart container ── */
#chartContainer { max-height: 480px; }

/* ── Mobile ── */
@media (max-width: 576px) {
  #mainNav .nav-link { font-size: .8rem; padding: .4rem .4rem; }
  .container-fluid   { padding: .5rem; }
}
