/* GoBro web — design system v2 (identité propriétaire : noir × ambre, flèche de navigation) */
:root{
  --brand: oklch(52% .12 72);        /* ambre profond lisible : textes, états actifs, bordures */
  --brand-deep: oklch(43% .105 70);
  --brand-hd: oklch(20% .012 80);    /* noir chaud : en-têtes, sidebar, héros */
  --brand-soft: oklch(95.5% .045 92);
  --brand-tint: oklch(89% .085 88);
  --on-brand: oklch(98% .005 95);
  --cta: oklch(78% .155 78);         /* LE jaune GoBro : boutons et remplissages */
  --cta-ink: oklch(23% .04 80);
  --terra: oklch(78% .155 78);
  --terra-ink: oklch(23% .04 80);
  --terra-deep: oklch(50% .115 72);
  --terra-soft: oklch(95.5% .05 90);
  --amber: oklch(78% .15 80);
  --amber-ink: oklch(50% .115 74);
  --ok: oklch(50% .1 150);
  --ok-soft: oklch(94% .04 150);
  --danger: oklch(54% .17 27);
  --danger-soft: oklch(94% .04 27);
  --ink: oklch(21% .006 90);
  --ink-2: oklch(42% .008 90);
  --ink-3: oklch(50% .008 90);
  --bg: oklch(97.6% .003 90);
  --card: oklch(99.6% .001 90);
  --raise: oklch(94.6% .004 90);
  --line: oklch(91.5% .004 90);
  --line-2: oklch(87% .005 90);
  --shadow: 0 2px 10px oklch(20% .01 80 / .07);
  --shadow-lg: 0 14px 34px oklch(18% .01 80 / .15);
  --dirflip: 1;
}
[dir="rtl"]{ --dirflip: -1; }

*{ margin:0; padding:0; box-sizing:border-box; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
input,select,textarea{ font:inherit; color:inherit; }
img,svg{ display:block; }
a{ color:inherit; text-decoration:none; }
html{ scroll-behavior:smooth; }
body{
  font-family:'Alexandria','Segoe UI',system-ui,sans-serif;
  background:var(--bg); color:var(--ink);
  font-size:14.5px; line-height:1.6; min-height:100vh;
}
.i{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.i.sm{ width:17px; height:17px; } .i.xs{ width:14px; height:14px; stroke-width:2; }
.i.fill{ fill:currentColor; stroke:none; }
.flip{ transform:scaleX(var(--dirflip)); }
.muted{ color:var(--ink-3); font-size:12.5px; font-weight:400; }
.mono{ font-weight:800; color:var(--ink); opacity:.7; letter-spacing:-.5px; line-height:1; }

.wrap{ max-width:1080px; margin-inline:auto; padding-inline:20px; }

/* ---------- topbar ---------- */
.topbar{
  position:sticky; top:0; z-index:60; background:var(--card);
  border-bottom:1px solid var(--line);
}
.topbar .in{ display:flex; align-items:center; gap:18px; height:62px; }
.logo{ display:flex; align-items:center; gap:6px; font-weight:800; font-size:21px; letter-spacing:-.3px; color:var(--ink); }
.logo i{ font-style:normal; color:var(--terra); }
.brandmark{
  display:inline-flex; align-items:center; gap:1px; line-height:1;
  font-weight:800; letter-spacing:-.5px; font-family:'Alexandria',sans-serif;
}
.brandmark svg{ flex:none; margin:0 1px; display:inline-block; }
.topnav{ display:flex; gap:4px; margin-inline-start:6px; }
.topnav a{ padding:8px 13px; border-radius:12px; font-size:13px; font-weight:600; color:var(--ink-2); transition:.15s; }
.topnav a:hover{ background:var(--raise); color:var(--ink); }
.topnav a.on{ color:var(--brand); background:var(--brand-soft); }
.topbar .grow{ flex:1; }
.tbtn{
  display:flex; align-items:center; gap:7px; padding:9px 14px; border-radius:12px;
  font-size:12.5px; font-weight:700; transition:.15s; white-space:nowrap;
}
.tbtn.soft{ background:var(--brand-soft); color:var(--brand); }
.tbtn.soft:hover{ background:var(--brand-tint); }
.tbtn.pri{ background:var(--cta); color:var(--cta-ink); }
.tbtn.pri:hover{ background:oklch(72% .15 76); }
.tbtn.ghost{ border:1.5px solid var(--line-2); color:var(--ink-2); }
.tbtn .n{ background:var(--terra); color:var(--terra-ink); border-radius:7px; min-width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; padding:0 5px; }
@media (max-width:760px){ .topnav{ display:none; } }

/* ---------- hero ---------- */
.hero{
  background:linear-gradient(165deg, oklch(24% .015 80), oklch(14% .01 80));
  color:var(--on-brand); padding:44px 0 70px;
}
.hero h1{ font-size:clamp(23px, 3.6vw, 34px); font-weight:800; letter-spacing:-.5px; line-height:1.35; max-width:560px; }
.hero p{ opacity:.85; margin-top:8px; font-size:14px; max-width:520px; }
.hero .searchrow{
  margin-top:22px; display:flex; gap:10px; max-width:600px;
  background:var(--card); border-radius:16px; padding:7px;
  box-shadow:0 14px 34px oklch(12% .01 80 / .5);
}
.hero .searchrow .in{ flex:1; display:flex; align-items:center; gap:10px; padding-inline-start:12px; color:var(--ink-3); }
.hero .searchrow input{ border:0; outline:none; background:none; flex:1; font-size:14px; color:var(--ink); min-width:0; }
.hero .searchrow button{ background:var(--cta); color:var(--cta-ink); border-radius:11px; padding:11px 20px; font-weight:800; font-size:13.5px; }
.hero .addr{ display:inline-flex; align-items:center; gap:7px; margin-top:14px; font-size:12px; opacity:.85; }

/* ---------- sections ---------- */
.sec{ padding:26px 0 8px; }
.sec-t{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; }
.sec-t h2{ font-size:19px; font-weight:800; letter-spacing:-.3px; }
.sec-t a, .sec-t button{ font-size:12.5px; color:var(--brand); font-weight:700; }
.cats{ display:flex; gap:9px; flex-wrap:wrap; margin-top:-34px; position:relative; z-index:5; }
.cat{
  display:flex; align-items:center; gap:8px; padding:11px 17px; border-radius:14px;
  background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow);
  font-size:13px; font-weight:700; color:var(--ink-2); transition:.15s;
}
.cat .i{ width:20px; height:20px; color:var(--brand); }
.cat:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lg); color:var(--ink); }
.cat.on{ background:var(--brand); border-color:var(--brand); color:var(--on-brand); }
.cat.on .i{ color:var(--on-brand); }

.grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:16px; }
.scard{
  background:var(--card); border:1px solid var(--line); border-radius:20px;
  box-shadow:var(--shadow); cursor:pointer; transition:.18s; overflow:visible;
}
.scard:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.scard .cover{ height:110px; border-radius:19px 19px 0 0; display:flex; align-items:center; justify-content:center; position:relative; }
.scard .cover .tag{ position:absolute; top:10px; inset-inline-start:11px; }
.scard .cover .eta{
  position:absolute; bottom:-12px; inset-inline-end:12px; background:var(--card);
  border:1px solid var(--line); border-radius:999px; font-size:10.5px; font-weight:700;
  padding:4px 10px; display:flex; gap:5px; align-items:center; box-shadow:var(--shadow); color:var(--ink-2);
}
.scard .body{ padding:15px 15px 13px; }
.scard h3{ font-size:14.5px; font-weight:700; }
.scard .meta{ display:flex; gap:10px; align-items:center; margin-top:5px; font-size:11.5px; color:var(--ink-3); flex-wrap:wrap; }
.scard.closed{ opacity:.55; filter:grayscale(.4); }

.tag{ display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:700; padding:3.5px 9px; border-radius:999px; }
.tag.terra{ background:var(--terra-soft); color:var(--terra-deep); }
.tag.ok{ background:var(--ok-soft); color:var(--ok); }
.tag.brand{ background:var(--brand-soft); color:var(--brand); }
.tag.solid{ background:var(--terra); color:var(--terra-ink); }
.tag.dim{ background:var(--raise); color:var(--ink-3); }
.tag.danger{ background:var(--danger-soft); color:var(--danger); }
.star{ display:inline-flex; align-items:center; gap:3px; color:var(--amber-ink); font-weight:700; }
.star .i{ width:13px; height:13px; fill:var(--amber); stroke:none; }

/* ---------- store page ---------- */
.split{ display:grid; grid-template-columns:1fr 340px; gap:22px; align-items:start; }
@media (max-width:900px){ .split{ grid-template-columns:1fr; } }
.storehead{
  display:flex; gap:18px; align-items:center; padding:22px; border-radius:22px;
  background:var(--card); border:1px solid var(--line); box-shadow:var(--shadow); margin-top:20px;
}
.storehead .cover{ width:96px; height:96px; border-radius:18px; display:flex; align-items:center; justify-content:center; flex:none; }
.storehead h1{ font-size:22px; font-weight:800; letter-spacing:-.4px; }
.storehead .meta{ display:flex; gap:14px; align-items:center; margin-top:7px; font-size:12.5px; color:var(--ink-2); flex-wrap:wrap; }
.mi{
  display:flex; justify-content:space-between; gap:14px; align-items:center;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:14px 15px; margin-bottom:10px; cursor:pointer; transition:.15s;
}
.mi:hover{ box-shadow:var(--shadow-lg); }
.mi h4{ font-size:14px; font-weight:600; }
.mi .desc{ font-size:11.5px; color:var(--ink-3); margin-top:2px; }
.mi .price{ font-size:13px; font-weight:700; color:var(--brand); margin-top:5px; }
.addq{
  width:36px; height:36px; border-radius:12px; flex:none; background:var(--brand-soft); color:var(--brand);
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; transition:.15s;
}
.addq.n{ background:var(--brand); color:var(--on-brand); }
.mi:hover .addq{ background:var(--brand); color:var(--on-brand); }
.h3s{ font-size:15px; font-weight:800; margin:20px 2px 10px; }

/* cart panel */
.panel{ background:var(--card); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow); padding:18px; position:sticky; top:82px; }
.panel h3{ font-size:15.5px; font-weight:800; margin-bottom:6px; }
.rrow{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 0; font-size:13px; }
.rrow + .rrow{ border-top:1px solid var(--line); }
.rrow .lab{ color:var(--ink-2); font-weight:500; }
.rrow.total{ font-weight:800; font-size:15px; }
.rrow .free{ color:var(--ok); font-weight:700; }
.strike{ text-decoration:line-through; color:var(--ink-3); font-weight:400; font-size:11.5px; margin-inline-end:6px; }
.qty{ display:flex; align-items:center; gap:8px; }
.qty button{ width:28px; height:28px; border-radius:9px; background:var(--raise); display:flex; align-items:center; justify-content:center; transition:.15s; }
.qty button:hover{ background:var(--brand-soft); color:var(--brand); }
.btn{
  display:flex; align-items:center; justify-content:center; gap:9px; width:100%;
  border-radius:14px; padding:13px 16px; font-size:14px; font-weight:700; transition:.15s; text-align:center;
}
.btn:active{ transform:scale(.98); }
.btn.pri{ background:var(--cta); color:var(--cta-ink); }
.btn.pri:hover{ background:oklch(72% .15 76); }
.btn.soft{ background:var(--brand-soft); color:var(--brand); }
.btn.ghost{ border:1.5px solid var(--line-2); color:var(--ink-2); font-weight:600; }
.btn[disabled]{ opacity:.45; pointer-events:none; }
.cartfab{
  position:fixed; bottom:18px; inset-inline:16px; z-index:70; display:none;
  background:var(--ink); color:var(--bg); border-radius:16px; padding:15px 18px;
  justify-content:space-between; align-items:center; font-weight:700; font-size:13.5px; box-shadow:var(--shadow-lg);
}
@media (max-width:900px){ .cartfab.show{ display:flex; } .panel{ position:static; } }

/* ---------- forms / auth ---------- */
.field{ margin-bottom:13px; }
.field label{ display:block; font-size:11.5px; font-weight:700; color:var(--ink-2); margin-bottom:6px; }
.inwrap{ display:flex; align-items:center; gap:10px; border:1.5px solid var(--line); border-radius:14px; padding:11px 14px; background:var(--card); }
.inwrap:focus-within{ border-color:var(--brand); }
.inwrap input, .inwrap select{ border:0; outline:none; background:none; flex:1; font-size:13.5px; min-width:0; }
.inwrap .i{ color:var(--ink-3); }
.prefix{ display:flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--ink-2); padding-inline-end:11px; border-inline-end:1.5px solid var(--line); }
.narrow{ max-width:440px; margin-inline:auto; padding:44px 20px 60px; }
.narrow h1{ font-size:22px; font-weight:800; letter-spacing:-.3px; }
.narrow .lead{ color:var(--ink-2); font-size:13px; margin-top:6px; }
.otp{ display:flex; gap:11px; justify-content:center; margin:22px 0 8px; direction:ltr; }
.otp input{ width:58px; height:62px; border:1.5px solid var(--line); border-radius:15px; background:var(--card); text-align:center; font-size:23px; font-weight:800; outline:none; transition:.15s; }
.otp input:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.linkline{ text-align:center; font-size:12.5px; color:var(--ink-2); font-weight:500; padding-top:14px; }
.linkline button{ color:var(--brand); font-weight:700; }
.chips{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{ padding:8px 15px; border-radius:999px; border:1.5px solid var(--line); background:var(--card); font-size:12.5px; font-weight:600; color:var(--ink-2); transition:.15s; }
.chip.on{ border-color:var(--brand); background:var(--brand-soft); color:var(--brand); }
.payopt{ display:flex; gap:12px; align-items:center; padding:12px 14px; border:1.5px solid var(--line); border-radius:14px; margin-bottom:9px; cursor:pointer; font-size:13px; font-weight:600; background:var(--card); transition:.15s; }
.payopt.on{ border-color:var(--brand); background:var(--brand-soft); }
.radio{ width:18px; height:18px; border-radius:50%; border:2px solid var(--line-2); margin-inline-start:auto; flex:none; }
.payopt.on .radio{ border-width:5.5px; border-color:var(--brand); }

/* ---------- track / steps ---------- */
.steps{ padding:2px 0; }
.step{ display:flex; gap:13px; align-items:flex-start; padding:10px 0; position:relative; }
.step:not(:last-child)::after{ content:''; position:absolute; inset-inline-start:13px; top:38px; bottom:-8px; width:2px; background:var(--line); }
.step.done:not(:last-child)::after{ background:var(--ok); }
.step .bull{ width:27px; height:27px; border-radius:50%; flex:none; z-index:1; background:var(--raise); color:var(--ink-3); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.step.done .bull{ background:var(--ok); color:oklch(98% .01 145); }
.step.cur .bull{ background:var(--terra); color:var(--terra-ink); animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{ box-shadow:0 0 0 0 oklch(74% .14 78/.5);} 55%{ box-shadow:0 0 0 10px oklch(74% .14 78/0);} }
.step p{ font-size:13.5px; font-weight:600; }

/* ---------- misc ---------- */
.card{ background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); }
.toast{
  position:fixed; bottom:26px; left:50%; transform:translate(-50%, 16px); z-index:99;
  background:var(--ink); color:var(--bg); font-size:13px; font-weight:600;
  padding:13px 20px; border-radius:14px; opacity:0; transition:.28s; pointer-events:none; box-shadow:var(--shadow-lg); max-width:86vw; text-align:center;
}
.toast.show{ opacity:1; transform:translate(-50%, 0); }
.empty{ text-align:center; padding:60px 20px; color:var(--ink-3); }
.empty .i{ width:44px; height:44px; margin:0 auto 12px; opacity:.5; }
.empty b{ display:block; color:var(--ink-2); font-size:15px; margin-bottom:4px; }
.footer{ border-top:1px solid var(--line); margin-top:44px; padding:26px 0 34px; color:var(--ink-3); font-size:12.5px; }
.footer .in{ display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:center; }
.skel{ background:linear-gradient(90deg, var(--raise), var(--line), var(--raise)); background-size:200% 100%; animation:sk 1.2s infinite; border-radius:14px; }
@keyframes sk{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }

/* ---------- admin ---------- */
.alayout{ display:grid; grid-template-columns:222px 1fr; min-height:100vh; }
@media (max-width:820px){ .alayout{ grid-template-columns:64px 1fr; } .aside .lbl{ display:none; } }
.aside{ background:var(--brand-hd); color:oklch(94% .004 90); padding:18px 12px; display:flex; flex-direction:column; gap:4px; position:sticky; top:0; height:100vh; }
.aside .logo{ color:var(--on-brand); padding:6px 10px 18px; }
.aside button{ display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:12px; font-size:13px; font-weight:600; color:oklch(74% .012 88); transition:.15s; text-align:start; width:100%; }
.aside button:hover{ background:oklch(100% 0 0/.07); color:var(--on-brand); }
.aside button.on{ background:oklch(100% 0 0/.12); color:var(--on-brand); }
.aside .foot{ margin-top:auto; }
.amain{ padding:26px 28px 60px; max-width:1160px; }
.amain h1{ font-size:21px; font-weight:800; letter-spacing:-.3px; margin-bottom:4px; }
.kpis{ display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:12px; margin-top:18px; }
.kpi{ background:var(--card); border:1px solid var(--line); border-radius:16px; padding:15px 16px; }
.kpi .v{ font-size:22px; font-weight:800; letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
.kpi .v small{ font-size:12px; font-weight:600; color:var(--ink-2); }
.kpi .k{ font-size:11px; color:var(--ink-3); font-weight:600; margin-top:2px; }
table.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.tbl th{ text-align:start; font-size:11px; color:var(--ink-3); font-weight:700; padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.tbl td{ padding:11px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.tbl tr:last-child td{ border-bottom:0; }
.tbl tr:hover td{ background:var(--raise); }
.tblwrap{ background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:auto; margin-top:16px; }
select.st{ border:1.5px solid var(--line); border-radius:10px; padding:6px 9px; background:var(--card); font-size:12px; font-weight:600; outline:none; }
.toggle{ width:42px; height:24px; border-radius:999px; background:var(--line-2); position:relative; transition:.18s; flex:none; }
.toggle::after{ content:''; position:absolute; top:3px; inset-inline-start:3px; width:18px; height:18px; border-radius:50%; background:var(--card); box-shadow:0 1px 4px oklch(18% .01 80/.3); transition:.18s; }
.toggle.on{ background:var(--brand); }
.toggle.on::after{ inset-inline-start:21px; }
.bars{ display:flex; align-items:flex-end; gap:8px; height:120px; margin-top:14px; }
.barcol{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.bar{ width:100%; max-width:30px; background:var(--brand-tint); border-radius:6px 6px 3px 3px; }
.barcol.on .bar{ background:var(--amber); }
.barcol .d{ font-size:10px; color:var(--ink-3); font-weight:600; }
.barval{ font-size:10.5px; font-weight:700; height:15px; color:var(--amber-ink); }
.hbar{ display:flex; align-items:center; gap:10px; padding:7px 0; font-size:12.5px; font-weight:500; }
.hbar .nm2{ width:140px; flex:none; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hbar .tr{ flex:1; height:9px; border-radius:99px; background:var(--raise); overflow:hidden; }
.hbar .fl{ height:100%; border-radius:99px; background:var(--brand); }
.hbar b{ width:30px; text-align:end; font-variant-numeric:tabular-nums; }
.grid2{ display:grid; grid-template-columns:1.4fr 1fr; gap:16px; margin-top:16px; }
@media (max-width:900px){ .grid2{ grid-template-columns:1fr; } }

/* ---------- gbmap (OSM) ---------- */
.gbmap{
  position:relative; overflow:hidden; background:oklch(93.5% .012 100);
  border-radius:18px; border:1px solid var(--line);
  touch-action:none; user-select:none; cursor:grab; min-height:180px;
}
.gbmap:active{ cursor:grabbing; }
.gbmap .tiles, .gbmap svg, .gbmap .mks{ position:absolute; inset:0; }
.gbmap .tiles img{ position:absolute; width:256px; height:256px; pointer-events:none; }
.gbmap svg{ pointer-events:none; z-index:3; }
.gbmap .mks{ pointer-events:none; z-index:4; }
.gbmap .mk{ position:absolute; transform:translate(-50%,-100%); display:flex; flex-direction:column; align-items:center; }
.gbmap .mk .pin{
  width:34px; height:34px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:var(--card); border:1.5px solid var(--line-2); color:var(--brand);
  box-shadow:0 4px 12px oklch(16% .01 80/.3);
}
.gbmap .mk .pin.terra{ background:var(--terra); color:var(--terra-ink); border-color:var(--terra); }
.gbmap .mk .pin.ok{ color:var(--ok); }
.gbmap .mk .tipline{ width:2.5px; height:8px; background:var(--ink-3); border-radius:2px; }
.gbmap .mk.courier{ transition:left .9s linear, top .9s linear; z-index:6; }
.gbmap .mk .pin .i{ width:17px; height:17px; }
.gbmap .zoomctl{
  position:absolute; top:10px; inset-inline-end:10px; z-index:8;
  display:flex; flex-direction:column; gap:6px;
}
.gbmap .zoomctl button{
  width:32px; height:32px; border-radius:10px; background:var(--card);
  border:1px solid var(--line); font-weight:800; font-size:15px; color:var(--ink-2);
  box-shadow:var(--shadow);
}
.gbmap .attr{
  position:absolute; bottom:4px; inset-inline-start:8px; z-index:8;
  font-size:9.5px; color:oklch(40% .008 90); background:oklch(100% 0 0/.65);
  padding:1px 7px; border-radius:7px; direction:ltr;
}
.gbmap .centerpin{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-100%); z-index:9; pointer-events:none;
  display:flex; flex-direction:column; align-items:center;
}
body.night .gbmap .tiles, .nightmap .tiles{ filter:brightness(.82) contrast(1.06) saturate(.85); }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
  .gbmap .mk.courier{ transition:none; }
}
