:root{--green:#4a6b2a;--green2:#5b7a2f;--bg:#f4f6f3;--ink:#17231b;--muted:#68756c;--line:#e0e7df;--danger:#a93434;--shadow:0 8px 24px #1833230c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.topbar{height:96px;background:linear-gradient(90deg,#17301aa6 0%,#17301a40 35%,#17301a00 70%),url(images/fields.jpg) center 47%/cover no-repeat,var(--green);text-shadow:0 1px 6px #0008;color:white;display:flex;align-items:center;gap:15px;padding:0 22px;position:sticky;top:0;z-index:5;box-shadow:0 2px 8px #0001}.brand{font-size:21px;font-weight:800;display:flex;align-items:center;gap:9px}.brand-text{display:flex;flex-direction:column;line-height:1.1}.brand-by{font-size:12px;font-weight:500;font-style:italic;opacity:.9;margin-top:2px;align-self:flex-start}.brand-by::after{content:"";display:block;width:calc(100% + 10px);height:7px;margin-top:1px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M2 6C28 2.6 66 1.6 118 3.2' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/100% 100%;filter:drop-shadow(0 1px 2px #0007)}.brandmark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#efe4bf;color:var(--green);font-weight:900;font-style:italic}.iconbtn{border:0;background:transparent;color:inherit;border-radius:8px;padding:8px;font-size:20px}.farm-pill{margin-left:auto;border:1px solid #ffffff80;color:white;background:#17301a66;backdrop-filter:blur(4px);padding:9px 13px;border-radius:9px;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layout{display:flex;min-height:calc(100vh - 96px)}.sidebar{width:245px;background:white;border-right:1px solid var(--line);padding:22px 13px;display:flex;flex-direction:column;gap:7px;flex-shrink:0}.side-label{font-size:10px;font-weight:800;letter-spacing:1.2px;color:#879187;padding:0 12px 10px}.nav{display:flex;align-items:center;gap:13px;width:100%;text-align:left;border:0;background:transparent;color:#47564b;padding:12px;border-radius:9px;font-weight:600}.nav.active,.nav:hover{background:#f1eed9;color:var(--green)}.side-note{margin-top:auto;border-top:1px solid var(--line);padding:17px 10px 4px;color:var(--muted);font-size:13px}.side-note small{display:block;margin-top:4px}.main{width:100%;max-width:1500px;margin:0 auto;padding:30px clamp(16px,3vw,42px) 60px}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:24px}.eyebrow{color:var(--green2);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:1.1px}.page-head h1{font-size:clamp(25px,3vw,34px);letter-spacing:-1px;margin:4px 0 5px}.sub{color:var(--muted);margin:0}.btn{border:1px solid transparent;border-radius:9px;padding:10px 14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary{background:var(--green2);color:white}.primary:hover{background:var(--green)}.secondary{background:white;border-color:var(--line);color:var(--ink)}.danger{background:white;color:var(--danger);border-color:#eccaca}.small{font-size:13px;padding:7px 10px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.stat,.panel,.item-card{background:white;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.stat{padding:19px}.stat-label{color:var(--muted);font-size:13px}.stat-num{font-size:29px;font-weight:800;letter-spacing:-1px;margin:6px 0 2px}.stat-foot{font-size:12px;color:var(--muted)}.panel{padding:20px;margin-bottom:18px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.panel h2{font-size:17px;margin:0}.list{display:grid;gap:10px}.item-card{display:flex;align-items:center;gap:14px;padding:15px;box-shadow:none}.item-icon{width:52px;height:52px;display:grid;place-items:center;background:#edf4ec;border-radius:12px;font-size:24px;flex-shrink:0}.item-main{min-width:0;flex:1}.item-title{font-weight:800;font-size:16px}.item-meta{font-size:13px;color:var(--muted);margin-top:3px}.item-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tag{display:inline-flex;padding:4px 8px;border-radius:999px;background:#edf4ec;color:#5b7a2f;font-size:11px;font-weight:800}.empty{text-align:center;padding:38px 18px;color:var(--muted)}.empty strong{display:block;color:var(--ink);font-size:17px;margin-bottom:5px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field{display:grid;gap:6px;margin:12px 0}.field label{font-size:13px;font-weight:700;color:#35463a}.field input,.field select,.field textarea{width:100%;border:1px solid #d5ded4;border-radius:9px;padding:11px 12px;background:white;color:var(--ink);outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--green2);box-shadow:0 0 0 3px #5b7a2f22}.field small,.muted{color:var(--muted)}.detail-top{display:flex;gap:18px;align-items:center;margin-bottom:20px}.farm-photo{width:88px;height:88px;border-radius:15px;object-fit:cover;background:#edf4ec;border:1px solid var(--line);display:grid;place-items:center;font-size:30px;overflow:hidden;flex-shrink:0}.farm-photo img{width:100%;height:100%;object-fit:cover}.meter{height:9px;border-radius:99px;background:#e7ece6;overflow:hidden;margin:10px 0}.meter span{display:block;height:100%;background:var(--green2)}.danger-zone{border:1px solid #f0d7d7;background:#fffafa;border-radius:12px;padding:16px;margin-top:20px}.danger-zone h3{margin:0 0 5px;color:var(--danger);font-size:15px}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.modal-head h2{margin:0;font-size:21px}.modal-head .iconbtn{color:var(--ink)}dialog{width:min(560px,calc(100% - 24px));border:0;border-radius:16px;padding:22px;box-shadow:0 24px 80px #0003;max-height:90vh;overflow:auto}dialog::backdrop{background:#0b1a11a8;backdrop-filter:blur(2px)}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);background:#4a6b2a;color:white;padding:12px 18px;border-radius:10px;opacity:0;pointer-events:none;transition:.2s;z-index:10;box-shadow:var(--shadow)}.toast.show{opacity:1;transform:translate(-50%,0)}.hint{background:#f0f5ee;border-radius:10px;padding:12px 14px;color:#405445;font-size:13px}.backlink{background:transparent;border:0;color:var(--green2);padding:0;font-weight:700;margin-bottom:12px}.notice{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:12px;margin:10px 0;background:white}.notice-icon{font-size:22px}.notice p{margin:3px 0;color:var(--muted);font-size:13px}.switchrow{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}.switchrow:last-child{border-bottom:0}.switchrow input{width:20px;height:20px;accent-color:var(--green2)}@media(max-width:900px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:220px}.grid2{grid-template-columns:1fr}}@media(max-width:650px){.topbar{height:76px;padding:0 12px;gap:8px}.brand{font-size:19px}.brand-by{font-size:11px}.farm-pill{font-size:12px;padding:8px 9px}.layout{display:block}.sidebar{display:none;position:fixed;z-index:4;top:76px;bottom:0;left:0;width:min(290px,85vw);box-shadow:12px 0 30px #0002}.sidebar.open{display:flex}.main{padding:23px 14px 40px}.page-head{flex-direction:column}.page-head>.btn{width:100%}.cards{gap:9px}.stat{padding:14px}.stat-num{font-size:24px}.item-card{align-items:flex-start;flex-wrap:wrap;padding:12px}.item-actions{width:100%;justify-content:flex-start}.item-actions .btn{flex:1}.detail-top{align-items:flex-start}.farm-photo{width:68px;height:68px}.panel{padding:15px}.modal-actions .btn{flex:1}}

.head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.linkbtn{background:transparent;border:0;color:var(--green2);padding:0;font-weight:700;text-decoration:underline;text-underline-offset:3px}.btn:disabled{opacity:.6;cursor:wait}.wide{width:100%;margin-top:8px}
.side-note{margin-top:auto;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;padding:17px 10px 4px;color:var(--ink);font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis}.side-note small{display:block;margin-top:3px;color:var(--muted);font-weight:500}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;background:#a5afa7;vertical-align:1px}.dot.synced{background:#2f9b58}.dot.syncing{background:#d79a1e}.dot.offline,.dot.error,.dot.expired{background:var(--danger)}
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--danger);color:white;font-size:11px;font-weight:800;display:inline-grid;place-items:center}.nav-badge[hidden]{display:none}
.tag.warning{background:#fff3dc;color:#8a5a00}.tag.danger{background:#fbe5e5;color:var(--danger)}.tag.ok{background:#e1f3e6;color:#1f7a42}.tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
.notice{align-items:center}.notice-main{flex:1;min-width:0}.notice.warning{border-left:4px solid #e0a526}.notice.danger{border-left:4px solid var(--danger)}.notice.info{border-left:4px solid #4f7fc4}.notice.unread{background:#f5faf4;border-color:#cfe2cc}.small-empty{padding:18px}
.stat-alert{border-color:#f0d5a8;background:#fffaf0}.stat-text{font-size:22px}.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 14px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:6px}.status-grid p{margin:6px 0}
.meter.low span{background:#d79a1e}
.tabs{display:flex;gap:6px;overflow-x:auto;margin:4px 0 16px;padding-bottom:2px}.tab{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:white;border-radius:99px;padding:9px 15px;font-weight:700;color:#47564b;white-space:nowrap}.tab .nav-ico{width:18px;height:18px}.tab.active{background:var(--green2);border-color:var(--green2);color:white}
.mini-table{display:grid}.mini-row{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}.mini-row:last-child{border-bottom:0}.mini-row span:first-child{color:var(--muted);min-width:86px}.mini-row span:nth-child(2){flex:1}.mini-row .pos{color:#1f7a42}.mini-row .neg{color:var(--danger)}
.reading-row{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:12px;align-items:end;border-bottom:1px solid var(--line)}.reading-name{font-weight:700;padding:12px 0 22px}
.auth-panel{max-width:460px}.auth-links{display:flex;gap:18px;flex-wrap:wrap;margin:16px 0 4px}.hint.warn{background:#fff6e5;color:#6b4a00;margin-bottom:16px}.hint{margin-top:16px}.steps{padding-left:20px;line-height:1.9}
.switch{appearance:none;-webkit-appearance:none;width:44px!important;height:26px!important;border-radius:99px;background:#cfd8ce;position:relative;cursor:pointer;transition:.2s;flex-shrink:0}.switch::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:.2s}.switch:checked{background:var(--green2)}.switch:checked::after{left:21px}
@media(max-width:900px){.grid4,.status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cards.three{grid-template-columns:1fr}}
@media(max-width:650px){.grid3{grid-template-columns:1fr}.reading-row{grid-template-columns:repeat(3,1fr);gap:8px}.reading-name{grid-column:1/-1;padding:12px 0 0}.head-actions{width:100%}.head-actions .btn{flex:1}.status-grid{grid-template-columns:1fr}.mini-row{flex-wrap:wrap}}
.item-icon.has-photo{overflow:hidden;padding:0}.item-icon img{width:100%;height:100%;object-fit:cover;display:block}.item-icon.eq-photo{width:88px;height:88px;font-size:34px}
.photo-picker{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.photo-buttons{display:flex;flex-direction:column;gap:7px;flex:1;min-width:180px}.photo-buttons .btn{width:100%;cursor:pointer}
.btn[hidden]{display:none}
.counter-row{border:1px solid var(--line);border-radius:12px;padding:4px 12px 12px;margin-bottom:10px}.counter-row .field{margin:8px 0}
.checklist{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}.checklist label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:9px;padding:9px 11px;font-weight:600;color:var(--ink);cursor:pointer}.checklist input{width:18px;height:18px;accent-color:var(--green2)}
.nav-ico{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.join-code{display:inline-block;font:800 26px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:3px;background:#f1eed9;color:var(--green);padding:12px 18px;border-radius:12px;border:1px dashed #c9bd8a;margin:6px 0 12px;user-select:all}.code-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.code-row .join-code{margin:0}.item-actions.left{justify-content:flex-start}.members-title{font-size:14px;margin:20px 0 10px;color:#35463a}.choice{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 4px}.choice label{display:flex;align-items:center;gap:9px;border:1px solid #d5ded4;border-radius:10px;padding:11px 12px;font-size:13px;font-weight:700;color:#35463a;cursor:pointer}.choice label:has(input:checked){border-color:var(--green2);background:#f5faf4;box-shadow:0 0 0 3px #5b7a2f22}.choice input{accent-color:var(--green2);margin:0}@media(max-width:650px){.choice{grid-template-columns:1fr}.join-code{font-size:22px}}
.fuel-group{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-top:12px}.fuel-group-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid var(--line)}.fuel-group-total{text-align:right}.fuel-group .mini-table{margin-top:2px}
.iconbtn{display:inline-grid;place-items:center}.iconbtn .nav-ico{width:24px;height:24px}
.item-icon,.farm-photo,.notice-icon{color:var(--green2)}.item-icon .nav-ico{width:26px;height:26px}.item-icon.eq-photo .nav-ico,.farm-photo .nav-ico{width:36px;height:36px}
.notice-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#edf4ec;flex-shrink:0}.notice-icon .nav-ico{width:22px;height:22px}.notice.warning .notice-icon{color:#8a5a00;background:#fff3dc}.notice.danger .notice-icon{color:var(--danger);background:#fbe5e5}.notice.info .notice-icon{color:#4f7fc4;background:#e8eff9}
.btn .nav-ico{width:16px;height:16px;vertical-align:-3px}.ico-title{display:inline-flex;align-items:center;gap:8px}.ico-title .nav-ico{color:var(--green2)}
.empty .nav-ico{width:20px;height:20px;vertical-align:-4px;color:#1f7a42}.reading-name .nav-ico{width:18px;height:18px;vertical-align:-3px;color:var(--green2)}
@media(min-width:651px){.sidebar{position:relative}}.sidebar{isolation:isolate;overflow:hidden;background:#f7f8f4}.sidebar::before,.sidebar::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none}.sidebar::before{inset:-12px;background:url(images/fields.jpg) 30% center/cover no-repeat;filter:blur(3px) saturate(.9)}.sidebar::after{background:linear-gradient(180deg,#ffffffc7 0%,#fbfaf3d9 55%,#ffffffeb 100%)}.nav:not(.active):hover{background:#f1eed9e6}

/* ---------- Triterra'Gest : compléments dans la même charte ---------- */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px}.data-table{width:100%;border-collapse:collapse;font-size:14px;background:white}.data-table th{text-align:left;font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:#879187;background:#f7f8f4;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}.data-table td{padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#f5faf4}.data-table .num{text-align:right;white-space:nowrap}
.field textarea{min-height:84px;resize:vertical}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}.toolbar .field{margin:0;flex:1;min-width:200px}
.loading{display:grid;place-items:center;padding:60px 18px;color:var(--muted)}.spinner{width:28px;height:28px;border-radius:50%;border:3px solid #dfe7de;border-top-color:var(--green2);animation:spin .8s linear infinite;margin-bottom:10px}@keyframes spin{to{transform:rotate(360deg)}}
.item-meta a{color:var(--green2);font-weight:600;text-decoration:none}.item-meta a:hover{text-decoration:underline}
@media(max-width:650px){.data-table{font-size:13px}.data-table th,.data-table td{padding:9px 8px}.toolbar .btn{flex:1}}
.photo-pick{display:flex;align-items:center;gap:14px}.photo-btns{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.photo-btns small{width:100%}.photo-btns label.btn{cursor:pointer;font-size:13px;color:var(--ink)}.farm-photo.big{width:120px;height:120px}@media(max-width:650px){.farm-photo.big{width:88px;height:88px}}
