:root { --vert: #2e7d4f; --vert-c: #e6f2ea; --fond: #f5f7f2; --carte: #fff; --texte: #1f2a22; --doux: #66736a; --bord: #dfe5dc; --alerte: #c0532d; --ok: #2e7d4f; --info: #fff6e0; }
@media (prefers-color-scheme: dark) { :root { --vert: #5cbf86; --vert-c: #1c3326; --fond: #121614; --carte: #1b211d; --texte: #e8eee9; --doux: #9aa89e; --bord: #2c352f; --alerte: #f08a63; --ok: #6fd39a; --info: #2e2818; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--vert); color: #fff; }
header h1 { margin: 0; font-size: 20px; } header .doux { color: #e3f1e8; }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px; }
nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--carte); border-top: 1px solid var(--bord); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; border: 0; background: none; color: var(--doux); padding: 7px 2px 8px; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
nav button span { font-size: 21px; } nav button.actif { color: var(--vert); font-weight: 600; }
h2 { margin: 0 0 8px; font-size: 20px; } h3 { margin: 0 0 8px; font-size: 16px; }
.carte { display: block; width: 100%; background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; text-align: left; color: inherit; font: inherit; }
.jour.auj { border-color: var(--vert); box-shadow: 0 0 0 1px var(--vert); }
.pastille { display: inline-block; font-size: 11px; background: var(--vert-c); color: var(--vert); border-radius: 10px; padding: 1px 7px; vertical-align: middle; font-weight: 600; }
.doux { color: var(--doux); } .petit { font-size: 13px; } .centre { text-align: center; } .ok { color: var(--ok); } .alerte { color: var(--alerte); }
.erreur { color: var(--alerte); background: color-mix(in srgb, var(--alerte) 10%, transparent); border-radius: 8px; padding: 8px 10px; }
.info { background: var(--info); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.vide { text-align: center; color: var(--doux); padding: 24px 8px; }
.btn { border: 1px solid var(--bord); background: var(--carte); color: var(--texte); border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; }
.btn.p { background: var(--vert); border-color: var(--vert); color: #fff; font-weight: 600; }
.btn.petit { min-height: 34px; padding: 5px 10px; font-size: 14px; }
.btn.rond { width: 38px; min-height: 38px; padding: 0; border-radius: 50%; font-size: 20px; }
.lien { border: 0; background: none; color: var(--vert); font: inherit; cursor: pointer; padding: 6px 4px; text-decoration: underline; }
.titre { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: inherit; text-align: left; cursor: pointer; }
.barre { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; text-align: center; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .actions .btn { flex: 1; }
.btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.repas { padding: 6px 0; border-top: 1px dashed var(--bord); } .repas:first-of-type { border-top: 0; }
.menu.mange { opacity: .65; } .mini-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--texte); background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 9px 10px; width: 100%; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--vert); vertical-align: middle; }
input.court { width: 76px; text-align: right; padding: 7px 8px; }
label { display: block; margin: 8px 0; } label input:not([type=checkbox]), label select, label textarea { margin-top: 4px; }
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ligne > input, .ligne > select { flex: 1; min-width: 140px; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ajout { display: flex; gap: 8px; align-items: center; } .ajout #art { flex: 1; }
.article, .prov, .pl { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--bord); }
.article:first-of-type, .prov:first-of-type, .pl:first-of-type { border-top: 0; }
.article label { flex: 1; display: flex; gap: 10px; align-items: center; margin: 0; cursor: pointer; }
.article small { display: block; color: var(--doux); font-size: 12px; }
.article.fait span:first-of-type { text-decoration: line-through; color: var(--doux); }
.article .q, .pl > span { display: flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--doux); font-size: 14px; }
.prov .titre { flex: 1; } .prov.basse .titre { color: var(--alerte); }
.pm { display: flex; align-items: center; gap: 6px; } .pm .u { min-width: 18px; color: var(--doux); font-size: 13px; }
.pl label { flex: 1; margin: 0; }
.filtres { margin-bottom: 10px; } .puces { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.puce { border: 1px solid var(--bord); background: var(--carte); color: var(--texte); border-radius: 18px; padding: 5px 11px; font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.puce.on { background: var(--vert); color: #fff; border-color: var(--vert); }
.recette { display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.liste-rec { max-height: 45vh; overflow: auto; margin: 8px 0; }
.choix { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--bord); background: none; color: inherit; font: inherit; padding: 9px 4px; cursor: pointer; }
.ing { padding-left: 20px; margin: 4px 0 12px; } ol { padding-left: 22px; } ol li { margin-bottom: 6px; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.modal > div { background: var(--carte); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal { align-items: center; } .modal > div { border-radius: 18px; } }
.modal[hidden], .toast[hidden] { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; max-width: 92vw; font-size: 15px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.sablier { width: 36px; height: 36px; border: 4px solid var(--vert-c); border-top-color: var(--vert); border-radius: 50%; animation: t 1s linear infinite; margin: 16px auto; } @keyframes t { to { transform: rotate(360deg); } }
.login { max-width: 420px; margin: 0 auto; padding: 60px 16px; text-align: center; } .login .logo { font-size: 56px; } .gbtn { display: flex; justify-content: center; min-height: 44px; }
.photo .ligne { margin-top: 8px; }
