/* Thème « Ferme Hagelstein · Œufs » — surcharges par-dessus style.css du portail */
:root {
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --egg: #fde68a;
}
[data-theme="light"] {
  --accent: #16a34a;
  --accent-dim: #15803d;
}

.oeufs-topbar .brand { display: inline-flex; align-items: center; gap: .45rem; }
.brand-egg { font-size: 1.15rem; }
.oeufs-topbar .topbar-right { display: flex; align-items: center; gap: .5rem; }
.oeufs-nav { margin: .5rem auto 0; max-width: 1200px; padding: 0 1rem; }
.login-logo { font-size: 3rem; text-align: center; margin-bottom: .25rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.dashboard-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .dashboard-grid, .dashboard-grid-3 { grid-template-columns: 1fr 1fr; } }
.dash-stat { text-decoration: none; color: inherit; }
.dash-alert { border-color: #ef4444 !important; }
.dash-alert .dash-number { color: #ef4444; }
.dash-warn { border-color: #f59e0b !important; }
.dash-warn .dash-number { color: #f59e0b; }

.num { text-align: right; white-space: nowrap; }
.table th.num { text-align: right; }
.table-wrap { overflow-x: auto; }
.table-compact th, .table-compact td { padding: .3rem .5rem; font-size: .85rem; }
.row-empty td { opacity: .45; }
.row-inactive td { opacity: .55; }
.card-inactive { opacity: .6; }
.card-soft { background: var(--surface); border-style: dashed; }
.narrow-lg { max-width: 720px; }

.taux { font-weight: 700; padding: .1em .5em; border-radius: 6px; }
.taux-ok { background: rgba(34, 197, 94, .18); color: #22c55e; }
.taux-mid { background: rgba(245, 158, 11, .18); color: #f59e0b; }
.taux-low { background: rgba(239, 68, 68, .18); color: #ef4444; }

.alert-warn { background: rgba(245, 158, 11, .15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, .35); }
.alert-warn a { color: inherit; font-weight: 600; }
.badge-err { background: rgba(239, 68, 68, .18); color: #ef4444; }
.btn.danger { background: rgba(239, 68, 68, .15); color: #ef4444; border: 1px solid rgba(239, 68, 68, .4); }
.btn.danger:hover { background: #ef4444; color: #fff; }

/* Barre de stock par âge */
.stock-bar { display: flex; gap: 3px; min-height: 52px; border-radius: 10px; overflow: hidden; margin: .5rem 0; }
.stock-seg { display: flex; align-items: center; justify-content: center; text-align: center; font-size: .75rem; font-weight: 600; color: #0f172a; min-width: 3.2rem; padding: .3rem .2rem; line-height: 1.2; }
.seg-1 { background: #86efac; } .seg-2 { background: #bef264; } .seg-3 { background: #fde047; } .seg-4 { background: #fb923c; } .seg-5 { background: #f87171; }

/* Navigation par jour */
.day-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.day-nav-pick input { padding: .35rem .5rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }

/* Ramassage */
.ram-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.ram-card { margin: 0; border-left: 4px solid var(--border); }
.ram-card.is-done { border-left-color: var(--accent); }
.ram-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.ram-head strong { font-size: 1.05rem; }
.ram-main { font-weight: 600; }
.ram-input { font-size: 1.6rem !important; font-weight: 700; text-align: center; padding: .5rem !important; }
.ram-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; margin-top: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }

/* Formulaires */
.form-inline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem .75rem; align-items: end; }
.form-inline-grid label { margin-bottom: 0; }
.form-inline-grid button { height: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-label { font-size: .9rem; margin-bottom: .35rem; color: var(--muted); }
.jours-check { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.jours-check .chk { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: .85rem; text-transform: capitalize; }
.jours-check .chk:has(input:checked) { border-color: var(--accent); background: rgba(74, 222, 128, .12); }

/* Tournée */
.tour-list { display: flex; flex-direction: column; gap: .5rem; }
.tour-item { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; background: var(--surface); }
.tour-item.is-done { border-color: var(--accent); opacity: .85; }
.tour-main { display: flex; align-items: center; gap: .75rem; }
.tour-num { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #0f172a; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tour-body { flex: 1; min-width: 0; }
.tour-client { font-weight: 700; font-size: 1.02rem; color: var(--text); text-decoration: none; }
.tour-qty { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tour-qty strong { font-size: 1.25rem; }
.tour-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; }
.tour-done-form { display: flex; gap: .35rem; align-items: center; }
.tour-done-form input { width: 5rem; padding: .35rem .4rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }

/* Graphique barres (CSS) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: .5rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.bar { background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .2s; }
.bar-col:hover .bar { background: var(--egg); }
.bar-lbl { font-size: .6rem; color: var(--muted); text-align: center; margin-top: .2rem; overflow: hidden; }
@media (max-width: 600px) { .bar-col:nth-child(odd) .bar-lbl { visibility: hidden; } }
