
:root{
  color-scheme:light;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,system-ui,sans-serif;
  color:#1d1d1f;background:#f5f5f7;font-synthesis:none;
  --bg:#f5f5f7;--card:rgba(255,255,255,.96);--line:#d2d2d7;--muted:#6e6e73;
  --text:#1d1d1f;--accent:#007aff;--accent-soft:#eaf3ff;--danger:#ff3b30;
  --danger-soft:#fff0f0;--success:#34c759;--success-soft:#ecf9ef;
  --shadow:0 10px 32px rgba(43,48,76,.07)
}
*{box-sizing:border-box}
html{min-height:100%;background:#f5f5f7}
body{margin:0;min-height:100dvh;background:linear-gradient(145deg,#f5f5f7 0%,#f7f7f8 42%,#f2f2f4 100%);color:var(--text)}
button,input,textarea,select{font:inherit}button{border:0;color:inherit}
.shell{min-height:100dvh}
.main{width:100%;max-width:760px;margin:0 auto;padding:calc(18px + env(safe-area-inset-top)) 26px calc(98px + env(safe-area-inset-bottom))}
.top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}
.brand-header{display:flex;align-items:center;gap:13px}
.brand-mark{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#f8f8fa,#eef4ff);border:1px solid #d2d2d7;box-shadow:0 5px 16px rgba(70,75,110,.08)}
.brand-mark svg{width:22px;height:22px;color:#1d1d1f;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.brand-mark svg *{vector-effect:non-scaling-stroke}
.brand-copy{display:grid;gap:2px}
.brand-name{font-size:20px;font-weight:800;letter-spacing:-.025em}
.brand-sub{font-size:14px;color:var(--muted)}
.page-heading{font-size:30px;font-weight:750;letter-spacing:-.035em;margin:-2px 0 18px}.title{display:flex;align-items:center;gap:11px;font-size:31px;font-weight:800;letter-spacing:-.045em}
.title .icon{width:48px;height:48px;border-radius:16px;background:#f2f2f7;border-color:#d2d2d7;box-shadow:none}
.title .icon svg{width:25px;height:25px;color:#5d6684}
.icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.icon svg,.nav svg,.btn svg,.admin-row svg,.choice svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.top-actions{display:flex;align-items:center;gap:8px}
.icon-btn{width:42px;height:42px;padding:0;border-radius:13px;background:#fff;border:1px solid var(--line);color:#1d1d1f;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(50,55,80,.035);cursor:pointer}
.icon-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.icon-btn:active{transform:scale(.97)}
.logout-btn{color:#ff3b30;background:#fffafa;border-color:#f1d6d3}

.btn{min-height:46px;padding:0 16px;border-radius:15px;background:#fff;border:1px solid var(--line);font-weight:700;cursor:pointer;box-shadow:0 4px 14px rgba(50,55,80,.035);display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.primary{background:#007aff;color:#fff;border-color:#007aff}
.btn.danger{background:var(--danger-soft);color:var(--danger);border-color:#f1d6dc}
.glass{background:var(--card);border:1px solid rgba(224,227,236,.96);box-shadow:var(--shadow);border-radius:25px}
.stack{display:grid;gap:16px}
.hours-list{display:grid;gap:12px}
.card{padding:22px}
.muted{color:var(--muted)}
.progress-head{display:flex;justify-content:space-between;font-weight:750;margin:0 4px 9px}
.progress{height:10px;background:#e8eaf0;border-radius:99px;overflow:hidden}
.progress>span{display:block;height:100%;background:#43c786;border-radius:99px;transition:width .25s ease}
.category{overflow:hidden}
.cat-head{width:100%;background:transparent;padding:20px 20px;display:flex;align-items:center;gap:11px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.cat-name{font-weight:780;font-size:17px}.cat-count{color:var(--muted);font-size:14px}
.chev{margin-left:auto;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#7f8494;background:#f5f6fa;transition:transform .2s ease,background .2s ease;color:#7f8494}
.chev svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cat-head:active .chev{background:#eceef4}
.collapsed .chev{transform:rotate(-90deg)}
.category.collapsed>div:not(.cat-head){display:none}
.task{display:flex;gap:12px;align-items:flex-start;padding:15px 20px;border-top:1px solid #e9ebf0}
.task input{appearance:none;width:23px;height:23px;border:1.5px solid #b8bdca;border-radius:8px;margin-top:1px;flex:0 0 auto;background:#fff}
.task input:checked{background:var(--success);border-color:var(--success);position:relative}
.task input:checked:after{content:"✓";display:block;text-align:center;font-size:15px;font-weight:900;color:#fff}
.task.done .task-title{text-decoration:line-through;color:#969aa8}.task-title{font-weight:650}
.task-desc{font-size:13px;color:var(--muted);margin-top:3px}
.hours-card{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:18px 19px;min-height:112px;border-radius:20px}
.hours-card-main{min-width:0}
.hours-name{font-size:18px;font-weight:700;letter-spacing:-.015em}
.hours-total{font-size:32px;line-height:1.05;font-weight:750;letter-spacing:-.035em;margin-top:5px}
.hours-eur{color:var(--muted);font-size:14px;margin-top:3px}
.detail{min-height:42px;padding:0 15px;border-radius:13px;background:#f2f2f7;border:1px solid #d2d2d7;color:#007aff;font-size:15px;font-weight:600}
.row{display:flex;justify-content:space-between;gap:12px}
.form{display:grid;gap:14px}.field{display:grid;gap:8px}
.field label{font-size:13px;color:var(--muted);font-weight:700}
.input,.textarea,.select{width:100%;min-height:48px;padding:0 14px;border-radius:15px;border:1px solid #dfe2ea;outline:0;background:#fff;color:var(--text)}
.category-picker{position:relative}.select-like{width:100%;min-height:50px;padding:0 14px;border-radius:15px;border:1px solid #dfe2ea;background:#fff;color:var(--text);display:flex;align-items:center;justify-content:space-between;text-align:left;font-weight:500;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.02)}.select-like:active{background:#f5f5f7}.select-like svg{width:18px;height:18px;color:#8b8f98;transition:transform .18s ease}.select-like[aria-expanded="true"] svg{transform:rotate(180deg)}.category-menu{position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:30;padding:6px;background:rgba(255,255,255,.98);border:1px solid #d2d2d7;border-radius:16px;box-shadow:0 12px 34px rgba(0,0,0,.14);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.category-option{width:100%;min-height:44px;padding:0 11px;border-radius:11px;background:transparent;display:flex;align-items:center;justify-content:space-between;text-align:left;color:var(--text);cursor:pointer}.category-option:active{background:#f2f2f7}.category-option svg{width:18px;height:18px;color:#007aff;opacity:0}.category-option.selected{background:#f2f2f7}.category-option.selected svg{opacity:1}.cancel-btn{background:#fff;color:#1d1d1f;border-color:#d2d2d7}

.textarea{padding-top:12px;min-height:92px;resize:vertical}
.input:focus,.textarea:focus,.select:focus{border-color:#007aff;box-shadow:0 0 0 3px rgba(0,122,255,.16)}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.nav{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);width:min(720px,calc(100% - 28px));
padding:6px;min-height:62px;background:rgba(255,255,255,.96);border:1px solid #e1e4ec;border-radius:20px;
display:flex;gap:4px;z-index:10;box-shadow:0 10px 30px rgba(45,50,75,.12);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.nav button{flex:1;min-height:50px;background:transparent;color:#858997;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.nav button.active{background:#eaf3ff;color:var(--accent)}
.nav svg{width:20px;height:20px;stroke-width:1.9}.nav .small{font-size:11px;font-weight:650;line-height:1}
.nav .admin{color:#6e6e73}.nav .admin.active{color:var(--accent)}
.nav button:active{transform:scale(.98)}
.login{min-height:100dvh;display:grid;place-items:center;padding:24px;background:var(--bg)}
.login-card{width:min(430px,100%);padding:32px;border-radius:28px}
.brand{text-align:center;margin-bottom:27px}.brand h1{font-size:40px;margin:0;letter-spacing:-.05em}.brand p{color:var(--muted);margin:8px 0 0}
.empty{padding:32px;text-align:center;color:var(--muted)}
.toggle{width:52px;height:32px;border-radius:99px;background:#d5d8de;padding:3px;cursor:pointer}
.toggle span{display:block;width:26px;height:26px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 2px 5px rgba(0,0,0,.12)}
.toggle.on{background:var(--success)}.toggle.on span{transform:translateX(20px)}
.notif{padding:18px;display:grid;gap:11px}.notif-title{font-weight:750}.notif-meta{font-size:13px;color:var(--muted)}
.danger-text{color:var(--danger)}
.toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);z-index:20;background:#1d1d1f;color:#fff;padding:13px 17px;border-radius:15px;box-shadow:0 15px 50px rgba(0,0,0,.18)}
.small{font-size:13px}.choice{display:grid;gap:10px}
.choice button{padding:16px;border-radius:16px;background:#fff;border:1px solid var(--line);text-align:left;display:flex;align-items:center;gap:10px}
.section-title{font-size:18px;font-weight:800;margin:4px 2px}.detail-row{padding:13px 0;border-bottom:1px solid var(--line)}.detail-row:last-child{border-bottom:0}
.admin-list{display:grid;gap:16px}.admin-row-card{width:100%;min-height:96px;padding:18px 20px;display:flex;align-items:center;gap:15px;text-align:left;cursor:pointer}
.admin-row-card .admin-icon{width:52px;height:52px;border-radius:17px;background:#eaf3ff;color:#007aff;display:grid;place-items:center;flex:0 0 auto}
.admin-row-card .admin-icon svg{width:25px;height:25px}
.admin-row-card .admin-copy{display:grid;gap:4px}.admin-row-card .admin-copy b{font-size:17px}.admin-row-card .admin-copy span{font-size:13px;color:var(--muted)}
.admin-row-card .arrow{margin-left:auto;color:#8b8fa0;font-size:25px}
.admin-row-card.danger{background:#fffafa;border-color:#f1d6d3}.admin-row-card.danger .admin-icon{background:#fff0f0;color:#ff3b30}
.detail-back{background:#fff}
@media(min-width:700px){.main{padding-top:30px}}

.account-admin{position:relative;padding-top:42px;border-color:#d2d2d7}.account-role{position:absolute;top:16px;left:22px;font-size:11px;font-weight:800;letter-spacing:.08em;color:#007aff}

/* Administration — Apple-style settings */
.admin-header{margin-bottom:20px;align-items:flex-start}
.admin-heading{display:flex;align-items:center;gap:14px}
.admin-title-icon{width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:#f2f2f7;border:1px solid #d2d2d7;color:#1d1d1f;box-shadow:0 5px 16px rgba(50,55,80,.06)}
.admin-title-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-kicker{font-size:11px;font-weight:800;letter-spacing:.08em;color:#8b8b90;margin-bottom:2px}
.admin-page-heading{margin:0;font-size:30px}
.admin-settings{display:grid;gap:0}
.admin-section-label{font-size:12px;font-weight:700;color:#6e6e73;letter-spacing:.02em;margin:7px 20px 8px}
.admin-group{background:#fff;border:1px solid #e1e1e6;border-radius:18px;overflow:hidden;box-shadow:0 5px 18px rgba(43,48,76,.045);margin-bottom:18px}
.admin-setting-row{width:100%;min-height:76px;padding:13px 15px 13px 14px;background:#fff;display:flex;align-items:center;gap:13px;text-align:left;cursor:pointer}
.admin-setting-row+.admin-setting-row{border-top:1px solid #e7e7eb}
.admin-setting-row:active{background:#f2f2f7}
.setting-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}
.setting-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.setting-icon.blue{background:#eaf3ff;color:#007aff}.setting-icon.green{background:#ecf9ef;color:#34c759}.setting-icon.orange{background:#fff4e5;color:#ff9500}.setting-icon.red{background:#fff0f0;color:#ff3b30}.setting-icon.gray{background:#f2f2f7;color:#6e6e73}.setting-icon.purple{background:#f2f2f7;color:#6e6e73}
.setting-copy{display:grid;gap:3px;min-width:0}
.setting-copy b{font-size:16px;font-weight:650;letter-spacing:-.01em}
.setting-copy span{font-size:13px;color:#6e6e73;line-height:1.25}
.setting-chevron{margin-left:auto;color:#8e8e93;transform:rotate(180deg);display:grid;place-items:center;flex:0 0 auto}
.setting-chevron svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.danger-row .setting-copy b{color:#ff3b30}
.admin-empty{padding:24px 18px;text-align:center;color:#6e6e73;font-size:14px}
.subpage-header{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.subpage-title{font-size:24px;font-weight:750;letter-spacing:-.03em}
.admin-form-card{padding:20px}
.choice-picker{display:grid;gap:8px}
.choice-option{position:relative;min-height:50px;padding:0 14px;border:1px solid #d2d2d7;border-radius:14px;background:#fff;display:flex;align-items:center;gap:10px;cursor:pointer;transition:.12s ease}
.choice-option:active{background:#f2f2f7}
.choice-option input{position:absolute;opacity:0;pointer-events:none}
.choice-option.selected{border-color:#007aff;background:#f0f7ff;box-shadow:inset 0 0 0 1px #007aff}
.choice-check{margin-left:auto;width:22px;height:22px;color:#007aff;opacity:0;display:grid;place-items:center}
.choice-option.selected .choice-check{opacity:1}
.choice-check svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.hour-edit-list .admin-setting-row{min-height:70px}
@media(max-width:520px){.admin-section-label{margin-left:16px}.admin-setting-row{min-height:72px;padding-left:12px}.setting-icon{width:40px;height:40px}.setting-copy b{font-size:15px}.setting-copy span{font-size:12px}.subpage-title{font-size:22px}}

/* V0.14 — détails Apple */
.hours-total{font-size:27px;font-weight:650;letter-spacing:-.025em}
.hours-eur{font-size:13px}
.notif{padding:17px 18px;gap:10px}
.notif-title{font-size:16px;font-weight:600;letter-spacing:-.01em;line-height:1.25}
.notif-meta{font-size:12px;font-weight:400;line-height:1.45;color:#8a8a8f}
.notif .actions .btn{font-size:13px;font-weight:500;min-height:38px;padding:0 13px;border-radius:12px}
.notif .toggle{width:48px;height:30px}.notif .toggle span{width:24px;height:24px}.notif .toggle.on span{transform:translateX(18px)}
.hour-list{display:grid;gap:9px}
.hour-record{background:#fff;border:1px solid #e1e1e6;border-radius:16px;min-height:70px;padding:12px 13px 12px 15px;display:flex;align-items:center;gap:10px;box-shadow:0 4px 14px rgba(43,48,76,.035)}
.hour-record-main{min-width:0;display:grid;gap:5px}.hour-record-name{font-size:15px;font-weight:600;letter-spacing:-.01em}.hour-record-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#8a8a8f;font-size:12px}.hour-type{font-weight:600}.hour-type.arrival{color:#34c759}.hour-type.departure{color:#007aff}
.hour-record-actions{margin-left:auto;display:flex;gap:6px;flex:0 0 auto}.mini-action{width:38px;height:38px;border:1px solid #e1e1e6;background:#f5f5f7;color:#007aff;border-radius:11px;display:grid;place-items:center;cursor:pointer}.mini-action svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mini-action.delete{color:#ff3b30;background:#fff5f5;border-color:#f2d5d2}.mini-action:active{transform:scale(.96)}
.task-delete-list{overflow:hidden}.task-delete-row{cursor:pointer}.task-delete-row .setting-copy{padding-right:4px}.task-delete-row .setting-copy span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.apple-check{appearance:none;width:22px;height:22px;border:1.5px solid #b8bdc7;border-radius:7px;background:#fff;flex:0 0 auto;position:relative;cursor:pointer}.apple-check:checked{background:#007aff;border-color:#007aff}.apple-check:checked:after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:14px;font-weight:700}.full-delete{width:100%;min-height:46px;display:flex;align-items:center;justify-content:center;gap:8px}.full-delete svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}


/* V0.15 — contrôles de date/heure contenus dans la carte */
.admin-form-card .field{min-width:0;max-width:100%}
.admin-form-card .input[type="date"],
.admin-form-card .input[type="time"]{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  display:block;
}
.admin-form-card .choice-picker{width:100%;max-width:100%;min-width:0}
.admin-form-card .choice-option{width:100%;max-width:100%;min-width:0;overflow:hidden}
.admin-form-card .choice-option span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* V0.17 — finitions iPhone / Apple */
.task-delete-row .setting-copy{flex:1 1 auto;min-width:0}
.task-delete-row .apple-check{margin-left:auto}

/* Notifications : interrupteur Apple plus fin et plus lisible */
.notif .toggle{width:52px;height:32px;padding:3px;border:0;border-radius:999px;background:#d1d1d6;box-shadow:inset 0 0 0 1px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.04)}
.notif .toggle span{width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.16);transition:transform .2s ease}
.notif .toggle.on{background:#34c759}
.notif .toggle.on span{transform:translateX(20px)}


/* Date / heure iOS : aucune largeur intrinsèque ne doit dépasser la carte */
.admin-form-card .field{width:100%;min-width:0;overflow:hidden}
.admin-form-card .input[type="date"],
.admin-form-card .input[type="time"]{
  width:100%;inline-size:100%;min-width:0;max-width:100%;
  box-sizing:border-box;display:block;
  -webkit-appearance:none;appearance:none;
  overflow:hidden;
}

/* Navigation plus étroite + zone de sécurité sous le contenu */
.nav-backdrop{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(760px,calc(100% - 28px));height:calc(70px + env(safe-area-inset-bottom));background:linear-gradient(to bottom,rgba(245,245,247,0) 0%,rgba(245,245,247,.72) 38%,#f5f5f7 68%,#f5f5f7 100%);z-index:9;pointer-events:none}
.nav{width:min(720px,calc(100% - 56px))}
.main{padding-bottom:calc(150px + env(safe-area-inset-bottom))}

.admin-logout-group{margin-bottom:calc(8px + env(safe-area-inset-bottom))}


/* V0.23 — Réglages utilisateur, préférences locales et thème nuit */
:root[data-font-size="small"]{font-size:14px}
:root[data-font-size="standard"]{font-size:16px}
:root[data-font-size="large"]{font-size:18px}
:root[data-font-size="small"] .page-heading{font-size:27px}
:root[data-font-size="large"] .page-heading{font-size:33px}
:root[data-font-size="small"] .cat-name{font-size:16px}
:root[data-font-size="large"] .cat-name{font-size:18px}
:root[data-font-size="small"] .task-title{font-size:14px}
:root[data-font-size="large"] .task-title{font-size:18px}
:root[data-font-size="small"] .nav .small{font-size:10px}
:root[data-font-size="large"] .nav .small{font-size:12px}

:root[data-font-size="small"] .settings-page-heading{font-size:27px}
:root[data-font-size="small"] .settings-kicker{font-size:10px}
:root[data-font-size="small"] .settings-section-label{font-size:11px}
:root[data-font-size="small"] .settings-copy b{font-size:15px}
:root[data-font-size="small"] .settings-copy span{font-size:12px}
:root[data-font-size="small"] .settings-notif-note{font-size:11px}
:root[data-font-size="small"] .segmented button{font-size:12px}
:root[data-font-size="small"] .settings-icon{width:40px;height:40px}
:root[data-font-size="large"] .settings-page-heading{font-size:33px}
:root[data-font-size="large"] .settings-kicker{font-size:12px}
:root[data-font-size="large"] .settings-section-label{font-size:13px}
:root[data-font-size="large"] .settings-copy b{font-size:18px}
:root[data-font-size="large"] .settings-copy span{font-size:15px}
:root[data-font-size="large"] .settings-notif-note{font-size:13px}
:root[data-font-size="large"] .segmented button{font-size:15px}
:root[data-font-size="large"] .settings-icon{width:44px;height:44px}
.settings-header{margin-bottom:20px;align-items:flex-start}
.settings-heading{display:flex;align-items:center;gap:14px}
.settings-title-icon{width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:#f2f2f7;border:1px solid #d2d2d7;color:#1d1d1f;box-shadow:0 5px 16px rgba(50,55,80,.06);flex:0 0 auto}
.settings-title-icon svg{display:block;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-kicker{font-size:11px;font-weight:800;letter-spacing:.08em;color:#8b8b90;margin-bottom:2px}
.settings-page-heading{margin:0;font-size:30px}
.settings-groups{display:grid;gap:0}
.settings-section-label{font-size:12px;font-weight:700;color:#6e6e73;letter-spacing:.02em;margin:7px 20px 8px}
.settings-group{background:#fff;border:1px solid #e1e1e6;border-radius:18px;overflow:hidden;box-shadow:0 5px 18px rgba(43,48,76,.045);margin-bottom:18px}
.settings-row{width:100%;min-height:70px;padding:12px 15px 12px 14px;background:#fff;display:flex;align-items:center;gap:13px;text-align:left}
.settings-row+.settings-row{border-top:1px solid #e7e7eb}
.settings-row-stack{display:grid;align-items:stretch;gap:12px}
.settings-copy{display:grid;gap:3px;min-width:0;flex:1}
.settings-copy b{font-size:16px;font-weight:650;letter-spacing:-.01em}
.settings-copy span{font-size:13px;color:#6e6e73;line-height:1.3}
.settings-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}
.settings-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settings-icon.orange{background:#fff4e5;color:#ff9500}.settings-icon.red{background:#fff0f0;color:#ff3b30}.settings-icon.blue{background:#eaf3ff;color:#007aff}.settings-icon.gray{background:#f2f2f7;color:#8e8e93}
.settings-row>.toggle{margin-left:auto;flex:0 0 auto}
.settings-admin-row{cursor:pointer}.settings-admin-row.disabled{opacity:.55;cursor:not-allowed}.settings-admin-row.disabled .settings-copy span{color:#8e8e93}
.settings-empty{padding:24px 18px;text-align:center;color:#6e6e73;font-size:14px}.settings-logout-group{margin-bottom:calc(8px + env(safe-area-inset-bottom))}.settings-logout-group .settings-row{cursor:pointer}.settings-logout-group .settings-copy b{color:#ff3b30}
.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px;background:#e9e9ee;border-radius:12px;width:100%}
#themePicker{grid-template-columns:repeat(2,1fr)}
.segmented button{min-height:38px;border-radius:9px;background:transparent;color:#6e6e73;font-size:13px;font-weight:650;cursor:pointer}
.segmented button.selected{background:#fff;color:#1d1d1f;box-shadow:0 1px 4px rgba(0,0,0,.12)}

:root[data-theme="night"]{color-scheme:dark;--bg:#000;--card:rgba(28,28,30,.96);--line:#38383a;--muted:#98989f;--text:#f5f5f7;--accent:#0a84ff;--accent-soft:#0a84ff22;--danger:#ff453a;--danger-soft:#ff453a18;--success:#30d158;--success-soft:#30d15818;--shadow:0 10px 32px rgba(0,0,0,.28)}
:root[data-theme="night"]{background:#000}
:root[data-theme="night"] body{background:radial-gradient(circle at 12% 12%,rgba(10,132,255,.11),transparent 30%),radial-gradient(circle at 88% 72%,rgba(48,209,88,.06),transparent 26%),linear-gradient(145deg,#000 0%,#101012 55%,#000 100%);color:var(--text)}
:root[data-theme="night"] .brand-mark,:root[data-theme="night"] .icon-btn,:root[data-theme="night"] .btn,:root[data-theme="night"] .input,:root[data-theme="night"] .textarea,:root[data-theme="night"] .select,:root[data-theme="night"] .select-like,:root[data-theme="night"] .choice-option,:root[data-theme="night"] .admin-group,:root[data-theme="night"] .settings-group,:root[data-theme="night"] .glass,:root[data-theme="night"] .hour-record,:root[data-theme="night"] .admin-setting-row,:root[data-theme="night"] .settings-row{background:#1c1c1e;color:var(--text);border-color:#38383a}
:root[data-theme="night"] .nav{background:rgba(28,28,30,.96);border-color:#38383a}
:root[data-theme="night"] .nav-backdrop{background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,.72) 38%,#000 68%,#000 100%)}
:root[data-theme="night"] .nav button{color:#98989f}
:root[data-theme="night"] .nav button.active{background:#0a84ff22;color:#0a84ff}
:root[data-theme="night"] .brand-mark,:root[data-theme="night"] .settings-title-icon,:root[data-theme="night"] .admin-title-icon{background:#2c2c2e;border-color:#48484a;color:#f5f5f7}.brand-mark svg{stroke:currentColor}.settings-title-icon svg{stroke:currentColor}.admin-title-icon svg{stroke:currentColor}.brand-mark svg,.brand-mark svg *,:root[data-theme="night"] .brand-mark svg,:root[data-theme="night"] .brand-mark svg *{color:#f5f5f7;stroke:#f5f5f7}
:root[data-theme="night"] .settings-title-icon svg{color:#f5f5f7}
:root[data-theme="night"] .cat-head,:root[data-theme="night"] .task,:root[data-theme="night"] .settings-row+.settings-row,:root[data-theme="night"] .admin-setting-row+.admin-setting-row{border-color:#38383a}
:root[data-theme="night"] .chev{background:#2c2c2e;color:#98989f}
:root[data-theme="night"] .task input{background:#1c1c1e;border-color:#636366}
:root[data-theme="night"] .progress{background:#2c2c2e}
:root[data-theme="night"] .detail,:root[data-theme="night"] .cancel-btn{background:#2c2c2e;border-color:#48484a;color:#0a84ff}
:root[data-theme="night"] .category-menu{background:rgba(28,28,30,.98);border-color:#48484a}
:root[data-theme="night"] .category-option:active,:root[data-theme="night"] .category-option.selected{background:#2c2c2e}
:root[data-theme="night"] .segmented{background:#2c2c2e}
:root[data-theme="night"] .segmented button.selected{background:#48484a;color:#fff}
:root[data-theme="night"] .settings-icon.orange{background:#3a2f1f}:root[data-theme="night"] .settings-icon.red{background:#3a1f1f}:root[data-theme="night"] .settings-icon.blue{background:#162b44}:root[data-theme="night"] .settings-icon.gray{background:#2c2c2e}
:root[data-theme="night"] .admin-section-label,:root[data-theme="night"] .settings-section-label{color:#98989f}
:root[data-theme="night"] .admin-kicker,:root[data-theme="night"] .settings-kicker{color:#98989f}
:root[data-theme="night"] .logout-btn{background:#2c1f1e;border-color:#4a302e}
:root[data-theme="night"] .toast{background:#f5f5f7;color:#1d1d1f}
@media(max-width:520px){.settings-section-label{margin-left:16px}.settings-row{min-height:68px;padding-left:12px}.settings-icon{width:40px;height:40px}.settings-copy b{font-size:15px}.settings-copy span{font-size:12px}.settings-page-heading{font-size:28px}}

.settings-notif-note{font-size:12px;color:#8e8e93;margin:-2px 20px 8px}
:root[data-theme="night"] .settings-notif-note{color:#98989f}

/* V0.26 — thème des icônes d'en-tête + icône Réglages */
.brand-mark svg,
.brand-mark svg *{color:#1d1d1f !important;stroke:#1d1d1f !important}
.settings-title-icon svg,
.settings-title-icon svg *{color:#1d1d1f !important;stroke:#1d1d1f !important}
.nav svg{color:currentColor;stroke:currentColor}
:root[data-theme="night"] .brand-mark svg,
:root[data-theme="night"] .brand-mark svg *,
:root[data-theme="night"] .settings-title-icon svg,
:root[data-theme="night"] .settings-title-icon svg *{color:#f5f5f7 !important;stroke:#f5f5f7 !important}

/* V1.1 — Motion system : Apple-inspired, fluid, visible and restrained */
:root{--motion-fast:.18s;--motion-med:.34s;--motion-slow:.55s;--ease-spring:cubic-bezier(.22,1.18,.36,1);--ease-smooth:cubic-bezier(.22,.8,.22,1)}
html{scroll-behavior:smooth}
body{overflow-x:hidden}
.shell{position:relative;isolation:isolate}
.page-enter{animation:pageEnter .48s var(--ease-smooth) both}
.page-heading,.settings-heading,.admin-heading{animation:headingEnter .52s var(--ease-spring) both}
.top-actions{animation:actionsEnter .48s .05s var(--ease-spring) both}
.brand-mark,.settings-title-icon,.admin-title-icon{animation:iconEnter .62s var(--ease-spring) both}
.brand-copy{animation:copyEnter .5s .06s var(--ease-smooth) both}
.progress-head{animation:fadeUp .45s .1s var(--ease-smooth) both}
.progress{animation:fadeUp .45s .13s var(--ease-smooth) both}
.progress>span{transform-origin:left center;animation:progressGrow 1s 0s var(--ease-smooth) both}.progress>span:not(.progress-fill-ready){animation-play-state:paused}.progress>span.progress-fill-ready{animation-play-state:running}.progress>span.progress-transition{animation:none;transform:none;transition:width .52s cubic-bezier(.22,.8,.22,1)}
.category{animation:cardEnter .5s var(--ease-spring) both;animation-delay:calc(var(--motion-index,0) * 70ms)}
.category:nth-child(2){--motion-index:1}.category:nth-child(3){--motion-index:2}.category:nth-child(4){--motion-index:3}.category:nth-child(5){--motion-index:4}.category:nth-child(6){--motion-index:5}
.category{transition:transform .28s var(--ease-spring),box-shadow .28s ease,border-color .28s ease}
.category:has(.cat-head:active){transform:scale(.992)}
.cat-head{transition:background .25s ease,padding .3s var(--ease-smooth)}
.cat-head:active{background:rgba(0,122,255,.045)}
.chev{transition:transform .42s var(--ease-spring),background .25s ease,box-shadow .25s ease}
.category-body{display:grid;grid-template-rows:1fr;opacity:1;transition:grid-template-rows .48s var(--ease-smooth),opacity .3s ease}
.category-body-inner{min-height:0;overflow:hidden}
.category.collapsed .category-body{grid-template-rows:0fr;opacity:.72}
.category.collapsed .cat-head{padding-bottom:20px}
.task{animation:taskEnter .42s var(--ease-spring) both;animation-delay:calc(var(--task-index,0) * 45ms);transition:background .2s ease,transform .22s var(--ease-spring),padding-left .22s ease}
.category-body-inner .task:nth-child(1){--task-index:0}.category-body-inner .task:nth-child(2){--task-index:1}.category-body-inner .task:nth-child(3){--task-index:2}.category-body-inner .task:nth-child(4){--task-index:3}.category-body-inner .task:nth-child(5){--task-index:4}
.task:active{transform:scale(.985);background:rgba(0,122,255,.035)}
.task input{transition:background .2s ease,border-color .2s ease,transform .28s var(--ease-spring),box-shadow .28s ease}
.task input:checked{animation:checkPop .42s var(--ease-spring)}
.task.done .task-title{animation:doneStrike .34s ease both}
.hours-card{animation:cardEnter .5s var(--ease-spring) both;animation-delay:calc(var(--motion-index,0) * 90ms);transition:transform .28s var(--ease-spring),box-shadow .28s ease,border-color .25s ease}
.hours-card:nth-child(1){--motion-index:0}.hours-card:nth-child(2){--motion-index:1}.hours-card:active{transform:scale(.992)}
.detail,.btn,.icon-btn,.select-like,.choice-option,.mini-action{transition:transform .22s var(--ease-spring),box-shadow .25s ease,background-color .2s ease,border-color .2s ease}
.btn:active,.icon-btn:active,.detail:active,.select-like:active,.choice-option:active,.mini-action:active{transform:scale(.965)}
.icon-btn:hover,.detail:hover,.btn:hover,.mini-action:hover{box-shadow:0 8px 22px rgba(43,48,76,.10)}
.nav{animation:navEnter .6s .05s var(--ease-spring) both}
.nav button{position:relative;overflow:hidden;transition:transform .28s var(--ease-spring),background .28s ease,color .28s ease}
.nav button.active{animation:navSelect .55s var(--ease-spring)}
.nav button.active svg{animation:navIconPop .52s var(--ease-spring)}
.nav button:active{transform:scale(.93)}
.nav-bounce{animation:navBounce .5s var(--ease-spring)!important}
.settings-section-label{animation:fadeUp .42s var(--ease-smooth) both}
.settings-group{animation:cardEnter .52s var(--ease-spring) both;animation-delay:calc(var(--motion-index,0) * 80ms);transition:transform .25s var(--ease-spring),box-shadow .25s ease}
.settings-group:nth-of-type(1){--motion-index:0}.settings-group:nth-of-type(2){--motion-index:1}.settings-group:nth-of-type(3){--motion-index:2}.settings-group:nth-of-type(4){--motion-index:3}
.settings-row{transition:background .22s ease,transform .25s var(--ease-spring),padding-left .25s var(--ease-spring)}
.settings-row:active{transform:scale(.992);padding-left:17px}
.settings-icon{transition:transform .3s var(--ease-spring),box-shadow .25s ease}
.settings-row:active .settings-icon{transform:scale(.9) rotate(-4deg)}
.toggle{transition:background .22s ease,transform .28s var(--ease-spring),box-shadow .25s ease}
.toggle span{transition:transform .32s var(--ease-spring),box-shadow .25s ease}
.toggle:active{transform:scale(.94)}
.toggle.on span{animation:toggleOn .4s var(--ease-spring)}
.segmented button{transition:background .28s var(--ease-spring),color .2s ease,box-shadow .28s ease,transform .22s var(--ease-spring)}
.segmented button:active{transform:scale(.96)}
.toast{animation:toastEnter .48s var(--ease-spring),toastFloat 2.2s 0.35s ease-in-out}
.tap-ripple{position:absolute;width:12px;height:12px;border-radius:50%;background:currentColor;opacity:.18;transform:translate(-50%,-50%) scale(1);pointer-events:none;animation:ripple .5s ease-out forwards}
button,.btn,.toggle,.cat-head,.task{-webkit-tap-highlight-color:transparent}

@keyframes pageEnter{from{opacity:0;transform:translateY(14px) scale(.992)}to{opacity:1;transform:none}}
@keyframes headingEnter{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
@keyframes actionsEnter{from{opacity:0;transform:translateY(-6px) scale(.9)}to{opacity:1;transform:none}}
@keyframes iconEnter{0%{opacity:0;transform:scale(.72) rotate(-10deg)}65%{opacity:1;transform:scale(1.07) rotate(2deg)}100%{transform:none}}
@keyframes copyEnter{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cardEnter{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
@keyframes taskEnter{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
@keyframes progressGrow{from{transform:scaleX(0);filter:saturate(.7)}to{transform:scaleX(1);filter:saturate(1)}}
@keyframes checkPop{0%{transform:scale(.7)}55%{transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes doneStrike{from{opacity:.65;transform:translateX(2px)}to{opacity:1;transform:none}}
@keyframes navEnter{from{opacity:0;transform:translateX(-50%) translateY(20px) scale(.97)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
@keyframes navSelect{0%{transform:scale(.96)}55%{transform:scale(1.035)}100%{transform:scale(1)}}
@keyframes navIconPop{0%{transform:scale(.78) rotate(-8deg)}55%{transform:scale(1.18) rotate(3deg)}100%{transform:none}}
@keyframes navBounce{0%{transform:scale(.92)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes toastEnter{from{opacity:0;transform:translate(-50%,18px) scale(.9)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes toastFloat{0%,100%{translate:0 0}50%{translate:0 -3px}}
@keyframes ripple{to{width:260px;height:260px;opacity:0}}
@keyframes ambientDrift{from{transform:translate3d(-1%,0,0) scale(1)}to{transform:translate3d(1%,1%,0) scale(1.03)}}

:root[data-theme="night"] .icon-btn:hover,:root[data-theme="night"] .btn:hover,:root[data-theme="night"] .detail:hover,:root[data-theme="night"] .mini-action:hover{box-shadow:0 10px 28px rgba(0,0,0,.3)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* V1.2 — Motion refinement: rising cards + animated money totals */
:root{--ease-rise:cubic-bezier(.16,1,.3,1)}
.category{animation:categoryRise 1.05s var(--ease-rise) both;animation-delay:calc(var(--motion-index,0) * 180ms)}
.settings-group{animation:settingsRise .68s var(--ease-rise) both;animation-delay:calc(var(--motion-index,0) * 100ms)}
.settings-section-label{animation:sectionRise .58s var(--ease-rise) both}
.money-count{font-variant-numeric:tabular-nums;transition:transform .25s var(--ease-spring)}
@keyframes categoryRise{0%{opacity:0;transform:translate3d(0,82px,0) scale(.975)}28%{opacity:1}72%{transform:translate3d(0,-3px,0) scale(1.006)}88%{transform:translate3d(0,1px,0) scale(.999)}100%{opacity:1;transform:none}}
@keyframes settingsRise{0%{opacity:0;transform:translate3d(0,48px,0) scale(.985)}48%{opacity:1}74%{transform:translate3d(0,-1px,0) scale(1.002)}100%{opacity:1;transform:none}}
@keyframes sectionRise{0%{opacity:0;transform:translate3d(0,34px,0)}100%{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.category,.settings-group,.settings-section-label{animation:none!important}.money-count{transition:none!important}}

/* V1.3 — slower task entrance, sequenced progress fill and animated hour totals */
.hours-count{font-variant-numeric:tabular-nums;transition:transform .25s var(--ease-spring)}
.progress>span.progress-fill-ready{animation-play-state:running}
@media (prefers-reduced-motion:reduce){.hours-count{transition:none!important}.progress>span:not(.progress-fill-ready){animation-play-state:running!important}}
