/* =========================================================
   GazFlow — design system
   ========================================================= */
:root {
  --bg: #f5f6f8; --surface: #fff; --surface-2: #fafafb; --text: #0f172a; --muted: #5b6474; --border: #e3e6eb;
  --primary: #f25c05; --primary-2: #ff9f1c; --primary-ink: #fff; --primary-soft: #fff1e6;
  --navy: #0b1b33; --navy-2: #12294b;
  --ok: #16a34a; --ok-soft: #e7f7ec; --warn: #b45309; --warn-soft: #fff5df;
  --danger: #dc2626; --danger-soft: #fdecec; --info: #1d4ed8; --info-soft: #e8efff;
  --grad: linear-gradient(135deg, #ff9f1c 0%, #f25c05 55%, #d9480f 100%);
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --surface: #121b2c; --surface-2: #0f1727; --text: #e8edf5; --muted: #9aa6b8; --border: #223047;
    --primary: #ff7a33; --primary-soft: #3a2214;
    --ok: #4ade80; --ok-soft: #12301f; --warn: #fbbf24; --warn-soft: #33270d;
    --danger: #f87171; --danger-soft: #3a1717; --info: #7aa2ff; --info-soft: #162447;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; } h2 { font-size: 1.3rem; font-weight: 800; } h3 { font-size: 1.05rem; font-weight: 700; }
.container { max-width: 1160px; margin: 0 auto; padding: 28px 16px 72px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: -.02em; }
.brand .logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--navy); }
.brand .logo svg { width: 24px; height: 24px; }
#nav { display: flex; gap: 2px; align-items: center; }
#nav a, #nav button { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; background: none;
  border: 0; cursor: pointer; font: inherit; font-weight: 600; transition: background .2s, color .2s; white-space: nowrap; }
#nav a.active, #nav a:hover, #nav button:hover { background: var(--primary-soft); color: var(--primary); }
#nav a.cta-nav { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(242, 92, 5, .3); }
#nav .who { font-size: .82rem; color: var(--muted); padding: 0 8px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 12px; width: 20px; height: 2px; border-radius: 2px; background: var(--text); content: ""; transition: transform .3s var(--ease), opacity .2s; }
.burger span { top: 21px; } .burger span::before { left: 0; top: -6px; } .burger span::after { left: 0; top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 980px) {
  .burger { display: block; }
  #nav { position: fixed; inset: 65px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .25s, visibility .3s;
    max-height: calc(100vh - 65px); overflow-y: auto; }
  .menu-open #nav { transform: none; opacity: 1; visibility: visible; }
  #nav a, #nav button { padding: 13px 14px; font-size: 1.02rem; text-align: left; }
  #nav .who { padding: 10px 14px 4px; border-top: 1px solid var(--border); margin-top: 6px; }
}

/* ---------- Composants ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.lift { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: .86rem; }
.right { text-align: right; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background .2s; }
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--primary-ink); box-shadow: 0 8px 20px rgba(242, 92, 5, .28); }
.btn.primary:hover { box-shadow: 0 12px 28px rgba(242, 92, 5, .38); }
.btn.danger { color: var(--danger); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn.lg { padding: 15px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn.sm { padding: 6px 11px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; font: inherit;
  background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.field { margin-bottom: 14px; }
form .row > .field { flex: 1 1 160px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.s-en_attente, .s-ouverte { background: var(--warn-soft); color: var(--warn); }
.s-confirmee, .s-assignee { background: var(--info-soft); color: var(--info); }
.s-en_livraison { background: var(--primary-soft); color: var(--primary); }
.s-en_livraison::before, .s-ouverte::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.s-livree, .p-paye, .s-acceptee { background: var(--ok-soft); color: var(--ok); }
.s-annulee, .p-rembourse { background: var(--danger-soft); color: var(--danger); }
.p-en_attente { background: var(--border); color: var(--muted); }

.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.offer:last-child { border-bottom: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.15rem; cursor: pointer; transition: background .2s; }
.qty button:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.qty span { min-width: 34px; text-align: center; font-weight: 800; }
.price { font-weight: 800; white-space: nowrap; }

.kpi { position: relative; overflow: hidden; }
.kpi .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.kpi .l { color: var(--muted); font-size: .86rem; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad); opacity: .08; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr.click { cursor: pointer; transition: background .2s; } tr.click:hover { background: var(--surface-2); }
@media (max-width: 680px) {
  /* Tableaux de commandes en cartes sur mobile */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--border); border-radius: 14px; padding: 6px 12px; margin-bottom: 10px; background: var(--surface); }
  table.cards td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
  table.cards td.hide-sm { display: none; }
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; border-left: 2px solid var(--border); margin-left: 7px; animation: rise .5s var(--ease) both; }
.timeline li:nth-child(2) { animation-delay: .08s; } .timeline li:nth-child(3) { animation-delay: .16s; } .timeline li:nth-child(4) { animation-delay: .24s; } .timeline li:nth-child(5) { animation-delay: .32s; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--surface); }
.timeline li:last-child { border-left-color: transparent; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 10px 14px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .art { width: 150px; display: block; margin: 0 auto 6px; }
.demo { font-size: .85rem; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; padding: 12px 14px; }
.demo code { cursor: pointer; color: var(--primary); font-weight: 600; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px) scale(.9); background: var(--navy); color: #fff;
  padding: 12px 20px; border-radius: 14px; font-weight: 700; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); max-width: calc(100% - 32px);
  z-index: 50; box-shadow: var(--shadow-lg); }
#toast.show { transform: translate(-50%, 0) scale(1); }
#toast.err { background: var(--danger); }

.cart-bar { position: sticky; bottom: 12px; margin-top: 16px; animation: rise .4s var(--ease) both; box-shadow: var(--shadow-lg); }
dialog { border: 0; border-radius: 20px; padding: 0; max-width: 580px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog[open] { animation: pop-in .35s cubic-bezier(.34, 1.56, .64, 1) both; }
dialog::backdrop { background: rgba(11, 27, 51, .55); backdrop-filter: blur(3px); }
dialog .card { border: 0; box-shadow: none; }

.plan { text-align: center; position: relative; }
.plan .price { font-size: 1.7rem; margin: 6px 0; }
.plan.featured { border: 2px solid var(--primary); }
.plan.featured::before { content: "Le plus choisi"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff;
  font-size: .72rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; }

/* ---------- Transitions de page ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .25; } }
#view.enter > * { animation: rise .55s var(--ease) both; }
#view.enter > *:nth-child(2) { animation-delay: .06s; } #view.enter > *:nth-child(3) { animation-delay: .12s; } #view.enter > *:nth-child(4) { animation-delay: .18s; }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; } .stagger > *:nth-child(3) { animation-delay: .1s; } .stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; } .stagger > *:nth-child(6) { animation-delay: .25s; } .stagger > *:nth-child(n+7) { animation-delay: .3s; }
.js-reveal .reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .reveal.d1 { transition-delay: .1s; } .js-reveal .reveal.d2 { transition-delay: .2s; } .js-reveal .reveal.d3 { transition-delay: .3s; }
.skeleton { display: grid; gap: 14px; }
.sk { height: 18px; border-radius: 9px; background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.sk.h { height: 34px; width: 40%; } .sk.b { height: 120px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* =========================================================
   Accueil (landing)
   ========================================================= */
#view.landing { max-width: none; padding: 0; }
.hero { position: relative; background: radial-gradient(1200px 600px at 85% 10%, #1d3d6b 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0a1426 100%);
  color: #fff; overflow: hidden; padding: 56px 0 96px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); font-size: .85rem; font-weight: 600; color: #e2e8f0; }
.eyebrow b { background: var(--grad); color: #fff; padding: 2px 10px; border-radius: 999px; font-size: .75rem; }
.hero h1 { font-size: clamp(2.2rem, 6.2vw, 4rem); line-height: 1.02; letter-spacing: -.035em; margin: 18px 0 16px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.08em; }
.rotator span { grid-area: 1 / 1; transition: transform .6s var(--ease), opacity .6s; transform: translateY(110%); opacity: 0; white-space: nowrap; padding-right: .06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rotator span.on { transform: none; opacity: 1; }
.rotator span.out { transform: translateY(-110%); opacity: 0; }
.hero .lead { color: #cbd5e1; font-size: clamp(1rem, 2.2vw, 1.2rem); max-width: 560px; margin: 0 0 26px; }
.hero .searchbox { background: #fff; padding: 8px; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.hero .searchbox input, .hero .searchbox select { border: 0; background: #f1f5f9; color: #0f172a; }
.hero .chips .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #e2e8f0; }
.hero .chips .chip.on, .hero .chips .chip:hover { background: #fff; color: var(--primary); border-color: #fff; }
.hero .geo-note { color: #94a3b8; }
.hero-art { position: relative; }
.hero-art .art-hero { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .35)); }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; width: 100%; display: block; }
.hero-wave path { fill: var(--bg); }
.hero.compact { padding: 32px 0 80px; }
.hero.compact h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
@media (max-width: 900px) {
  .hero { padding: 32px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .hero.compact .hero-art { display: none; }
}

.section { padding: 72px 0; }
.section.tight { padding: 40px 0; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.section-title { font-size: clamp(1.7rem, 4.2vw, 2.6rem); letter-spacing: -.03em; max-width: 720px; }
.section-head { text-align: center; margin: 0 auto 36px; }
.section-head .section-title, .section-head p { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); max-width: 620px; font-size: 1.05rem; }

.results-wrap { position: relative; z-index: 2; padding-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { text-align: center; padding: 26px 12px; }
.stat .n { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-weight: 600; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 24px; }
.step .art { width: 100%; height: auto; aspect-ratio: 220 / 160; border-radius: 14px; background: var(--surface-2); margin-bottom: 16px; }
.step .num { position: absolute; top: 14px; left: 14px; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(242, 92, 5, .35); }
@media (max-width: 860px) { .steps3 { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.story.flip .story-media { order: 2; }
.story-media { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 3.4; box-shadow: var(--shadow-lg); }
.story-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.08); transition: transform .1s linear; will-change: transform; }
.float-card { position: absolute; display: flex; gap: 10px; align-items: center; background: #fff; color: #0f172a; padding: 12px 16px; border-radius: 16px;
  box-shadow: var(--shadow-lg); font-weight: 700; font-size: .92rem; animation: float 5s ease-in-out infinite; }
.float-card small { display: block; color: #64748b; font-weight: 500; }
.float-card .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: #fff1e6; }
.float-card.a { left: 16px; bottom: 16px; } .float-card.b { right: 16px; top: 16px; animation-delay: -2.5s; }
.checks { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: .85rem; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 28px; } .story.flip .story-media { order: 0; } }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service { text-decoration: none; color: inherit; display: block; }
.service .art { width: 100%; height: 130px; margin-bottom: 8px; }
.service .go { color: var(--primary); font-weight: 800; display: inline-flex; gap: 6px; align-items: center; transition: gap .25s var(--ease); }
.service:hover .go { gap: 12px; }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.mosaic { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 240px 240px; gap: 16px; }
.mosaic figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.mosaic figure:hover img { transform: scale(1.06); }
.mosaic figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 20px 18px; color: #fff; font-weight: 800; font-size: 1.15rem;
  background: linear-gradient(to top, rgba(11, 27, 51, .85), transparent); }
.mosaic figcaption small { display: block; font-weight: 500; font-size: .88rem; color: #cbd5e1; }
@media (max-width: 760px) { .mosaic { grid-template-columns: 1fr; grid-template-rows: 260px 200px 200px; } .mosaic figure:first-child { grid-row: auto; } }

.dark-band { background: linear-gradient(160deg, var(--navy) 0%, #0a1426 100%); color: #fff; position: relative; overflow: hidden; }
.dark-band .section-title { color: #fff; }
.dark-band .muted, .dark-band p { color: #cbd5e1; }
.dark-band .checks li::before { background: rgba(74, 222, 128, .15); color: #4ade80; }
.dark-band .art-dash { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .4)); }
.dark-band .plan { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.dark-band .plan .muted { color: #94a3b8; }
.dark-band .plan .btn:not(.primary) { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }

.final-cta { text-align: center; background: var(--grad); color: #fff; border-radius: 28px; padding: 56px 24px; position: relative; overflow: hidden; }
.final-cta h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); color: #fff; }
.final-cta p { color: #fff7ed; font-size: 1.08rem; }
.final-cta .btn { background: #fff; color: var(--primary); border-color: #fff; }
.final-cta::before, .final-cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); animation: breathe 6s ease-in-out infinite; }
.final-cta::before { width: 260px; height: 260px; left: -80px; top: -90px; } .final-cta::after { width: 200px; height: 200px; right: -60px; bottom: -80px; animation-delay: -3s; }

.footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: .88rem; }
.footer .row { justify-content: space-between; align-items: flex-start; gap: 24px; }
.footer a { color: var(--muted); }

/* ---------- Recherche ---------- */
.searchbox { display: flex; gap: 8px; flex-wrap: wrap; }
.searchbox .q { flex: 1 1 170px; position: relative; }
.searchbox .q input { padding-left: 42px; font-size: 1.05rem; height: 52px; }
.searchbox .q::before { content: ""; position: absolute; left: 15px; top: 17px; width: 13px; height: 13px; border: 2.5px solid #f25c05; border-radius: 50%; }
.searchbox .q::after { content: ""; position: absolute; left: 28px; top: 31px; width: 7px; height: 2.5px; background: #f25c05; transform: rotate(45deg); border-radius: 2px; }
.searchbox select, .searchbox .btn { height: 52px; }
.searchbox select { flex: 0 1 165px; min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: all .2s var(--ease); }
.chip.on, .chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.geo-note { font-size: .86rem; color: var(--muted); }
.results { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
#map { height: 560px; border-radius: var(--radius); border: 1px solid var(--border); position: sticky; top: 80px; z-index: 1; background: var(--surface-2); box-shadow: var(--shadow); }
.point { cursor: pointer; }
.point.sel { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent), var(--shadow-lg); }
.point.off { opacity: .72; }
.point .head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.dist { font-weight: 800; color: var(--primary); white-space: nowrap; font-size: 1.1rem; }
.near { background: var(--grad); color: #fff; }
.prod { display: flex; justify-content: space-between; gap: 8px; font-size: .93rem; padding: 4px 0; }
.prod .no { color: var(--danger); font-size: .8rem; font-weight: 700; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
@media (max-width: 860px) {
  .results { grid-template-columns: 1fr; }
  #map { position: relative !important; top: 0; height: 260px; order: -1; }
  .searchbox select, .searchbox .btn { flex: 1 1 140px; }
}

/* ---------- Demandes ---------- */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin-bottom: 14px; }
.choice { position: relative; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer; background: var(--surface); font-weight: 400;
  transition: border-color .2s, background .2s, transform .2s var(--ease); }
.choice:hover { transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; }
.choice b { display: block; margin-bottom: 2px; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--primary); }
.req { border-left: 5px solid var(--border); }
.req.ouverte { border-left-color: var(--warn); }
.req.acceptee { border-left-color: var(--ok); }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); margin-right: 8px; animation: ping-dot 1.4s infinite; }
@keyframes ping-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.pickmap { height: 280px; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 12px; }

/* ---------- Suivi de livraison animé ---------- */
.track { position: relative; margin: 22px 0 8px; padding-top: 44px; }
.track .rail { height: 8px; border-radius: 4px; background: var(--border); position: relative; overflow: hidden; }
.track .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); border-radius: 4px; transition: width 1.4s var(--ease); }
.track .rider { position: absolute; top: 0; left: 0; width: 64px; transition: left 1.4s var(--ease), transform 1.4s var(--ease); }
.track .labels { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 10px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.track .labels span { text-align: center; } .track .labels span:first-child { text-align: left; } .track .labels span:last-child { text-align: right; }
.track .labels span.on { color: var(--text); }
@media (max-width: 560px) { .track .labels span:not(.on):not(:first-child):not(:last-child) { visibility: hidden; } }

/* ---------- Connexion ---------- */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 980px; margin: 8px auto; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--border); }
.auth-art { background: linear-gradient(160deg, var(--navy), #0a1426); color: #fff; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; position: relative; overflow: hidden; }
.auth-art h2 { font-size: 1.7rem; color: #fff; }
.auth-art p { color: #cbd5e1; }
.auth-art .art-hero { width: 100%; }
.auth-form { padding: 32px; }
@media (max-width: 820px) { .auth-split { grid-template-columns: 1fr; } .auth-art { padding: 24px; } .auth-art .art-hero { max-height: 220px; } }

.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } .container { padding-top: 18px; } .card { padding: 16px; } }

/* =========================================================
   Art : animations des illustrations SVG
   ========================================================= */
.art { overflow: visible; }
.art * { transform-box: fill-box; transform-origin: center; }
.ill-device { fill: var(--surface); stroke: var(--border); stroke-width: 2; }
.ill-soft { fill: var(--border); }
.ill-text { fill: var(--text); }
.ill-line { stroke: var(--border); fill: none; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .8; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-2px); } }
@keyframes dash { to { stroke-dashoffset: -140; } }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes drop { 0% { transform: translateY(-36px); opacity: 0; } 55% { transform: translateY(4px); opacity: 1; } 75% { transform: translateY(-3px); } 100% { transform: none; opacity: 1; } }
@keyframes pop { 0%, 6% { opacity: 0; transform: translateY(14px) scale(.92); } 12%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: translateY(-8px) scale(.96); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08, .94) rotate(3deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .2; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes type { from { opacity: 0; } to { opacity: 1; } }
@keyframes caret { 0%, 100% { transform: translateX(0); opacity: 1; } 50% { opacity: 0; } }
@keyframes wave { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes win { 0%, 55% { transform: scale(0); } 70% { transform: scale(1.25); } 80%, 100% { transform: scale(1); } }
@keyframes scroll { to { transform: translateX(-220px); } }
@keyframes shuttle { 0%, 100% { transform: translateX(-34px); } 50% { transform: translateX(34px); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg) translate(0, 0); } 50% { transform: rotate(8deg) translate(-4px, -3px); } }
@keyframes speed { 0% { transform: translateX(10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-30px); opacity: 0; } }

.a-float { animation: float 5s ease-in-out infinite; }
.a-float-late { animation-delay: -2.5s; }
.a-float-slow { animation: float 9s ease-in-out infinite; }
.a-breathe { animation: breathe 6s ease-in-out infinite; }
.a-spin { animation: spin .6s linear infinite; }
.a-bob { animation: bob .35s ease-in-out infinite; }
.a-dash { animation: dash 4s linear infinite; }
.a-ping { animation: ping 2.2s ease-out infinite; }
.a-drop { animation: drop .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.a-pop { animation: pop 9s var(--ease) infinite; }
.a-pop-1 { animation-delay: .6s; } .a-pop-2 { animation-delay: 5.1s; }
.a-flicker { animation: flicker 1.6s ease-in-out infinite; }
.a-spark { animation: twinkle 2.4s ease-in-out infinite; } .a-spark-2 { animation-delay: -1.2s; }
.a-twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.a-type { animation: type .01s steps(1) both; }
.a-type-1 { animation-delay: .4s; } .a-type-2 { animation-delay: .7s; } .a-type-3 { animation-delay: 1s; } .a-type-4 { animation-delay: 1.3s; }
.a-caret { animation: caret 1s steps(1) infinite; }
.a-wave { animation: wave 2.4s ease-out infinite; } .a-wave-2 { animation-delay: .8s; } .a-wave-3 { animation-delay: 1.6s; }
.a-win { animation: win 2.4s var(--ease) infinite; }
.a-scroll { animation: scroll 1.6s linear infinite; transform-box: view-box; }
.a-scroll-slow { animation: scroll 9s linear infinite; transform-box: view-box; }
.a-shuttle { animation: shuttle 4s ease-in-out infinite; }
.a-grow { animation: grow 1.1s var(--ease) both; transform-origin: bottom; }
.a-wiggle { animation: wiggle 2.6s ease-in-out infinite; }
.a-speed path { animation: speed 1s linear infinite; } .a-speed path:nth-child(2) { animation-delay: .3s; } .a-speed path:nth-child(3) { animation-delay: .6s; }
.a-rotate { animation: spin 6s linear infinite; }

/* Les animations ne démarrent qu'à l'écran (économie de batterie). */
.art.paused *, .art.paused { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .rotator span { transform: none; opacity: 0; } .rotator span.on { opacity: 1; }
}
.auth { max-width: 560px; margin: 16px auto; }
.city-chips { margin-top: -6px; }

/* =========================================================
   Espace client — style application (carrousel, commandes, onglets)
   ========================================================= */
.ico { display: block; flex: none; }
#view.app { background: var(--bg); }
.app-home { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px 24px; padding-top: 20px; padding-bottom: 8px; align-items: start; }
.app-home > :not(.app-col):not(.sheet) { grid-column: 1 / -1; }
.app-top { display: flex; align-items: center; gap: 12px; }
.avatar { position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2.5px var(--bg); }
.loc-pill { margin: 0 auto; display: inline-flex; align-items: center; gap: 8px; max-width: min(62%, 360px); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.loc-pill:active { transform: scale(.97); }
.loc-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-pill .ico:first-child { color: var(--primary); }
.icon-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); }
.icon-btn .dot { position: absolute; top: 11px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2.5px var(--surface); animation: blink 1.6s infinite; }
.app-hello h1 { margin: 6px 0 2px; font-size: clamp(1.5rem, 4vw, 2rem); }
.app-hello p { margin: 0; }
.app-search .q input { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.app-chips { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.app-chips::-webkit-scrollbar, .carousel::-webkit-scrollbar { display: none; }
.app-chips .chip { flex: none; }

.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 28px; }
.svc-card { position: relative; scroll-snap-align: start; height: 380px; border-radius: 28px; padding: 18px; overflow: hidden; border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 40%, color-mix(in srgb, var(--border) 85%, var(--surface)) 100%); }
.svc-card.orange { --tone: var(--primary); --tone-soft: var(--primary-soft); }
.svc-card.blue { --tone: var(--info); --tone-soft: var(--info-soft); }
.svc-card.green { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.svc-head { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; }
.svc-head b { display: block; font-size: 1.05rem; }
.svc-head small { color: var(--muted); }
.svc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--tone); flex: none; }
.svc-card .bottle-studio { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 62px; height: 56%; width: auto; max-width: 72%; }
.btn-pill { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; padding: 15px; border-radius: 999px; background: #fff; color: #0f172a; text-align: center;
  font-weight: 800; text-decoration: none; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); transition: transform .2s var(--ease), background .2s; }
.btn-pill:hover { background: var(--tone); color: #fff; }
.btn-pill:active { transform: scale(.98); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots button { width: 7px; height: 7px; border-radius: 4px; border: 0; padding: 0; background: var(--border); cursor: pointer; transition: width .35s var(--ease), background .35s; }
.dots button.on { width: 20px; background: var(--primary); }

.sheet { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 14px 18px 6px; box-shadow: var(--shadow); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 6px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 10px; }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-head a { color: var(--muted); font-weight: 600; text-decoration: none; font-size: .9rem; }
.o-item { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; border-radius: 12px; transition: background .2s; }
.o-item:hover { background: var(--surface-2); }
.o-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.o-ic.blue { background: var(--info-soft); color: var(--info); } .o-ic.green { background: var(--ok-soft); color: var(--ok); }
.o-main { flex: 1; min-width: 0; }
.o-main b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-main small { color: var(--muted); }
.o-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; max-width: 45%; }
.o-side small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.o-empty { display: flex; gap: 12px; align-items: center; padding: 16px 2px 18px; border-top: 1px solid var(--border); color: var(--muted); }
.o-empty .ico { color: var(--primary); }
.app-h2 { margin-top: 28px; margin-bottom: 12px; }

#tabbar { display: none; }
@media (max-width: 860px) {
  .app-home { grid-template-columns: 1fr; }
  .app-home > * { grid-column: 1 / -1; }
  .carousel { grid-auto-columns: 86%; border-radius: 0; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
  .svc-card { height: 360px; }
}
@media (max-width: 760px) {
  body.has-tabbar #tabbar { display: flex; position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; gap: 4px; padding: 6px;
    border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .5s var(--ease) both; }
  #tabbar a { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .25s, color .25s, transform .2s var(--ease); }
  #tabbar a:active { transform: scale(.92); }
  #tabbar a.active { background: var(--primary-soft); color: var(--primary); }
  body.has-tabbar { padding-bottom: 92px; }
  body.has-tabbar #toast { bottom: 96px; }
  body.has-tabbar .cart-bar { bottom: 88px; }
  .app-top .loc-pill { max-width: 58%; }
}
/* La carte reste sous l'en-tête et la barre d'onglets ; les rangées défilantes ne débordent pas. */
#map { isolation: isolate; }
.app-home > * { min-width: 0; }
