:root {
  --vert: #3f6b3a; --vert-clair: #e8efe3; --terre: #8a5a2b; --fond: #f7f4ee;
  --texte: #2b2a26; --gris: #6f6a60; --rouge: #a23b2a; --bord: #e2ddd2;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.45rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; color: var(--terre); }
a { color: var(--vert); }
.top { background: var(--vert); color: #fff; padding: .7rem 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.top .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.top nav { display: flex; gap: .9rem; align-items: center; font-size: .92rem; }
.top nav a { color: #fff; }
.top .who { opacity: .85; }
.card { display: block; background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.narrow { max-width: 440px; margin: 2rem auto; }
a.card { text-decoration: none; color: inherit; }
a.card.dist { display: flex; flex-direction: column; gap: .25rem; }
a.card.dist:hover { border-color: var(--vert); }
.past { opacity: .75; }
.go { color: var(--vert); font-weight: 600; }
.muted { color: var(--gris); }
.small { font-size: .85rem; }
label { display: block; margin-bottom: .8rem; font-weight: 600; font-size: .92rem; }
input, textarea { display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem; font: inherit; font-weight: 400; border: 1px solid var(--bord); border-radius: 8px; background: #fff; }
input[type=file] { padding: .4rem; }
button, .btn { display: inline-block; background: var(--vert); color: #fff; border: 0; border-radius: 8px; padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.big { width: 100%; padding: .85rem; font-size: 1.05rem; }
button.secondary, .btn.secondary { background: var(--vert-clair); color: var(--vert); }
button.link { background: none; color: var(--vert); padding: .3rem 0; font-weight: 400; text-decoration: underline; }
.danger, button.danger { color: var(--rouge); }
.flash { padding: .7rem 1rem; border-radius: 8px; background: var(--vert-clair); }
.flash.err { background: #f6e1dc; color: var(--rouge); }
.status { display: inline-block; font-size: .82rem; padding: .15rem .55rem; border-radius: 99px; background: #eee; width: fit-content; }
.s-panier { background: #f3ead8; color: var(--terre); }
.s-validee { background: #fbe3c6; color: #8a4b00; }
.s-confirmee { background: var(--vert-clair); color: var(--vert); }
.products { display: flex; flex-direction: column; }
.prod { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--bord); }
.prod:first-child { border-top: 0; }
.prod.soldout { opacity: .5; }
.prod .pinfo { flex: 1; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; cursor: zoom-in; background: var(--fond); }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8); z-index: 10; align-items: center; justify-content: center; padding: 1rem; cursor: zoom-out; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.imgrow { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--bord); }
.imgrow.sub { padding-left: 1.5rem; }
.imgrow .ph { width: 56px; height: 56px; border-radius: 8px; background: var(--fond); border: 1px dashed var(--bord); flex-shrink: 0; }
.imgrow .thumb { width: 56px; height: 56px; cursor: default; }
.imgrow .lbl { flex: 1; }
.imgrow input[type=file] { display: none; }
.imgrow label.btn { margin: 0; font-size: .85rem; padding: .4rem .7rem; }
.price { font-weight: 600; }
.qty { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.qty input { width: 3.4rem; text-align: center; margin: 0; padding: .45rem .2rem; }
.qty button { width: 2.4rem; height: 2.4rem; padding: 0; font-size: 1.3rem; line-height: 1; background: var(--vert-clair); color: var(--vert); }
.qty.ro { font-weight: 600; }
.total { font-size: 1.15rem; text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.actions .big { flex: 1; width: auto; }
form.inline { display: inline; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--bord); }
.tbl tr.cat td { font-weight: 700; color: var(--terre); padding-top: .9rem; }
.tbl input.num { width: 4.5rem; margin: 0; padding: .3rem; }
.order { border-top: 1px solid var(--bord); padding: .8rem 0; }
.order ul { margin: .4rem 0; padding-left: 1.2rem; }
.order p { margin: .3rem 0; }
.comment { background: var(--fond); padding: .5rem .7rem; border-radius: 8px; font-style: italic; }
details summary { cursor: pointer; }
details[open] summary { margin-bottom: .8rem; }
@media (max-width: 520px) { .tbl { font-size: .82rem; } main { padding: .7rem; } }
.tbl img.mini { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: .3rem; }
section[hidden] { display: none; }
.cartbar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: .8rem; background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: .6rem .8rem; margin: 0 0 1rem; box-shadow: 0 -2px 12px rgba(0,0,0,.08); }
.cartbar .btn { padding: .5rem .8rem; font-size: .92rem; }
.tabbar { position: sticky; top: 0; z-index: 5; background: var(--fond); padding-top: .5rem; margin-bottom: -1px; }
.tabs { display: flex; align-items: flex-end; gap: 3px; overflow-x: auto; padding: 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex-shrink: 0; white-space: nowrap; font-weight: 600; font-size: .95rem; color: var(--gris); background: #ebe6dc; border: 1px solid var(--bord); border-bottom: none; border-radius: 10px 10px 0 0; padding: .5rem .9rem .45rem; margin-top: 5px; }
.tabs button.on { background: #fff; color: var(--vert); border-color: #d6cfc0; border-top: 3px solid var(--vert); margin-top: 0; padding-bottom: .8rem; position: relative; top: 1px; }
.tabbar .fade { position: absolute; right: 0; top: 0; bottom: 1px; width: 36px; pointer-events: none; background: linear-gradient(to right, rgba(247,244,238,0), var(--fond)); opacity: 0; transition: opacity .2s; }
.tabbar.more .fade { opacity: 1; }
.card.folder { border-color: #d6cfc0; border-radius: 0 12px 12px 12px; }
.js-tabs .card.folder h2 { display: none; }
.tabbar.inner { position: static; background: transparent; padding-top: .3rem; }
.tabbar.inner .fade { background: linear-gradient(to right, rgba(255,255,255,0), #fff); }
.tabbar.inner .tabs button.on { border-color: var(--bord); border-top-color: var(--vert); }
.card.folder.inner { border-color: var(--bord); box-shadow: none; margin-bottom: .8rem; }
.js-tabs .tabpanel[hidden] { display: none; }
h2.sub { margin-top: 1.4rem; }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; margin-right: .35em; vertical-align: .05em; background: #bbb; }
.d-validee { background: #e08a1e; }
.d-confirmee { background: var(--vert); }
.d-panier { background: #c8bfae; }
.order { border-top: 0; padding: 0; }
.cb { font-size: .7rem; font-weight: 700; background: var(--vert-clair); color: var(--vert); border-radius: 4px; padding: 0 .3em; margin-left: .3em; }
p.paid { margin: .4rem 0; }
ul.recap { margin: .2rem 0 .8rem; padding-left: 1.2rem; }
h2.comp-title { margin: 1.4rem 0 .4rem; }
.comp { font-size: .72rem; font-weight: 600; background: #f3ead8; color: var(--terre); border-radius: 4px; padding: 0 .35em; margin-left: .3em; }
.tabs .d-validee { animation: clignote 1.2s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(224,138,30,.6); }
@keyframes clignote { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(224,138,30,.6); } 50% { opacity: .35; box-shadow: 0 0 0 4px rgba(224,138,30,0); } }
@media (prefers-reduced-motion: reduce) { .tabs .d-validee { animation: none; } }
.top .help { color: #fff; font-size: .92rem; margin-left: auto; }
.top nav { margin-left: 0; }
.guide h2 { margin: 1.6rem 0 .5rem; scroll-margin-top: 1rem; }
.guide p, .guide li { line-height: 1.55; }
.guide ul { padding-left: 1.2rem; }
.toc { display: flex; flex-direction: column; gap: .3rem; background: var(--fond); border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0; }
