
/* Police : Aptos si elle est installée (Windows / Microsoft 365), sinon Segoe UI Variable, sinon Figtree (très proche), sinon la police système. */
:root{--f:Aptos,"Aptos Display","Segoe UI Variable Text","Segoe UI",Figtree,system-ui,-apple-system,sans-serif;
--ink:#0F2747;--mut:#5E6B80;--or:#FF8F33;--cream:#FFE7D1;--soft:#FFF1E4;--bg:#F6F5F3;--line:#E4DFD8;--lo:#FFD3AD;--slate:#4A5B7A;--bad:#C2410C;--warn:#8A3B00;--ok:#0E6B2F;--okbg:#E6F4EA}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%}
body{font-family:var(--f);color:var(--ink);background:#ECEAE6;font-size:15px;line-height:1.4;display:flex;justify-content:center;align-items:center}
button,input,select{font-family:inherit;color:inherit}
#app{width:390px;height:844px;max-height:100vh;background:var(--bg);display:flex;flex-direction:column;overflow:hidden;position:relative;box-shadow:0 10px 40px rgba(15,39,71,.18);border-radius:28px}
@media (max-width:430px){body{background:var(--bg);display:block}#app{width:100%;height:100dvh;max-height:none;border-radius:0;box-shadow:none}}
main>*{flex-shrink:0}
main{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 16px 24px;display:flex;flex-direction:column;gap:16px}
h1{margin:0;font-size:22px;font-weight:700;letter-spacing:-.2px}
h2{margin:0;font-size:18px;font-weight:700}
.sub{font-size:13px;color:var(--mut)}
.small{font-size:12px}
.card{background:#fff;border-radius:22px;padding:16px;box-shadow:0 2px 14px rgba(15,39,71,.05)}
.col{display:flex;flex-direction:column;gap:12px}
.row{display:flex;align-items:center;gap:12px}
.sp{justify-content:space-between}
.grow{flex:1 1 0;min-width:0}
.chip{display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border-radius:15px;background:#F3F0EB;font-size:12px;font-weight:600;white-space:nowrap}
button.chip{border:0;min-height:44px;padding:0 16px;font-size:14px;cursor:pointer}
button.chip.on{background:var(--soft);box-shadow:inset 0 0 0 1.5px var(--or)}
.chip.on:not(button){background:var(--soft)}
.hero{border-radius:28px;padding:20px;background:radial-gradient(130% 100% at 0% 0%,#FFE3CB 0%,#FFF3E8 38%,#fff 75%);box-shadow:0 2px 14px rgba(15,39,71,.05)}
.big{font-size:56px;font-weight:700;line-height:1.05;letter-spacing:-1px}
.glass{background:rgba(255,255,255,.85);box-shadow:0 1px 8px rgba(15,39,71,.05);border-radius:20px;padding:12px 8px;display:flex;justify-content:space-around;text-align:center}
.seg{display:flex;gap:4px;padding:4px;border-radius:20px;background:#EBE8E3}
.seg button{flex:1 1 0;height:44px;border:0;border-radius:16px;background:transparent;font-size:14px;font-weight:600;cursor:pointer}
.seg button.on{background:#fff;box-shadow:0 1px 6px rgba(15,39,71,.12)}
.btn{height:48px;border:0;border-radius:24px;background:var(--slate);color:#fff;font-size:16px;font-weight:700;cursor:pointer;width:100%;display:flex;align-items:center;justify-content:center;gap:8px}
.btn.alt{background:#fff;color:var(--ink);box-shadow:0 1px 8px rgba(15,39,71,.08)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.link{color:var(--ink);font-weight:600;text-decoration:underline;cursor:pointer;background:none;border:0;padding:0;font-size:inherit}
.ico{width:36px;height:36px;border-radius:12px;background:var(--soft);color:#EE6A00;display:flex;align-items:center;justify-content:center;flex:0 0 36px}
.ring{border-radius:50%;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.ring>div{border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
.note{border-radius:12px;padding:10px 12px;font-size:14px}
.note.ok{background:var(--okbg);color:var(--ok)}
.note.warn{background:var(--soft);color:var(--warn)}
label.f{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--mut)}
input.i,select.i{height:44px;min-width:0;max-width:100%;box-sizing:border-box;-webkit-appearance:none;appearance:none;border:1px solid var(--line);border-radius:12px;padding:0 12px;font-size:16px;background:#fff;width:100%}
input[type=range]{width:100%;accent-color:var(--or);height:44px}
.bars{display:flex;align-items:flex-end;gap:8px;border-bottom:1px solid var(--line)}
.bars>div{flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.bars b{display:block;width:100%;max-width:34px;border-radius:10px 10px 3px 3px}
.lbl{display:flex;gap:8px}.lbl>div{flex:1 1 0;text-align:center;font-size:11px;color:var(--mut)}
.val{font-size:11px;font-weight:700;white-space:nowrap}
.dot{width:10px;height:10px;border-radius:3px;display:inline-block}
.track{height:8px;border-radius:4px;background:#EFECE8;overflow:hidden}
.track>i{display:block;height:100%;border-radius:4px;background:#FF8F33}
.sw{width:52px;height:32px;border-radius:16px;border:0;background:var(--line);position:relative;cursor:pointer;flex:0 0 52px}
.sw::after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:50%;background:#fff;transition:left .15s}
.sw[aria-checked=true]{background:var(--or)}.sw[aria-checked=true]::after{left:24px}
.tap{min-height:44px;display:flex;align-items:center;gap:12px;cursor:pointer;background:none;border:0;padding:0;text-align:left;width:100%}
nav{position:relative;z-index:3;flex:0 0 auto;padding-bottom:calc(14px + env(safe-area-inset-bottom)) !important;display:grid;grid-template-columns:64px repeat(4,1fr) 64px;align-items:center;gap:4px;padding:8px 14px 0;background:#fff;box-shadow:0 -2px 14px rgba(15,39,71,.05)}
nav button.t{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:52px;border-radius:16px;font-size:12px;font-weight:600;color:var(--mut);background:none;border:0;cursor:pointer}
nav button.t.on{background:var(--soft);color:var(--ink)}
nav button.t.on svg{color:#EE6A00}
nav button.fab{justify-self:center;width:56px;height:56px;margin-top:-22px;border-radius:28px;border:0;background:var(--or);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px rgba(255,143,51,.4);cursor:pointer}
header .dv{height:1px;background:var(--or);flex:0 0 1px}
header.top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.av{width:44px;height:44px;border-radius:22px;border:0;background:var(--ink);color:#fff;font-weight:700;cursor:pointer}
.hscroll{display:flex;gap:12px;overflow-x:auto;margin:0 -16px;padding:0 16px 4px}
.hscroll>button{flex:0 0 150px;text-align:left;border:0;cursor:pointer}

/* ---------- ajouts de l'application réelle ---------- */
.ico-px{display:inline-block;background:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}
#toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%) translateY(20px);background:#0F2747;color:#fff;padding:12px 18px;border-radius:16px;font-size:14px;font-weight:600;opacity:0;pointer-events:none;transition:all .2s;z-index:50;max-width:90%;text-align:center}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
#toast.err{background:#C2410C}
.load{display:flex;align-items:center;justify-content:center;min-height:60vh;color:var(--mut)}
.login{display:flex;flex-direction:column;gap:16px;padding:20px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.txrow{display:flex;gap:10px;align-items:center;min-height:48px}
.txrow .l{flex:1 1 0;min-width:0}.txrow .l b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.neg{color:var(--ink)}.pos{color:var(--ok)}
select.i{appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,#5E6B80 50%),linear-gradient(135deg,#5E6B80 50%,transparent 50%);background-position:calc(100% - 20px) 19px,calc(100% - 14px) 19px;background-size:6px 6px;background-repeat:no-repeat}
.fl{display:flex;flex-wrap:wrap;gap:8px}
details.card>summary{cursor:pointer;font-weight:700;font-size:16px;min-height:28px;list-style:none;display:flex;justify-content:space-between;align-items:center}
details.card>summary::-webkit-details-marker{display:none}
details.card>summary::after{content:"＋";font-weight:400;color:var(--mut)}
details.card[open]>summary::after{content:"－"}
.num{font-variant-numeric:tabular-nums}

input[type=date].i{display:block;text-align:left;min-height:44px}
