/* ============================================================
   Boutique — design 2026 : cartes douces, verre dépoli, mode sombre auto
   ============================================================ */
:root {
  color-scheme: light dark;
  --bg: #f3f6f2;
  --bg-2: #e9eee8;
  --card: #ffffff;
  --card-2: #f7faf6;
  --ink: #0e1a13;
  --muted: #667569;
  --line: #e3e9e1;
  --glass: rgba(255, 255, 255, .78);
  --glass-line: rgba(255, 255, 255, .6);
  --green: #0b8f57;
  --green-2: #16b872;
  --green-soft: #dff3e8;
  --accent: #ff6a3d;
  --accent-soft: #ffe9e1;
  --amber: #a86a08;
  --amber-soft: #fff1d4;
  --red: #d23f2b;
  --red-soft: #fde4df;
  --blue: #2468c4;
  --blue-soft: #e1ecfb;
  --gray-soft: #eceeea;
  --gray-ink: #6e756f;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(14, 26, 19, .04), 0 8px 24px -8px rgba(14, 26, 19, .10);
  --shadow-lg: 0 18px 50px -12px rgba(14, 26, 19, .35);
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-bottom: calc(12px + var(--safe-b));
  --float-bottom: calc(var(--nav-bottom) + var(--nav-h) + 12px);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b110e;
    --bg-2: #121a15;
    --card: #151d18;
    --card-2: #1a241e;
    --ink: #eef5f0;
    --muted: #8d9c92;
    --line: #243029;
    --glass: rgba(21, 29, 24, .78);
    --glass-line: rgba(255, 255, 255, .07);
    --green: #1fcf86;
    --green-2: #4be0a3;
    --green-soft: rgba(31, 207, 134, .15);
    --accent: #ff8059;
    --accent-soft: rgba(255, 128, 89, .15);
    --amber: #f5b94a;
    --amber-soft: rgba(245, 185, 74, .15);
    --red: #ff7a68;
    --red-soft: rgba(255, 122, 104, .15);
    --blue: #7ab0ff;
    --blue-soft: rgba(122, 176, 255, .15);
    --gray-soft: #222b25;
    --gray-ink: #8d9c92;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 18px 50px -12px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  min-height: 100dvh; padding-bottom: calc(var(--nav-bottom) + var(--nav-h) + 90px);
  background:
    radial-gradient(60% 40% at 90% -5%, color-mix(in srgb, var(--green-2) 14%, transparent), transparent 70%),
    radial-gradient(50% 35% at -10% 8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--green-soft); }

/* ---------- barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.03em; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 12px; box-shadow: 0 4px 12px -2px rgba(11, 143, 87, .45); flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 16px;
  display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .12s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 21px; height: 21px; }
.dot {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg);
  animation: pop .35s cubic-bezier(.3, 1.6, .5, 1);
}
.avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff;
  box-shadow: 0 6px 16px -4px rgba(11, 143, 87, .55);
}
.avatar::after { /* pastille « connecté » */
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px;
  border-radius: 50%; background: #3ddc84; border: 2.5px solid var(--bg);
}
.avatar.plain::after { display: none; }
.avatar.sm { width: 46px; height: 46px; font-size: 16px; }
.avatar.lg { width: 78px; height: 78px; font-size: 28px; }
.avatar.lg::after { width: 20px; height: 20px; border-width: 3.5px; }
.login-link { font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); }

/* ---------- vue ---------- */
.view { max-width: 1120px; margin: 0 auto; padding: 4px 16px 24px; }
.view.enter { animation: viewIn .32s cubic-bezier(.2, .8, .3, 1) both; }
h1.title { font-size: 28px; letter-spacing: -.04em; margin: 10px 0 4px; line-height: 1.1; }
.subtitle { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }
.section-title h2 { font-size: 18px; margin: 0; letter-spacing: -.03em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- héros ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 30px; padding: 24px 22px 20px; margin: 8px 0 16px; color: #fff;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(75, 224, 163, .55), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(255, 106, 61, .38), transparent 60%),
    linear-gradient(135deg, #0a4a31 0%, #0b6b46 55%, #0e8a5a 100%);
  box-shadow: 0 20px 40px -18px rgba(11, 107, 70, .7);
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 40%); pointer-events: none; }
.hero .eyebrow { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-bottom: 8px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.04em; line-height: 1.1; }
.hero p { margin: 0; opacity: .88; font-size: 14.5px; line-height: 1.45; max-width: 30ch; }
.hero .blob { position: absolute; right: -18px; bottom: -34px; font-size: 130px; opacity: .16; transform: rotate(-12deg); }
.hero-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; position: relative; z-index: 1; }
.hero-pills span { font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .18); }

/* ---------- recherche + catégories ---------- */
.sticky-tools { position: sticky; top: 64px; z-index: 20; padding: 6px 16px 10px; margin: 0 -16px; background: linear-gradient(var(--bg) 78%, transparent); }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 18px;
  padding: 0 16px; height: 52px; box-shadow: var(--shadow); border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.search svg { width: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 2px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 10px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 650; font-size: 14px; scroll-snap-align: start;
  transition: background .18s, color .18s, transform .12s, border-color .18s;
}
.chip:active { transform: scale(.95); }
.chip .n { font-size: 12px; color: var(--muted); font-weight: 650; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on .n { color: color-mix(in srgb, var(--bg) 60%, transparent); }

/* ---------- grille produits ---------- */
.cat-block h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; margin: 24px 0 12px; letter-spacing: -.03em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.pcard {
  position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
@media (hover: hover) { .pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.anim .pcard { animation: cardIn .5s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pimg {
  aspect-ratio: 1.12; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(75% 75% at 50% 45%, color-mix(in srgb, var(--cat, var(--green)) 20%, transparent), transparent 78%);
}
.pimg img, .ph { width: 64%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .35); border: 3px solid var(--card); transition: transform .25s; }
@media (hover: hover) { .pcard:hover .pimg img, .pcard:hover .ph { transform: scale(1.06) rotate(-2deg); } }
.ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: clamp(18px, 6vw, 30px); letter-spacing: .02em; }
.pbody { padding: 4px 13px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pname { font-weight: 650; font-size: 14px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; letter-spacing: -.01em; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.price { font-weight: 800; font-size: 16px; letter-spacing: -.03em; white-space: nowrap; }
.price small { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 750; white-space: nowrap;
}
.pcard .badge { position: absolute; top: 10px; left: 10px; z-index: 1; backdrop-filter: blur(8px); }
.b-ok { background: var(--green-soft); color: var(--green); }
.b-low { background: var(--amber-soft); color: var(--amber); }
.b-out { background: var(--gray-soft); color: var(--gray-ink); }
.b-wait { background: var(--amber-soft); color: var(--amber); }
.b-acc { background: var(--green-soft); color: var(--green); }
.b-ref { background: var(--red-soft); color: var(--red); }
.b-done { background: var(--blue-soft); color: var(--blue); }
.b-liv { background: var(--accent-soft); color: var(--accent); }
.b-ret { background: var(--blue-soft); color: var(--blue); }
.pcard.out { filter: grayscale(1); opacity: .55; box-shadow: none; }
.pcard.out .pimg { cursor: default; }

.add {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; font-size: 24px; font-weight: 500; line-height: 1;
  box-shadow: 0 6px 14px -4px rgba(11, 143, 87, .6); transition: transform .12s;
}
.add:active { transform: scale(.88); }
.add:disabled { background: var(--gray-soft); color: var(--gray-ink); box-shadow: none; cursor: not-allowed; }
.stepper { display: flex; align-items: center; background: var(--green-soft); border-radius: 14px; height: 40px; }
.stepper button { width: 36px; height: 40px; font-size: 21px; font-weight: 700; color: var(--green); border-radius: 14px; }
.stepper button:active { background: color-mix(in srgb, var(--green) 14%, transparent); }
.stepper button:disabled { opacity: .35; }
.stepper span, .stepper input { min-width: 22px; text-align: center; font-weight: 800; font-size: 15px; color: var(--green); }
.stepper input { width: 52px; border: 0; background: transparent; outline: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.lg { height: 50px; border-radius: 16px; }
.stepper.lg button { width: 50px; height: 50px; font-size: 25px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 48px; margin-bottom: 8px; }

/* ---------- barre panier flottante ---------- */
.cartbar {
  position: fixed; left: 14px; right: 14px; bottom: var(--float-bottom); z-index: 25;
  max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 22px; background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-lg); animation: slideUp .35s cubic-bezier(.2, 1.2, .4, 1);
}
.cartbar .count { width: 38px; height: 38px; border-radius: 13px; background: color-mix(in srgb, var(--bg) 16%, transparent); display: grid; place-items: center; font-weight: 800; }
.cartbar .tot { flex: 1; line-height: 1.2; }
.cartbar .tot b { display: block; font-size: 16.5px; letter-spacing: -.02em; }
.cartbar .tot span { font-size: 12px; opacity: .65; }
.cartbar .go { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; padding: 13px 17px; border-radius: 15px; font-weight: 750; }
.cartbar.bump { animation: bump .35s ease; }

/* ---------- navigation flottante ---------- */
.tabs {
  position: fixed; left: 14px; right: 14px; bottom: var(--nav-bottom); z-index: 26; max-width: 520px; margin: 0 auto;
  height: var(--nav-h); padding: 6px; display: flex; justify-content: space-around; gap: 2px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.7); border: 1px solid var(--glass-line);
  border-radius: 28px; box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tab {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--muted); border-radius: 22px; transition: color .2s, background .25s;
}
.tab svg { width: 23px; height: 23px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tab.on { color: var(--green); background: var(--green-soft); }
.tab.on svg { transform: translateY(-1px) scale(1.12); }
.tab .dot { top: 3px; right: calc(50% - 26px); border-color: var(--card); }

/* ---------- cartes / listes ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line); }
.card + .card { margin-top: 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.line-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.line-item .thumb { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.line-item .thumb img, .line-item .thumb .ph { width: 56px; font-size: 17px; box-shadow: none; border: 0; }
.line-item .info { flex: 1; min-width: 0; }
.line-item .info b { display: block; font-size: 14px; font-weight: 650; line-height: 1.3; }
.line-item .info span { font-size: 13px; color: var(--muted); }
.remove { color: var(--muted); padding: 8px; border-radius: 12px; }
.remove:active { background: var(--red-soft); color: var(--red); }
.summary { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 4px; font-size: 15px; }
.summary b { font-size: 24px; letter-spacing: -.04em; }

/* ---------- identité (commande) ---------- */
.idcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); }
.id-view { display: flex; align-items: center; gap: 12px; }
.id-text { flex: 1; min-width: 0; }
.id-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.id-name b { font-size: 16px; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.id-text .muted { font-size: 14px; margin-top: 2px; }
.edit-btn { flex: none; font-size: 12.5px; font-weight: 750; padding: 7px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); transition: transform .12s; }
.edit-btn:active { transform: scale(.94); }
.id-form { display: flex; flex-direction: column; gap: 12px; animation: viewIn .25s ease both; }
.id-form .hint { margin: -4px 0 0; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 20px;
  border-radius: 18px; font-weight: 750; font-size: 16px; width: 100%; color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  transition: transform .12s, opacity .15s, filter .15s; box-shadow: 0 10px 22px -8px rgba(11, 143, 87, .65);
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn.dark { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.sm { height: 42px; font-size: 14px; border-radius: 14px; padding: 0 16px; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.link { color: var(--green); font-weight: 750; }

/* ---------- formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 7px 3px; }
.input {
  width: 100%; height: 52px; padding: 0 15px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 16px; outline: 0; transition: border-color .15s, box-shadow .15s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea.input { height: auto; min-height: 88px; padding: 13px 15px; resize: vertical; }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.input.bad { border-color: var(--red); }
.input.good { border-color: var(--green-2); }
.hint { font-size: 12.5px; margin: 7px 0 0 3px; color: var(--muted); }
.hint.bad { color: var(--red); }
.hint.good { color: var(--green); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw button { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 15px;
  border-radius: 20px; background: var(--card); border: 2px solid var(--line); transition: border-color .18s, background .18s, transform .12s;
}
.seg button:active { transform: scale(.98); }
.seg button .ic { font-size: 24px; }
.seg button b { font-size: 15px; }
.seg button span { font-size: 12.5px; color: var(--muted); }
.seg button.on { border-color: var(--green); background: var(--green-soft); }
.segmented { display: inline-flex; background: var(--gray-soft); border-radius: 16px; padding: 4px; gap: 2px; }
.segmented button { padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.error-box { background: var(--red-soft); color: var(--red); padding: 13px 15px; border-radius: 16px; font-size: 14px; font-weight: 650; }
.auth { max-width: 440px; margin: 0 auto; }
.auth .logo { width: 70px; height: 70px; border-radius: 22px; margin: 18px auto 12px; box-shadow: 0 14px 30px -10px rgba(11, 143, 87, .6); }
.auth h1 { text-align: center; }
.auth .subtitle { text-align: center; }

/* ---------- commandes ---------- */
.order { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.order.flash { animation: flash 1.8s ease; }
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 10px; }
.order-head b { font-size: 15.5px; letter-spacing: -.02em; }
.order-head .muted { font-size: 12.5px; }
.order-body { padding: 0 16px 12px; font-size: 14px; }
.order-items { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 8px 0; margin: 8px 0; }
.order-items div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.order-items div span:last-child { white-space: nowrap; font-weight: 650; }
.order-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; }
.order-actions { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap; }
.order-actions .btn { flex: 1; min-width: 120px; }
.client-box { display: grid; gap: 6px; background: var(--card-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px; margin-top: 4px; }
.client-box a { color: var(--green); font-weight: 750; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

/* ---------- succès ---------- */
.success { text-align: center; padding: 28px 8px 8px; }
.success .check {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 18px; color: #fff; font-size: 46px;
  background: linear-gradient(135deg, var(--green), var(--green-2)); display: grid; place-items: center;
  animation: pop .55s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 0 12px var(--green-soft), 0 0 0 26px color-mix(in srgb, var(--green-soft) 50%, transparent);
}

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.kpi b { display: block; font-size: 21px; letter-spacing: -.04em; margin-top: 5px; }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi.hot { background: linear-gradient(135deg, #0a4a31, #0e8a5a); color: #fff; border: 0; box-shadow: 0 16px 30px -14px rgba(11, 107, 70, .8); }
.kpi.hot span, .kpi.hot small { color: rgba(255, 255, 255, .7); }
.alert-card { background: var(--amber-soft); border-radius: var(--radius); padding: 14px; }
.alert-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--amber); display: flex; align-items: center; gap: 8px; }
.prow-admin { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 11px 12px; box-shadow: var(--shadow); }
.prow-admin.out { background: var(--card-2); }
.prow-admin .thumb { width: 50px; height: 50px; flex: none; display: grid; place-items: center; cursor: pointer; }
.prow-admin .thumb img, .prow-admin .thumb .ph { width: 50px; font-size: 15px; box-shadow: none; border: 0; }
.prow-admin.out .thumb { filter: grayscale(1); opacity: .6; }
.prow-admin .info { flex: 1; min-width: 0; cursor: pointer; }
.prow-admin .info b { display: block; font-size: 14px; font-weight: 650; line-height: 1.25; }
.prow-admin .info span { font-size: 13px; color: var(--muted); }
.prow-admin .badge { margin-top: 3px; }
.fab {
  position: fixed; right: 18px; bottom: var(--float-bottom); z-index: 25; height: 56px; padding: 0 22px;
  border-radius: 20px; background: var(--ink); color: var(--bg); font-weight: 750; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg);
}
.fab span { font-size: 24px; line-height: 0; }
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: var(--green); transition: fill .15s; }
.chart .bar.zero { fill: var(--gray-soft); }
.chart g:hover .bar { fill: var(--green-2); }
.chart text { font-size: 10px; fill: var(--muted); font-family: inherit; }
.chart .val { font-size: 10px; fill: var(--ink); font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 6px; border-bottom: 1px solid var(--line); }
.table .r { text-align: right; white-space: nowrap; }
.upload { display: flex; align-items: center; gap: 14px; }
.upload .prev { width: 88px; height: 88px; flex: none; border-radius: 50%; overflow: hidden; background: var(--card-2); display: grid; place-items: center; border: 2px dashed var(--line); font-size: 26px; }
.upload .prev img, .upload .prev .ph { width: 100%; height: 100%; object-fit: cover; box-shadow: none; border: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; background: var(--card); border-radius: 16px; border: 1.5px solid var(--line); }
.switch input { width: 48px; height: 28px; appearance: none; background: var(--gray-soft); border: 1px solid var(--line); border-radius: 14px; position: relative; transition: background .2s; cursor: pointer; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--green); border-color: var(--green); }
.switch input:checked::after { transform: translateX(20px); }
.notif-cta { display: flex; align-items: center; gap: 12px; background: var(--blue-soft); color: var(--blue); padding: 13px 15px; border-radius: 18px; font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.notif-cta button { margin-left: auto; background: var(--blue); color: var(--bg); padding: 9px 15px; border-radius: 12px; font-weight: 750; white-space: nowrap; }

/* ---------- feuilles (bottom sheets) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 11, .5); backdrop-filter: blur(3px); animation: fade .2s ease both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 30px 30px 0 0; padding: 8px 18px calc(22px + var(--safe-b));
  animation: sheetIn .36s cubic-bezier(.2, 1, .3, 1) both; max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0;
}
.sheet.closing { animation: sheetOut .22s ease forwards; }
.backdrop.closing { animation: fadeOut .22s ease forwards; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h2 { margin: 4px 0 14px; font-size: 21px; letter-spacing: -.03em; }
.sheet .detail-img { display: grid; place-items: center; padding: 20px 0 14px; border-radius: 24px; background: radial-gradient(75% 80% at 50% 45%, color-mix(in srgb, var(--cat, var(--green)) 22%, transparent), transparent 80%); }
.sheet .detail-img img, .sheet .detail-img .ph { width: 176px; font-size: 46px; }
@media (min-width: 700px) {
  .sheet { bottom: 50%; transform: translateY(50%); border-radius: 30px; border-bottom: 1px solid var(--line); animation: dialogIn .25s ease both; }
  .sheet.closing { animation: fadeOut .2s ease forwards; }
}
.notif-item { display: flex; gap: 12px; padding: 13px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.notif-item.unread { box-shadow: inset 3px 0 0 var(--accent); }
.notif-item .ic { font-size: 22px; }
.notif-item b { display: block; font-size: 14px; }
.notif-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 12px; align-items: flex-start;
  background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); backdrop-filter: blur(14px); padding: 13px 16px; border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: toastIn .4s cubic-bezier(.2, 1.3, .4, 1) both; font-size: 14px;
}
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: linear-gradient(135deg, #0a7a4b, #12a465); color: #fff; }
.toast b { display: block; }
.toast span { opacity: .85; font-size: 13px; }
.toast.out { animation: toastOut .25s ease forwards; }

.skeleton { background: linear-gradient(90deg, var(--bg-2) 0%, var(--card-2) 50%, var(--bg-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }

@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.04); } }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(calc(50% + 20px)); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes toastIn { from { transform: translateY(-20px) scale(.96); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-14px); opacity: 0; } }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent), var(--shadow); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
