:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#172d40;background:#f3f6f7;font-synthesis:none}*{box-sizing:border-box}body{margin:0}a{color:inherit}button,input,select{font:inherit}.wrap{width:min(1100px,calc(100% - 32px));margin:auto}.top{background:#142b40;color:white}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:68px;gap:10px}.brand{font-weight:750;font-size:1.15rem;text-decoration:none}.quiet{background:transparent;border:1px solid #7891a3;color:#fff}.hero{background:#173a50;color:white;border-radius:19px;padding:40px;margin:28px 0}.hero.small{padding:28px}.hero h1{font-size:clamp(1.8rem,4vw,2.8rem);margin:8px 0 14px}.hero p{color:#d8e4eb;max-width:630px}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:.75rem;font-weight:700}.columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;margin-top:25px}.panel{background:#fff;border:1px solid #e2e9ed;border-radius:16px;padding:23px;margin-bottom:20px;box-shadow:0 3px 10px #14344908}.panel h2{margin:0 0 17px;font-size:1.26rem}.panel h3{margin:24px 0 12px;font-size:1rem}.panel form{display:grid;gap:13px}label{font-size:.9rem;font-weight:600;display:grid;gap:7px}input,select{width:100%;padding:12px;border:1px solid #b9c8cf;border-radius:10px;background:#fff;min-width:0}input:focus,select:focus{outline:2px solid #2d839c;outline-offset:1px}button{padding:11px 17px;border:0;border-radius:10px;background:#087c87;color:#fff;font-weight:700;cursor:pointer}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:not-allowed}.project-list{display:grid;gap:5px}.project-list a{padding:11px;text-decoration:none;border-radius:9px}.project-list a:hover,.project-list a.active{background:#dceff1;color:#075d68}.inline-form,.expense-form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}.inline-form button,.expense-form button{grid-column:1/-1}.stat{display:inline-grid;gap:4px;padding:13px 22px;border-radius:10px;background:#ffffff19}.stat strong{font-size:1.8rem}.muted,.hint{color:#697984}.hint{font-size:.86rem;line-height:1.5}.scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:right;white-space:nowrap}td,th{border-bottom:1px solid #e6edef;padding:11px 8px}td:first-child,th:first-child{text-align:left}.positive{color:#137e68;font-weight:700}.negative{color:#ba5d40;font-weight:700}.expense-list{margin-top:18px}.expense{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #e9edef}.expense p{font-size:.85rem;color:#71808a;margin:4px 0}.expense-right{text-align:right;display:grid;gap:7px}.delete{background:none;color:#ab4936;font-size:.77rem;padding:0;border-radius:0}.error{margin-top:18px;padding:14px;background:#fcece9;border-left:4px solid #c34838;border-radius:8px}footer{color:#6c7a86;font-size:.8rem;padding:30px 0 50px}@media(max-width:750px){.layout,.columns{grid-template-columns:1fr}.layout{gap:0}.hero{padding:27px 22px}.panel{padding:18px}.expense-form{grid-template-columns:1fr}.topbar{min-height:60px}.brand{font-size:1rem}}

/* V1.1 — identité visuelle iPhone, lisibilité et couvertures privées */
.brand{display:inline-flex;align-items:center;gap:11px}.brand-icon{width:42px;height:42px;border-radius:12px;object-fit:cover}.top{background:#133246}.wrap{width:min(1140px,calc(100% - 32px))}.welcome{text-align:center;max-width:760px;margin:35px auto 25px;padding:10px 8px}.welcome-logo{width:104px;height:104px;border-radius:25px;box-shadow:0 12px 28px #173a5033}.welcome .eyebrow{color:#087c87;margin-top:24px}.welcome h1{font-size:clamp(2rem,4.5vw,3rem);line-height:1.13;letter-spacing:-.035em;margin:11px auto}.welcome>p:last-child{max-width:560px;margin:14px auto;color:#536b7b;font-size:1.08rem;line-height:1.6}.auth-panel{max-width:500px;margin:0 auto 40px;padding:28px}.auth-panel h2{margin:22px 0 18px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;border-radius:12px;background:#eaf0f1}.auth-tab{border:0;background:transparent;color:#456273;padding:12px;border-radius:9px;font-weight:700}.auth-tab.is-active{background:#fff;color:#075d68;box-shadow:0 1px 5px #142b401c}[hidden]{display:none!important}.auth-panel form>button{margin-top:7px;padding:14px}.project-hero{position:relative;isolation:isolate;overflow:hidden}.project-hero>*{position:relative}.project-hero.with-cover{background:#183748}.project-hero.with-cover:before{content:'';position:absolute;inset:0;z-index:-1;background-size:cover;background-position:center}.project-list a{display:flex;align-items:center;gap:9px;min-height:46px}.project-thumb{width:42px;height:42px;object-fit:cover;border-radius:9px;flex:none}.project-list span{min-width:0;overflow-wrap:anywhere}.topbar .quiet{padding:9px 12px}@media(max-width:750px){.welcome{margin:22px auto 18px}.welcome-logo{width:85px;height:85px;border-radius:22px}.welcome>p:last-child{font-size:1rem}.auth-panel{padding:19px}.brand-icon{width:37px;height:37px}}

/* V1.2 — couleurs des participants */
.person-chip{display:inline-flex;align-items:center;gap:9px;font-weight:650}.person-dot{display:inline-block;width:15px;height:15px;border-radius:50%;border:1px solid #0002;flex:none}.color-editor{margin:18px 0;border-top:1px solid #e5edf0;padding-top:14px}.color-editor summary{cursor:pointer;color:#075d68;font-weight:700}.color-forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin-top:13px}.color-form{border:1px solid #e1e9ed;border-radius:12px;padding:11px;display:flex!important;align-items:end;justify-content:space-between;gap:10px}.color-form label{flex:1;min-width:0}.color-form input[type=color]{padding:2px;height:40px;width:70px;cursor:pointer}.color-form button{font-size:.8rem;padding:10px}

/* V1.2.1 : palette accessible et couleurs rendues avec un style CSP nonce */
.person-dot{width:19px;height:19px;min-width:19px;box-shadow:0 0 0 3px #fff,0 0 0 4px #d5e1e8;border:0}
.person-chip{gap:12px;white-space:normal;line-height:1.3}
.color-editor{border-top:1px solid #e7eff2;padding-top:18px;margin-top:22px}
.color-editor>summary{list-style:none;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:6px 0 14px;cursor:pointer}
.color-editor>summary::-webkit-details-marker{display:none}
.color-editor>summary::before{content:'▸';font-size:18px;color:#07818b}
.color-editor[open]>summary::before{content:'▾'}
.summary-title{flex:1;font-size:1rem;color:#173a50}
.small-note{font-size:.82rem;font-weight:400}
.color-forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:13px;margin:9px 0 15px}
.panel .color-form{display:flex!important;flex-direction:column;align-items:stretch;gap:13px;padding:17px;background:#f9fbfc;border:1px solid #e0e9ee;border-radius:15px}
.color-form-heading{display:flex;align-items:center;gap:11px;min-height:28px}
.color-form-heading strong{line-height:1.3}
.color-palette{display:flex;flex-wrap:wrap;gap:9px}
.color-swatch{height:31px;width:31px;min-width:31px;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #d7e2e8;cursor:pointer;padding:0}
.color-swatch:hover,.color-swatch.is-selected{box-shadow:0 0 0 3px #213b50;filter:none}
.swatch-1{background:#2476CB}.swatch-2{background:#F39A38}.swatch-3{background:#9B5DE5}.swatch-4{background:#17A398}.swatch-5{background:#E66A88}.swatch-6{background:#566BD6}.swatch-7{background:#49A55D}.swatch-8{background:#986F4D}
.color-form-bottom{display:flex;align-items:end;justify-content:space-between;gap:10px}
.color-picker-label{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:600;color:#536c7e}
input[type=color]{display:block;appearance:auto;width:54px;min-width:54px;height:42px;padding:3px;border-radius:10px;cursor:pointer;background:#fff;border:1px solid #b9c8cf}
.color-form input[type=color]{width:54px;height:42px;padding:3px}
.color-form .save-color{flex:0 0 auto;font-size:.85rem;padding:12px 15px}
.inline-form .add-color-label{display:flex;flex-direction:column;align-items:flex-start;justify-content:end}
.inline-form .add-color-label input{max-width:62px}
@media(max-width:750px){.color-editor>summary{flex-wrap:wrap}.small-note{flex-basis:100%;margin-left:28px}.color-forms{grid-template-columns:1fr}.panel .color-form{padding:15px}.person-chip{min-width:160px}}

/* V1.3 — presentation de type application mobile : palette directement sur chaque personne */
:root{--ink:#17344e;--soft:#f5f8fb;--line:#e3eaf1;--accent:#087d91}
body{background:#edf2f7;color:var(--ink);letter-spacing:-.012em}
.top{background:#fff;color:var(--ink);border-bottom:1px solid #e0e7ee;box-shadow:0 1px 8px #12384e09}
.brand{font-size:1.06rem;letter-spacing:-.02em}.topbar .quiet{color:#39546b;border-color:#d8e2e9;background:#f7f9fb}
.layout{grid-template-columns:250px minmax(0,1fr);gap:24px}.panel{border:1px solid #e3eaf1;border-radius:22px;box-shadow:0 8px 30px #1c385610;padding:25px}
.hero{border-radius:23px;box-shadow:0 10px 30px #1b394620}.hero.small{padding:35px}
.project-list a{border-radius:14px;margin-bottom:5px}.project-list a.active{background:#e4f3f7;font-weight:700}
.content{min-width:0}.section-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}.section-header h2{margin:0;font-size:1.42rem;letter-spacing:-.03em}.section-kicker{font-weight:800;font-size:.67rem;letter-spacing:.14em;color:#4a8298;margin:0 0 5px}.count-pill{font-size:.77rem;color:#587182;background:#ecf2f6;padding:8px 11px;border-radius:40px;white-space:nowrap;font-weight:700}
.people-list{display:grid;gap:11px}.person-card{position:relative;border:1px solid #e4ebf2;background:#fbfcff;border-radius:18px;padding:15px 18px;transition:border-color .15s,box-shadow .15s}.person-card:focus-within{border-color:#9ebccf;box-shadow:0 4px 18px #143e5e12}.person-main{display:flex;align-items:center;gap:14px;min-width:0}.person-avatar{position:relative;display:flex;align-items:center;justify-content:center;width:49px;height:49px;border-radius:17px;color:#fff;font-weight:800;font-size:1.28rem;box-shadow:inset 0 -5px 12px #00000017;flex-shrink:0}.person-color-menu{flex:none;position:relative}.person-color-menu>summary{list-style:none;cursor:pointer}.person-color-menu>summary::-webkit-details-marker{display:none}.person-color-menu>summary:focus-visible{outline:3px solid #077d91;outline-offset:4px}.person-edit-mark{position:absolute;right:-6px;bottom:-6px;width:21px;height:21px;font-size:12px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#16445a;border:1px solid #d8e5ec;box-shadow:0 2px 6px #0002}.person-identity{display:grid;gap:4px;min-width:0;flex:1}.person-identity strong{font-size:1rem;line-height:1.25;overflow-wrap:anywhere}.person-identity>span{color:#728697;font-size:.79rem}.person-balance{display:grid;gap:4px;text-align:right;white-space:nowrap}.person-balance strong{font-size:1.13rem;letter-spacing:-.025em}.person-balance span{font-size:.73rem;color:#6e8291}.person-balance.is-credit strong{color:#13806d}.person-balance.is-debit strong{color:#c65c4c}.person-stats{display:flex;gap:20px;border-top:1px solid #e8edf3;margin:12px 0 0 63px;padding-top:10px}.person-stats>span{display:flex;gap:6px;color:#748697;font-size:.78rem}.person-stats strong{color:#38556b;font-weight:700}.color-tip{color:#637b8b;font-size:.81rem;margin:16px 1px 3px}
.person-color-menu[open]{z-index:30}.person-color-popover{position:absolute;top:calc(100% + 12px);left:0;background:#fff;border:1px solid #dfe8f0;border-radius:17px;box-shadow:0 16px 45px #17344e36;width:min(330px,calc(100vw - 65px));padding:17px!important;display:grid!important;gap:14px!important}.person-color-popover>strong{font-size:.93rem;line-height:1.4}.person-color-popover .color-palette{gap:8px}.person-color-popover .color-swatch{width:35px;height:35px;min-width:35px;background:var(--swatch-color);border:3px solid white}.person-color-actions{display:flex;align-items:end;justify-content:space-between;gap:10px}.person-color-actions label{display:flex;align-items:center;gap:8px;font-size:.78rem;color:#617789}.person-color-actions input[type=color]{width:49px;height:40px}.person-color-actions button{font-size:.81rem;padding:12px;background:#087d91}
.panel h3{margin-top:26px}button{background:#087d91;border-radius:12px}input,select{border-radius:12px;border-color:#cedbe6;background:#fcfdff}.stat{border:1px solid #ffffff33;backdrop-filter:blur(4px)}
@media(max-width:750px){.wrap{width:min(100% - 24px,660px)}.layout{display:flex;flex-direction:column;margin-top:15px;gap:3px}.panel{padding:19px;border-radius:20px}.layout aside .panel{padding:17px}.hero.small{padding:26px 22px}.person-card{padding:14px}.person-avatar{width:45px;height:45px;border-radius:15px}.person-main{gap:11px}.person-balance strong{font-size:.99rem}.person-balance span{font-size:.68rem}.person-stats{margin-left:56px;gap:12px;flex-wrap:wrap}.person-stats>span{font-size:.74rem}.section-header{align-items:flex-start}.count-pill{margin-top:3px}}
@media(max-width:390px){.person-main{flex-wrap:wrap}.person-balance{margin-left:56px;text-align:left}.person-stats{margin-left:0}}

.color-swatch[data-color-choice="#2476CB"]{background-color:#2476CB}
.color-swatch[data-color-choice="#F39A38"]{background-color:#F39A38}
.color-swatch[data-color-choice="#9B5DE5"]{background-color:#9B5DE5}
.color-swatch[data-color-choice="#17A398"]{background-color:#17A398}
.color-swatch[data-color-choice="#E66A88"]{background-color:#E66A88}
.color-swatch[data-color-choice="#566BD6"]{background-color:#566BD6}
.color-swatch[data-color-choice="#49A55D"]{background-color:#49A55D}
.color-swatch[data-color-choice="#986F4D"]{background-color:#986F4D}
.color-swatch[data-color-choice="#17A7CF"]{background-color:#17A7CF}
.color-swatch[data-color-choice="#DAAC49"]{background-color:#DAAC49}