:root { --v: #1f9d55; --vf: #157a41; --bg: #f3f7f2; --c: #fff; --t: #1c2a22; --g: #6b7a70; --l: #dfe7e1; --r: #d64545; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--t); font: 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: 86px; }
header { position: sticky; top: 0; z-index: 5; background: var(--v); color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
header h1 { font-size: 19px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header a, header button { color: #fff; background: rgba(255,255,255,.2); border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
main { max-width: 860px; margin: 0 auto; padding: 12px 12px 20px; }
h2 { font-size: 16px; margin: 22px 4px 10px; display: flex; align-items: center; gap: 6px; }
h2 small { color: var(--g); font-weight: 500; }
.h2a { margin-inline-start: auto; display: flex; gap: 6px; }
.aide, .vide { color: var(--g); font-size: 14px; margin: 8px 4px; }
.vide { text-align: center; padding: 18px 0; }

.bar { display: flex; gap: 8px; margin: 8px 0; }
input[type=text], input[type=search] { flex: 1; min-width: 0; width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--l); border-radius: 12px; background: var(--c); color: var(--t); }
input:focus { outline: 2px solid var(--v); outline-offset: 1px; }
#qui { flex: 0 0 34%; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.grid { align-items: start; }
.cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cell .tile { width: 100%; }
input.tnote { flex: none; padding: 7px 8px; font-size: 13px; border-radius: 10px; border-color: var(--v); background: #fff; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 9px; background: var(--c); border: 2px solid transparent; border-radius: 16px; font: inherit; color: inherit; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.07); transition: transform .08s; min-height: 118px; }
.tile:active { transform: scale(.95); }
.tile.sel { border-color: var(--v); background: #eaf7ef; }
.pic { width: 64px; height: 64px; border-radius: 14px; background: #f1f5f1; display: grid; place-items: center; overflow: hidden; flex: none; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emo { font-size: 38px; line-height: 1; }
.nm { font-size: 13.5px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.chk { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--v); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 7px; }
.tile.shop { min-height: 132px; }
.tile.shop .pic { width: 76px; height: 76px; }
.tile.shop .emo { font-size: 46px; }
.nt { font-size: 12px; color: var(--vf); text-align: center; overflow-wrap: anywhere; }
.dm { font-size: 11px; color: var(--g); }

.rows { background: var(--c); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--l); }
.row:last-child { border-bottom: 0; }
.row .pic { width: 44px; height: 44px; border-radius: 10px; }
.row .emo { font-size: 26px; }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rt b { font-size: 15px; overflow-wrap: anywhere; }
.rt i { font-size: 12.5px; color: var(--vf); font-style: normal; }
.rt em { font-size: 11.5px; color: var(--g); font-style: normal; }
.q { min-width: 22px; text-align: center; font-weight: 700; }
.hr { font-size: 12px; color: var(--g); }
.mini { flex: none; width: 38px; height: 38px; border: 1px solid var(--l); background: var(--c); border-radius: 10px; font: inherit; font-size: 17px; cursor: pointer; color: var(--t); padding: 0; }
.mini.del { color: var(--r); }
.picbtn { border: 0; background: none; padding: 0; cursor: pointer; }
.add { display: block; width: 100%; border: 0; background: #f6faf6; color: var(--vf); font: inherit; font-weight: 600; padding: 12px; cursor: pointer; text-align: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--v); color: #fff; font: inherit; font-weight: 700; padding: 12px 16px; border-radius: 12px; cursor: pointer; text-decoration: none; flex: 1; }
.btn.wide { display: flex; width: 100%; margin: 14px 0; }
.btn.wa { background: #25d366; }
.btn.ghost { background: var(--c); color: var(--vf); border: 1px solid var(--l); }
.btn.danger { background: var(--r); }
form.bar .btn { flex: none; }

.fini { text-align: center; padding: 60px 10px; color: var(--g); }
.fini .big { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; background: var(--v); color: #fff; font-size: 54px; display: grid; place-items: center; }
.fini b { font-size: 22px; color: var(--t); }

#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: var(--c); border-top: 1px solid var(--l); padding-bottom: env(safe-area-inset-bottom); }
#tabs button { flex: 1; position: relative; border: 0; background: none; font: inherit; font-size: 12px; color: var(--g); padding: 8px 2px 9px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#tabs button span { font-size: 22px; line-height: 1; }
#tabs button.on { color: var(--vf); font-weight: 700; }
#tabs button i { position: absolute; top: 4px; left: calc(50% + 8px); background: var(--r); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }

#toast { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 7; max-width: 520px; margin: 0 auto; background: #1c2a22; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
#toast.on { opacity: 1; transform: none; pointer-events: auto; }
#toast span { flex: 1; }
#toast button { border: 0; background: #fff; color: #1c2a22; font: inherit; font-weight: 700; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
[hidden] { display: none !important; }

/* ── Rayons, autre langue ── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 10px; margin: 0 -2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chip { flex: none; border: 1px solid var(--l); background: var(--c); color: var(--t); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--v); border-color: var(--v); color: #fff; }
.alt { font-size: 11.5px; color: var(--g); text-align: center; overflow-wrap: anywhere; }
header select { color: #fff; background: rgba(255,255,255,.2); border: 0; border-radius: 999px; padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 600; max-width: 120px; cursor: pointer; }
header select option { color: #1c2a22; background: #fff; }
[dir=rtl] #tabs button i { left: auto; right: calc(50% + 8px); }
[dir=rtl] input.code { direction: ltr; }
[dir=rtl] #lienurl, [dir=rtl] input[type=email], [dir=rtl] input[type=tel] { direction: ltr; text-align: right; }

/* ── Pages d'accès et formulaires ── */
body.acces { padding-bottom: 30px; }
body.acces main { max-width: 440px; }
.intro { text-align: center; color: var(--g); margin: 18px 8px; }
.card { background: var(--c); border-radius: 18px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin: 12px 0; }
.card h2 { margin: 0 0 10px; font-size: 19px; }
.card label { display: block; font-size: 13.5px; font-weight: 600; color: var(--g); margin: 12px 0 0; }
.card label input { display: block; margin-top: 5px; font-weight: 400; }
input[type=email], input[type=tel], input[type=password] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--l); border-radius: 12px; background: var(--c); color: var(--t); }
input[readonly] { background: #f4f6f4; color: var(--g); }
input.code { font-size: 26px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.onglets { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.onglets a { flex: 1; text-align: center; padding: 10px 6px; border-radius: 9px; text-decoration: none; color: var(--g); font-weight: 600; font-size: 14.5px; }
.onglets a.on { background: var(--c); color: var(--vf); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.alerte { border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0; background: #fdecec; color: #a12727; }
.alerte.ok { background: #e7f6ec; color: var(--vf); }
.btn.google { display: flex; width: 100%; background: var(--c); color: var(--t); border: 1px solid var(--l); gap: 10px; }
.btn.google span { font-weight: 800; color: #4285f4; font-size: 18px; }
.ou { text-align: center; color: var(--g); font-size: 13px; margin: 12px 0 0; position: relative; }
.ou::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--l); }
.ou span { position: relative; background: var(--c); padding: 0 10px; }
.petit { font-size: 12.5px; color: var(--g); }
.centre { text-align: center; }
.acces a { color: var(--vf); }
.acces header a { color: #fff; }
.lien { border: 0; background: none; font: inherit; color: var(--vf); text-decoration: underline; cursor: pointer; padding: 6px; }
.lien.rouge { color: var(--r); font-size: 13.5px; }

/* -- Rayons en liste : toucher pour ouvrir -- */
.accs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.acc { background: var(--c); border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; scroll-margin-top: 66px; }
.acch { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--t); padding: 13px 14px; cursor: pointer; text-align: start; }
.acc.on .acch { background: #eaf7ef; color: var(--vf); }
.ae { font-size: 22px; width: 28px; text-align: center; flex: none; }
.an { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ab { flex: none; background: var(--v); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; }
.av { flex: none; color: var(--g); transition: transform .15s; }
.acc.on .av { transform: rotate(180deg); }
.accb { padding: 10px; background: var(--bg); border-top: 1px solid var(--l); }
.accb .bar { margin-bottom: 0; }

/* -- Quantite sous le produit choisi -- */
.tq { display: flex; align-items: center; justify-content: space-between; gap: 4px; background: #fff; border: 1px solid var(--v); border-radius: 10px; padding: 3px; }
.tq button { width: 34px; height: 30px; border: 0; background: #eaf7ef; color: var(--vf); border-radius: 8px; font: inherit; font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; }
.tq b { font-size: 15px; min-width: 20px; text-align: center; }

/* -- Photo en grand (loupe dans le coin de la photo) -- */
.pic { position: relative; }
.zm { position: absolute; inset-inline-end: 0; bottom: 0; width: 28px; height: 28px; border-start-start-radius: 12px; background: rgba(255,255,255,.92); font-size: 14px; line-height: 28px; text-align: center; cursor: zoom-in; }
#zoom { position: fixed; inset: 0; z-index: 20; background: rgba(10,20,14,.9); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; cursor: zoom-out; }
#zoom.on { display: flex; }
#zoom img { max-width: 100%; max-height: 76vh; border-radius: 16px; background: #fff; object-fit: contain; }
#zoom b { color: #fff; font-size: 20px; text-align: center; }

/* -- Toute la photo ouvre l'agrandissement ; la loupe n'est plus qu'un repere -- */
.pic[data-act="zoom"] { cursor: zoom-in; }
.zm { pointer-events: none; width: 22px; height: 22px; line-height: 22px; font-size: 11px; }
.tile .nm { padding: 4px 2px; }

/* -- Page de confidentialite -- */
.legal h3 { font-size: 15px; margin: 16px 0 6px; }
.legal p, .legal li { font-size: 14px; }
.legal ul { padding-inline-start: 20px; margin: 6px 0; }
body.acces main:has(.legal) { max-width: 720px; }
