:root {
  --bg: #faf8f2;
  --card: #ffffff;
  --text: #1b2e23;
  --muted: #5c6f63;
  --border: #e5e0d3;
  --green: #1f4d36;
  --green-soft: #e6f2ec;
  --honey: #eab308;
  --honey-bg: #fef9c3;
  --honey-text: #854d0e;
  --pollen: #ea580c;
  --shadow: 0 6px 20px rgba(27, 46, 35, 0.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 3rem;
}
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
}
.brand span { color: #b45309; }
.nav { display: flex; gap: 0.5rem; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.nav a:hover { background: var(--green-soft); color: var(--green); }
.nav a.active { background: var(--green); color: #ffffff; }
.container { max-width: 1720px; width: 98%; margin: 1.5rem auto; padding: 0 0.5rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filters {
  display: grid;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 960px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr; } }
input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus { outline: none; border-color: var(--green); }
.btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th {
  text-align: left;
  padding: 0.7rem 0.65rem;
  background: #f3f0e6;
  color: var(--text);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:hover td { background: #f8faf7; }
.latin { display: block; font-style: italic; color: var(--muted); font-size: 0.82rem; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.b-2 { background: #dcfce7; color: #166534; }
.b-3 { background: #fef3c7; color: #92400e; }
.b-4 { background: #f3e8ff; color: #6b21a8; }
.b-5 { background: #ffe4e6; color: #9f1239; }
.b-neutral { background: #f1f5f9; color: #475569; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pill {
  font-size: 0.74rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #f4f2eb;
  color: #44544a;
  white-space: nowrap;
}
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dot-n { width: 9px; height: 9px; border-radius: 50%; background: var(--honey); }
.dot-p { width: 9px; height: 9px; border-radius: 50%; background: var(--pollen); }
.dot-off { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; }
.mois-grid { display: inline-flex; gap: 3px; }
.m-pill {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efede6;
  color: #9ca3af;
}
.m-pill.on {
  background: var(--honey);
  color: #1b2e23;
}
.stat-cell { text-align: center; font-weight: 600; }
.stat-zero { color: #cbd5e1; }
.stat-high { background: var(--honey-bg); color: var(--honey-text); border-radius: 6px; }

#tablePlantes th, #tablePlantes td { padding: 0.55rem 0.45rem; font-size: 0.85rem; }

.container { max-width: 1560px !important; width: 96% !important; }
#tablePlantes .m-pill { width: 20px; height: 20px; font-size: 0.7rem; }

#tablePlantes th, #tablePlantes td { padding: 0.45rem 0.35rem; font-size: 0.82rem; white-space: nowrap; }
#tablePlantes td:first-child { white-space: normal; min-width: 135px; }
#tablePlantes .m-pill { width: 19px; height: 19px; font-size: 0.68rem; }
.filtre-actif { background-color: #ecfdf5 !important; border-color: #1e4d3b !important; color: #14532d !important; font-weight: 600 !important; box-shadow: 0 0 0 2px rgba(30, 77, 59, 0.15) !important; }

.filters {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)) !important;
  gap: 0.6rem !important;
  align-items: center !important;
}
.filters input,
.filters select,
.filters button.btn {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
@media (max-width: 600px) {
  .filters {
    grid-template-columns: 1fr !important;
  }
}

.filters > :first-child {
  grid-column: auto !important;
}

.filters > * {
  grid-column: auto !important;
}
