@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-Bold.ttf') format('truetype'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/BarlowCondensed-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/BarlowCondensed-Black.ttf') format('truetype'); font-weight: 800 900; font-display: swap; }
:root {
  --or: #5b3df5; --or2: #7c5cff; --rouge: #d6287a; --jaune: #ffd400; --navy: #17113a;
  --bg: #f6f4ff; --card: #ffffff; --txt: #1b1533; --mute: #6b6585; --line: #e6e1fb;
  --ok: #12925a; --ko: #c62828; --wait: #b7791f;
}
.vlogo { display: inline-flex; align-items: center; gap: 8px; font-family: 'Barlow Condensed', sans-serif; font-weight: 900;
  font-size: 26px; letter-spacing: .3px; color: inherit; }
.vlogo img { width: 34px; height: 34px; border-radius: 9px; background: none !important; padding: 0 !important; }
.client { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 4px 10px 4px 4px;
  color: var(--txt); font-weight: 700; font-size: 14px; margin-top: 10px; }
.client img { height: 26px; border-radius: 8px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt);
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; }
h1, h2, h3, .num { font-family: 'Barlow Condensed', 'Barlow', sans-serif; letter-spacing: .2px; }
a { color: var(--or); }
button { font: inherit; cursor: pointer; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 92px; }
.top { background: linear-gradient(135deg, var(--or), var(--rouge)); color: #fff; padding: 18px 18px 26px;
  border-radius: 0 0 26px 26px; }
.top .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top img.logo { height: 38px; background: #fff; border-radius: 14px; padding: 4px 10px; }
.top .hello { font-size: 15px; opacity: .95; }
.top h1 { margin: 14px 0 2px; font-size: 30px; line-height: 1.05; }
.top .sub { opacity: .92; font-size: 15px; }
.wrap { padding: 0 16px; }
.card { background: var(--card); border-radius: 20px; padding: 16px; margin: 14px 0;
  box-shadow: 0 2px 10px rgba(50, 30, 120, .08); border: 1px solid var(--line); }
.card h2 { margin: 0 0 8px; font-size: 22px; }
.mute { color: var(--mute); font-size: 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pill { background: rgba(255,255,255,.22); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 13px 16px; font-weight: 700; background: var(--or); color: #fff; width: 100%; font-size: 16px; }
.btn.sec { background: #eeeaff; color: var(--or); }
.btn.ghost { background: transparent; color: var(--mute); border: 1px solid var(--line); }
.btn.green { background: var(--ok); }
.btn:disabled { opacity: .45; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font: inherit;
  background: #fff; color: var(--txt); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--or); }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.seg { display: flex; background: #eeeaff; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 4px; border-radius: 9px; font-weight: 700;
  color: var(--mute); font-size: 14px; }
.seg button.on { background: #fff; color: var(--or); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; }
.vis { flex: 0 0 86%; scroll-snap-align: center; }
.card > .vis { max-width: 360px; margin: 0 auto; }
.vis img { width: 100%; border-radius: 16px; display: block; background: #e9e5fb; aspect-ratio: 4/5; object-fit: cover; }
.vis.story img { aspect-ratio: 9/16; }
.legende { background: #f7f5ff; border: 1px dashed #c9bdfb; border-radius: 12px; padding: 10px; font-size: 14px;
  margin-top: 10px; }
.dots { text-align: center; color: var(--mute); font-size: 13px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: center; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
.nav .in { display: flex; width: 100%; max-width: 520px; }
.nav button { flex: 1; border: 0; background: none; padding: 6px 2px; color: var(--mute); font-size: 12px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nav button svg { width: 24px; height: 24px; }
.nav button.on { color: var(--or); }
.solde { font-size: 54px; font-weight: 800; line-height: 1; margin: 6px 0; }
.solde small { font-size: 22px; }
.list .it { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line);
  align-items: center; }
.list .it:last-child { border-bottom: 0; }
.list .it .l { min-width: 0; }
.list .it .t { font-weight: 600; font-size: 15px; }
.list .it .d { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.amt { font-weight: 800; white-space: nowrap; }
.amt.pos { color: var(--ok); } .amt.neg { color: var(--txt); }
.st { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.st.en_controle, .st.a_payer, .st.a_crediter { background: #fff3d6; color: var(--wait); }
.st.valide, .st.paye, .st.ok, .st.actif { background: #ddf5e8; color: var(--ok); }
.st.refuse, .st.suspendu, .st.annule, .st.ko { background: #fde2e2; color: var(--ko); }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #1b1533; color: #fff;
  padding: 12px 16px; border-radius: 14px; font-size: 15px; z-index: 50; max-width: 90%; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.modal { position: fixed; inset: 0; background: rgba(15, 8, 40, .5); display: flex; align-items: flex-end; z-index: 40; }
.sheet { background: #fff; width: 100%; max-width: 520px; margin: 0 auto; border-radius: 24px 24px 0 0; padding: 18px 18px 28px;
  max-height: 92vh; overflow: auto; }
.sheet h2 { margin: 0 0 4px; }
.netgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.netgrid button { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 8px; font-weight: 700; }
.netgrid button.on { border-color: var(--or); color: var(--or); background: #f3f0ff; }
.steps { counter-reset: s; padding: 0; margin: 8px 0 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 0 0 10px 36px; font-size: 15px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--or); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.done-badge { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 460px; margin: 0 auto; }
.login .hero { text-align: center; margin-bottom: 18px; }
.login .hero img { width: 170px; }
.login h1 { font-size: 34px; margin: 10px 0 4px; }
.demo { background: #fff3d6; color: #6b4a0b; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv div { background: #f7f5ff; border-radius: 14px; padding: 12px; }
.kv b { display: block; font-size: 24px; font-family: 'Barlow Condensed', sans-serif; }
.kv span { color: var(--mute); font-size: 13px; }
.hide { display: none !important; }
.camps { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
.camps button { display: inline-flex; align-items: center; gap: 8px; flex: none; border: 0; border-radius: 12px; padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: 14px; }
.camps button.on { background: #fff; color: var(--txt); }
.camps img { height: 28px; width: 28px; object-fit: contain; border-radius: 8px; background: #fff; }
.demo.ok { background: #e3f6ec; color: #11643a; }
.camps span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.camps span small { font-weight: 500; font-size: 11.5px; opacity: .8; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vis.libre img { aspect-ratio: auto; object-fit: contain; }

/* cagnotte : un bloc par lundi */
h2.sec { font-size: 15px; margin: 18px 4px 8px; color: var(--mute, #6b6880); text-transform: uppercase; letter-spacing: .04em; }
.lundi .lh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lundi .lh h2 { margin: 0 0 2px; }
.lundi .amt.big { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.lundi.paye { border-left: 4px solid var(--ok); }
.lundi.a_payer { border-left: 4px solid var(--wait); }
.lundi .ref { background: #f3f1fb; border-radius: 10px; padding: 9px 11px; margin: 10px 0 4px; font-size: 14px; }
.lundi .ref b { display: block; font-size: 16px; letter-spacing: .03em; margin-top: 2px; word-break: break-all; }
.lundi .ref small { display: block; color: var(--mute, #6b6880); margin-top: 3px; }
.lundi details { margin-top: 8px; }
.lundi summary { cursor: pointer; font-weight: 700; color: var(--or); padding: 6px 0; }

/* listes longues : filtres, tri, regroupement par mois (14/10) */
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--txt); border-radius: 999px;
  padding: 7px 12px; font-weight: 600; font-size: 14px; }
.chips button b { color: var(--mute); font-weight: 700; margin-left: 2px; }
.chips button.on { background: var(--or); border-color: var(--or); color: #fff; }
.chips button.on b { color: #fff; opacity: .85; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.filters input[type=search] { grid-column: 1 / -1; }
.filters select, .filters input { padding: 10px 11px; font-size: 14px; border-radius: 11px; }
.resume { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 4px -4px; font-size: 14px; color: var(--mute); }
.resume b { color: var(--txt); }
.resume button { border: 0; background: none; color: var(--or); font-weight: 700; font-size: 14px; padding: 4px 0; }
.list .grp { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--mute); background: #f7f5ff; margin: 6px -16px 0; padding: 8px 16px; }
.list .grp:first-child { margin-top: -6px; border-radius: 14px 14px 0 0; }
.list .it .d2 { color: var(--mute); font-size: 13px; line-height: 1.35; }
.list .it .refl { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.list button.it { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; padding: 11px 0; }
.list button.it:last-of-type { border-bottom: 0; }
.seg.big { margin-top: 14px; }
.seg.big button { padding: 11px 4px; font-size: 15px; }
.kv3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kv3 div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.kv3 b { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 20px; }
.kv3 span { color: var(--mute); font-size: 12px; }
button.card.last { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; color: inherit; font: inherit; }
button.card.last b { font-size: 20px; font-family: 'Barlow Condensed', sans-serif; }
button.card.last span { color: var(--or); font-weight: 700; font-size: 14px; }
.lien { display: block; padding: 10px 0; font-weight: 600; text-decoration: none; }
.sheet .lh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sheet .ref { background: #f3f1fb; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.sheet .ref b { display: block; font-size: 17px; letter-spacing: .03em; margin-top: 2px; word-break: break-all; }
.sheet .ref small { display: block; color: var(--mute); margin-top: 6px; }
a.btn { text-decoration: none; }
.consigne { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #fff6d6; color: #5a4300; font-size: 13.5px; line-height: 1.4; }
.consigne ul { margin: 4px 0 0 18px; padding: 0; }
