:root{--bg:#fbf7f0;--card:#fff;--ink:#0f4544;--text:#181a18;--muted:#727872;--line:#ebe5dc;--teal:#1d8f95;--shadow:0 14px 34px rgba(60,49,35,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text)}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{max-width:900px;margin:auto;min-height:100vh;padding-bottom:108px}#view{padding:0 12px 28px}.hidden{display:none!important}
.topbar{height:66px;display:flex;align-items:center;justify-content:space-between;padding:10px 15px;position:sticky;top:0;z-index:20;background:rgba(251,247,240,.95);backdrop-filter:blur(16px)}.topbar h1{font-size:21px;margin:0}.icon-button{border:0;background:#fff;width:42px;height:42px;border-radius:50%;box-shadow:0 5px 18px rgba(0,0,0,.06);font-size:20px}
.home-head{padding:24px 16px 18px;position:relative}.brand-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:11px}.brand img{width:58px;height:58px;border-radius:15px}.brand-copy strong{display:block;font-family:Georgia,serif;font-style:italic;font-size:33px;color:#0f4b49;line-height:1}.brand-copy small{display:block;text-transform:uppercase;letter-spacing:.055em;color:#6e716f;font-size:9px;margin-top:5px}.head-actions{display:flex;gap:8px}.round{border:0;background:#fff;width:44px;height:44px;border-radius:50%;box-shadow:0 7px 20px rgba(0,0,0,.06);font-size:19px}.date-line{margin-top:34px;font-weight:850;font-size:46px;letter-spacing:-.045em;color:#103f3d;line-height:1}.date-line em{font-family:Georgia,serif;font-weight:500;font-style:italic;color:#2a9bab}.house-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px}.house-pill{border:0;background:#fff;border-radius:999px;padding:11px 17px;display:flex;align-items:center;gap:9px;font-weight:800;font-size:17px;box-shadow:0 7px 22px rgba(0,0,0,.055)}.mini{width:30px;height:30px;border-radius:50%;background:#f1f3f1;display:grid;place-items:center}.tiny-actions{display:flex;gap:8px}
.apps-panel{background:#fff;border-radius:32px;padding:23px 14px 28px;box-shadow:var(--shadow);margin:0 2px}.apps-head{display:flex;align-items:center;justify-content:space-between;margin:0 4px 15px}.apps-head h2{font-size:29px;margin:0;letter-spacing:-.04em}.apps-head button{border:0;background:#f4f2ee;border-radius:999px;padding:10px 13px;font-weight:700}.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.module-card{border:0;border-radius:23px;padding:0;overflow:hidden;text-align:left;min-width:0;background:#f6f3ed;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6)}.module-card .art{width:100%;aspect-ratio:1.18/1;object-fit:cover;display:block}.module-copy{padding:10px 11px 12px;min-height:66px}.module-copy strong{display:block;font-size:16px;line-height:1.08;letter-spacing:-.015em;color:#111}.module-copy small{display:block;margin-top:4px;color:#59605c;font-size:11px;line-height:1.2}.count{float:right;background:#fff;border-radius:999px;padding:3px 7px;font-size:10px;box-shadow:0 2px 7px rgba(0,0,0,.08)}
.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(890px,calc(100% - 8px));height:88px;padding:9px 8px calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);background:rgba(255,255,255,.98);backdrop-filter:blur(18px);border-radius:28px 28px 0 0;box-shadow:0 -7px 28px rgba(40,35,28,.08);z-index:30}.nav-item{border:0;background:transparent;color:#737773;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:22px;border-radius:18px}.nav-item small{font-size:10px}.nav-item.active{color:#0f6668;background:#eef6f2;font-weight:800}.add-main{background:transparent!important}.add-main span{width:58px;height:58px;border-radius:50%;background:linear-gradient(160deg,#3ca8b0,#0b666b);color:#fff;display:grid;place-items:center;font-size:35px;margin-top:-34px;box-shadow:0 9px 22px rgba(21,105,109,.3)}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 16px}.primary,.ghost,.danger{border:0;border-radius:14px;padding:11px 14px;font-weight:800}.primary{background:#146f73;color:#fff}.ghost{background:#eef2ef}.danger{background:#fdeaea;color:#a52d2d}.stack{display:grid;gap:10px}.list{display:grid;gap:10px}.item{border:0;background:#fff;border-radius:18px;padding:13px;width:100%;display:flex;align-items:center;gap:11px;text-align:left;box-shadow:0 6px 18px rgba(0,0,0,.045)}.item img{width:54px;height:46px;object-fit:cover;border-radius:12px}.grow{flex:1}.grow h3{margin:0 0 4px;font-size:15px}.grow p,.grow small{margin:0;color:var(--muted);font-size:12px}.empty,.profile-card,.calendar-shell{background:#fff;border-radius:22px;padding:18px;box-shadow:0 6px 18px rgba(0,0,0,.04)}.empty{text-align:center;color:var(--muted)}.search{width:100%;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}
.sheet{width:min(650px,calc(100% - 18px));border:0;border-radius:26px;padding:0}.sheet::backdrop{background:rgba(0,0,0,.3);backdrop-filter:blur(3px)}.sheet-head{padding:17px 19px 8px;display:flex;align-items:center;justify-content:space-between}.sheet-head h2{margin:2px 0 0}.sheet-head small{color:var(--muted);font-weight:700}.form-grid{padding:8px 19px;display:grid;gap:11px}.field{display:grid;gap:6px}.field label{font-size:12px;font-weight:800;color:var(--muted)}.field input,.field textarea,.field select{border:1px solid var(--line);border-radius:14px;padding:11px;background:#fff}.field textarea{min-height:88px}.sheet-actions{padding:14px 19px 19px;display:flex;gap:9px;justify-content:flex-end}.sheet-actions .danger{margin-right:auto}.quick-grid{padding:9px 17px 22px;display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.quick-btn{border:1px solid var(--line);background:#fff;border-radius:16px;padding:10px;text-align:left;display:flex;gap:8px;align-items:center}.quick-btn img{width:42px;height:34px;object-fit:cover;border-radius:10px}
/* Agenda */
.calendar-wrap{padding-top:10px}.calendar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.calendar-title{font-size:22px;font-weight:850;letter-spacing:-.02em}.calendar-controls{display:flex;gap:7px}.cal-btn{border:0;background:#fff;border-radius:12px;padding:9px 11px;box-shadow:0 4px 14px rgba(0,0,0,.05);font-weight:700}.view-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:#ece8e1;border-radius:14px;padding:4px;margin-bottom:12px}.view-tab{border:0;background:transparent;border-radius:10px;padding:8px 4px;font-size:12px;font-weight:800;color:#656a66}.view-tab.active{background:#fff;color:#0d6366;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dow{text-align:center;color:#858a86;font-size:10px;font-weight:800;padding:6px 0}.day-cell{min-height:84px;border:1px solid #eee9e1;border-radius:12px;background:#fff;padding:6px;position:relative}.day-cell.out{opacity:.38}.day-num{font-size:12px;font-weight:800}.day-cell.today{outline:2px solid #2a9bab}.day-cell.selected{background:#eef8f6}.event-dot{margin-top:4px;border-radius:7px;padding:3px 5px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#dff2ef;color:#0c5f61}.more-dot{font-size:9px;color:#777;margin-top:3px}
.year-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.month-mini{border:0;background:#fff;border-radius:18px;padding:10px;text-align:left;box-shadow:0 4px 14px rgba(0,0,0,.04)}.month-mini strong{display:block;margin-bottom:7px}.mini-days{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.mini-days span{font-size:8px;text-align:center;padding:2px 0;color:#6a716d}.mini-days .has{background:#dff2ef;color:#0b6263;border-radius:5px;font-weight:800}
.week-grid{display:grid;grid-template-columns:62px repeat(7,1fr);min-width:710px}.week-scroll{overflow:auto;border-radius:16px}.week-head-cell,.time-cell,.slot{border-right:1px solid #eee9e1;border-bottom:1px solid #eee9e1;background:#fff;min-height:44px;padding:6px}.week-head-cell{position:sticky;top:0;z-index:2;font-size:10px;font-weight:800;text-align:center}.time-cell{font-size:10px;color:#7b817d}.slot{font-size:9px}.slot-event{background:#dff2ef;border-radius:7px;padding:4px;color:#0d5f61;font-weight:700}.day-agenda{display:grid;gap:8px}.hour-row{display:grid;grid-template-columns:52px 1fr;gap:8px}.hour-label{font-size:11px;color:#7a807c;padding-top:10px}.hour-box{min-height:48px;background:#fff;border:1px solid #eee9e1;border-radius:12px;padding:6px}.event-card{background:#dff2ef;border-radius:9px;padding:7px;font-size:11px;color:#0d5f61;font-weight:700}.agenda-list{margin-top:12px;display:grid;gap:8px}
@media(min-width:720px){.module-grid{grid-template-columns:repeat(3,1fr)}.year-grid{grid-template-columns:repeat(3,1fr)}.home-head{padding-left:30px;padding-right:30px}.apps-panel{padding-left:24px;padding-right:24px}.date-line{font-size:56px}}
@media(max-width:390px){.brand-copy strong{font-size:28px}.brand img{width:49px;height:49px}.date-line{font-size:39px}.apps-head h2{font-size:25px}.module-copy strong{font-size:13px}.module-copy small{font-size:9px}.module-grid{gap:7px}.apps-panel{padding:20px 10px 26px}.module-card{border-radius:19px}.module-copy{min-height:61px}.year-grid{grid-template-columns:1fr 1fr}}
/* Correctifs fonctionnels V7 — sans changement de mise en page */
.apps-total{min-width:34px;height:34px;padding:0 9px;border-radius:999px;background:#f3f1ec;display:grid;place-items:center;font-weight:850;color:#4f5753}
.module-grid{touch-action:pan-y}
.module-card{position:relative}
.module-card:active{transform:scale(.985)}
.today-link{border:0;background:transparent;color:#168086;font-weight:800;padding:4px 0}
.calendar-shell{overflow:hidden}
.week-head-cell[data-date],.slot[data-date],.hour-box[data-date]{cursor:pointer}
/* Centre « Chez nous » V8 — ajout fonctionnel sans modifier la grille d'accueil */
.household-hero{background:linear-gradient(145deg,#edf6f2,#fff7ed);border-radius:26px;padding:20px;margin:10px 0 14px;box-shadow:var(--shadow)}
.household-hero small{display:block;color:#5e7773;font-weight:800;text-transform:uppercase;letter-spacing:.06em;font-size:10px}.household-hero h2{margin:5px 0 6px;font-size:30px;color:#123f3d}.household-hero p{margin:0;color:#68716d;font-size:13px;line-height:1.45}
.household-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.household-menu-card{border:0;background:#fff;border-radius:22px;overflow:hidden;padding:0;text-align:left;box-shadow:0 7px 20px rgba(0,0,0,.045);display:grid;grid-template-columns:78px 1fr 22px;align-items:center;min-height:88px}.household-menu-card img{width:78px;height:88px;object-fit:cover}.household-menu-card div{padding:9px}.household-menu-card strong{display:block;font-size:14px;line-height:1.15}.household-menu-card small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.household-menu-card>span{font-size:26px;color:#9ba09d;padding-right:8px}
.settings-page-head{display:flex;gap:12px;align-items:flex-start;margin:10px 0 14px}.settings-page-head h2{margin:3px 0 4px;font-size:24px}.settings-page-head p{margin:0;color:var(--muted);font-size:12px}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.section-title-row h3{margin:0}.section-title-row small{color:var(--muted)}
.member-list{display:grid;gap:8px}.member-card{width:100%;border:1px solid var(--line);background:#fff;border-radius:17px;padding:10px;display:flex;align-items:center;gap:10px;text-align:left}.member-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#e8f4f1;color:#0e6466;font-weight:900;font-size:18px}.member-card strong{display:block}.member-card small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.member-card>span{font-size:24px;color:#a1a6a2}.member-editor{margin-top:10px}
.inline-form{padding:0;grid-template-columns:repeat(2,minmax(0,1fr))}.inline-form .field span{font-size:12px;font-weight:800;color:var(--muted)}.inline-form .full{grid-column:1/-1}.settings-note{font-size:11px;line-height:1.4;color:var(--muted);margin:8px 0 0}
.app-toggle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.app-toggle{position:relative;border:1px solid var(--line);background:#faf9f6;border-radius:17px;padding:7px 44px 7px 7px;display:grid;grid-template-columns:54px 1fr;gap:8px;align-items:center;min-height:64px;transition:.15s}.app-toggle.on{background:#eff8f5;border-color:#cce7e1}.app-toggle img{width:54px;height:50px;border-radius:12px;object-fit:cover}.app-toggle strong{display:block;font-size:12px;line-height:1.1}.app-toggle small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.app-toggle input,.toggle-row input{position:absolute;opacity:0;pointer-events:none}.switch{position:absolute;right:10px;width:32px;height:19px;border-radius:999px;background:#d5d8d5;transition:.2s}.switch::after{content:"";position:absolute;width:15px;height:15px;border-radius:50%;background:#fff;top:2px;left:2px;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:.2s}.app-toggle input:checked+.switch,.toggle-row input:checked+.switch{background:#238a8c}.app-toggle input:checked+.switch::after,.toggle-row input:checked+.switch::after{transform:translateX(13px)}.mini-toggle-actions{display:flex;gap:6px}
.toggle-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:50px;background:#f8f7f3;border:1px solid var(--line);border-radius:17px;padding:12px 52px 12px 12px;margin-bottom:14px}.toggle-row strong{display:block;font-size:13px}.toggle-row small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.toggle-row .switch{right:12px;top:50%;transform:translateY(-50%)}
.weather-widget{margin-top:15px;border-radius:22px;background:linear-gradient(145deg,#dff3f2,#f7eee3);padding:14px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 8px 22px rgba(19,88,89,.08)}.weather-loading{color:#54706e;font-weight:700;font-size:12px}.weather-main{display:flex;align-items:center;gap:10px}.weather-icon{font-size:34px}.weather-main strong{display:block;font-size:28px;color:#123f3d;line-height:1}.weather-main small,.weather-side small{display:block;color:#5f6c68;font-size:10px;margin-top:4px}.weather-side{text-align:right}.weather-side strong{font-size:12px}.weather-error{border:0;background:transparent;color:#116d70;font-weight:800;width:100%;text-align:left}
@media(max-width:470px){.household-menu{grid-template-columns:1fr}.app-toggle-grid{grid-template-columns:1fr}.inline-form{grid-template-columns:1fr}.inline-form .full{grid-column:auto}.weather-widget{align-items:flex-start}.weather-side{max-width:42%}.settings-page-head{display:block}.settings-page-head .ghost{margin-bottom:8px}}
/* V9 — météo liée au foyer + courses rapides, sans modifier l'accueil */
.weather-home-address{background:#f8f7f3;border:1px solid var(--line);border-radius:17px;padding:13px;margin:10px 0}.weather-home-address span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:850}.weather-home-address strong{display:block;margin-top:5px;color:#123f3d;font-size:14px;line-height:1.35}.weather-home-address small{display:block;margin-top:4px;color:var(--muted);font-size:10px}.weather-side small:first-of-type{max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grocery-current,.grocery-quick{background:#fff;border-radius:22px;padding:16px;box-shadow:0 6px 18px rgba(0,0,0,.04);margin-bottom:12px}.grocery-current h3,.grocery-quick h2{margin:0}.grocery-list{display:grid;gap:7px}.grocery-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto 30px;align-items:center;gap:8px;padding:8px;border:1px solid var(--line);border-radius:15px;background:#fff}.grocery-row.done{opacity:.55}.grocery-row.done .grocery-name strong{text-decoration:line-through}.grocery-check{width:30px;height:30px;border:2px solid #b8c9c5;border-radius:50%;background:#fff;color:#0b7274;font-weight:900}.grocery-row.done .grocery-check{background:#dff2ef;border-color:#69aaa4}.grocery-name strong{display:block;font-size:13px}.grocery-name small{display:block;font-size:9px;color:var(--muted);margin-top:2px}.grocery-qty{display:flex;align-items:center;gap:4px;background:#f4f3ef;border-radius:999px;padding:3px}.grocery-qty button{width:25px;height:25px;border:0;border-radius:50%;background:#fff;font-weight:900;color:#176e70}.grocery-qty span{min-width:18px;text-align:center;font-size:11px;font-weight:850}.grocery-delete{border:0;background:transparent;color:#a0a5a1;font-size:20px}.grocery-quick-head{display:grid;gap:8px;margin-bottom:12px}.grocery-quick-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.grocery-group{margin:14px 0 0}.grocery-group h3{font-size:12px;color:#52615d;margin:0 0 7px}.grocery-preset-grid{display:flex;flex-wrap:wrap;gap:7px}.grocery-preset{border:1px solid #dfe8e5;background:#f4faf8;color:#164e4d;border-radius:999px;padding:8px 10px;font-size:11px;font-weight:750}.grocery-preset:active{transform:scale(.97);background:#e4f4ef}
@media(max-width:390px){.grocery-row{grid-template-columns:32px minmax(0,1fr) auto 26px;gap:5px}.grocery-qty button{width:23px;height:23px}.grocery-preset{padding:7px 9px;font-size:10px}}

/* V10 — Courses par rayons */
.grocery-category-nav{display:flex;gap:7px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none}.grocery-category-nav::-webkit-scrollbar{display:none}.grocery-cat{flex:0 0 auto;border:1px solid #dfe8e5;background:#fff;border-radius:999px;padding:8px 10px;font-size:10px;font-weight:800;color:#52615d;display:flex;align-items:center;gap:5px}.grocery-cat.active{background:#173f3e;color:#fff;border-color:#173f3e}.grocery-group h3{display:flex;align-items:center;gap:6px}.grocery-list-groups{display:grid;gap:14px}.grocery-list-group h4{margin:0 0 7px;font-size:11px;color:#61716c;display:flex;align-items:center;gap:6px}

/* V10 — Coffre Documents */
.vault-lock,.vault-head,.vault-drop,.vault-list{background:#fff;border-radius:22px;box-shadow:0 6px 18px rgba(0,0,0,.04)}.vault-lock{padding:28px 20px;text-align:center}.vault-lock img{width:84px;height:84px;object-fit:contain;margin-bottom:8px}.vault-lock h2{margin:4px 0 6px}.vault-lock p{margin:0 auto 16px;max-width:420px;color:var(--muted);font-size:12px;line-height:1.55}.vault-lock small{display:block;margin-top:10px;color:var(--muted);font-size:10px}.vault-main{min-width:220px}.vault-head{padding:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.vault-head h2{margin:0;font-size:18px}.vault-head p{margin:3px 0 0;color:var(--muted);font-size:10px}.vault-upload{cursor:pointer;white-space:nowrap}.vault-category-row{display:flex;gap:7px;overflow-x:auto;padding:12px 1px;scrollbar-width:none}.vault-category-row::-webkit-scrollbar{display:none}.vault-cat{flex:0 0 auto;border:1px solid #dfe8e5;background:#fff;border-radius:999px;padding:8px 10px;font-size:10px;font-weight:800;color:#52615d}.vault-cat.active{background:#173f3e;color:#fff;border-color:#173f3e}.vault-drop{border:2px dashed #cddbd7;padding:22px 14px;text-align:center;margin-bottom:12px;cursor:pointer;transition:.15s}.vault-drop.drag{background:#edf8f5;border-color:#4d918b}.vault-drop strong{display:block;font-size:13px}.vault-drop span{display:block;color:var(--muted);font-size:10px;margin-top:4px}.vault-list{padding:8px;display:grid;gap:7px}.vault-item{display:grid;grid-template-columns:40px minmax(0,1fr) auto 28px;gap:8px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:15px}.vault-file-icon{width:38px;height:38px;border-radius:12px;background:#f1f5f3;display:grid;place-items:center;font-size:19px}.vault-item strong{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vault-item small{display:block;margin-top:2px;color:var(--muted);font-size:9px}.vault-del{border:0;background:transparent;color:#a0a5a1;font-size:20px}
@media(max-width:390px){.vault-item{grid-template-columns:36px minmax(0,1fr) auto 24px}.vault-item .ghost{padding:7px;font-size:9px}.vault-file-icon{width:34px;height:34px}}

/* V11 — repères visuels individuels dans Courses */
.grocery-preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.grocery-preset{min-height:76px;border-radius:16px;padding:8px 5px;display:grid;grid-template-rows:34px auto;grid-template-columns:1fr auto;align-items:center;text-align:left;position:relative}.grocery-item-icon{grid-column:1/3;display:grid;place-items:center;font-size:27px;line-height:1}.grocery-item-label{font-size:10px;font-weight:800;line-height:1.08;min-width:0}.grocery-item-plus{font-size:16px;font-weight:900;color:#176e70;align-self:end}.grocery-row{grid-template-columns:32px 38px minmax(0,1fr) auto 30px}.grocery-row-icon{width:38px;height:38px;border-radius:12px;background:#f4f7f5;display:grid;place-items:center;font-size:23px}.grocery-row.done .grocery-row-icon{filter:grayscale(.7)}
@media(max-width:390px){.grocery-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.grocery-preset{min-height:72px;padding:7px 5px}.grocery-item-icon{font-size:25px}.grocery-item-label{font-size:9px}.grocery-row{grid-template-columns:29px 34px minmax(0,1fr) auto 25px;gap:5px}.grocery-row-icon{width:34px;height:34px;font-size:21px}}
