@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap");
:root{font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-synthesis:none;color-scheme:light;--radius:16px;}*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.5;}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a{color:var(--green)}svg{display:inline-block;width:19px;height:19px;flex:0 0 auto;vertical-align:middle;stroke-width:1.8}h1,h2,h3,p{margin-top:0}h1{font-size:32px;line-height:1.2;letter-spacing:-1.2px;margin:5px 0 8px;font-weight:730}h2{font-size:17px;letter-spacing:-.3px;line-height:1.3}p{color:var(--muted)}.app-layout{display:flex;}.sidebar{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:20;overflow-y:auto;}.brand{display:flex;align-items:center;gap:11px;margin:0 10px 50px}.brand-logo{object-fit:cover;}.brand strong{display:block;}.brand small{display:block;margin-top:2px;letter-spacing:.2px;}.subtle-tag{margin-left:4px;text-transform:uppercase;}.main-nav{display:flex;flex-direction:column;}.nav-item{border:0;display:flex;align-items:center;gap:13px;text-align:left;width:100%;transition:background .15s,color .15s;}.nav-item svg{stroke-width:1.9;}.nav-item:hover{color:var(--text);}.nav-item.active{font-weight:730;}.nav-counter{margin-left:auto;font-size:10px;font-weight:700;padding:1px 6px;border-radius:20px;}.notice-pill{display:flex;gap:9px;color:var(--green);align-items:center;}.notice-pill strong{display:block;font-size:12px;}.notice-pill small{font-size:10px;line-height:1.35;color:var(--muted);display:block}.sidebar-bottom>p{font-size:10px;line-height:1.6;padding:15px 9px 0;color:#a4aaa6}.main-layout{flex:1;min-width:0;}.topbar{border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;}.crumb{display:flex;align-items:center;gap:11px;}.crumb-dim,.crumb-sep{color:#a4afa9}.top-actions{display:flex;align-items:center;}.today-date{margin-right:14px;font-size:12px;text-transform:capitalize;}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;white-space:nowrap;transition:background .16s,transform .16s,border .16s;}.btn svg{width:16px;height:16px}.btn:active{transform:scale(.985)}.btn-light{background:var(--surface2);color:var(--text)}.btn-light:hover{background:var(--line)}.btn-outline{background:var(--surface);border-color:var(--line);color:var(--text)}.btn-outline:hover{background:var(--surface2)}.btn-danger{border-color:transparent;}.btn-danger:hover{background:#ffe5e4}main{max-width:1600px;margin:0 auto;}.view{display:none}@keyframes enter{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}.page-heading{display:flex;justify-content:space-between;gap:20px;}.page-heading p{margin:0;}.heading-aside{color:var(--muted);font-size:12px;text-transform:capitalize}.stats-grid{display:grid;}.stat-card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.stat-top{display:flex;align-items:center;justify-content:space-between;}.stat-top svg{color:var(--green);width:18px;height:18px}.stat-value{font-weight:750;margin:13px 0 1px;}.home-grid{display:grid;gap:17px;margin-bottom:22px;}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:19px}.panel-heading h2{margin:0 0 5px}.panel-heading p{margin:0;font-size:11px}.text-button{border:0;background:none;font-size:11px;display:inline-flex;gap:3px;align-items:center;white-space:nowrap;}.empty-state{color:var(--muted);gap:8px;}.empty-state svg{width:28px;height:28px;color:#afbeb6}.empty-state strong{font-weight:700;}.item-row{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.item-main{flex:1;min-width:0}.item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.item-meta{font-size:11px;color:var(--muted);margin-top:3px}.subject-bullet{height:9px;width:9px;border-radius:50%;background:var(--green);flex:0 0 auto}.date-chip{font-size:10px;white-space:nowrap;}.item-click{border:0;background:none;text-align:left;padding:0;max-width:100%;flex:1;color:inherit;}.item-click:hover .item-title{color:var(--green)}.connection-info{border:1px solid #d6ece3;background:#f0f9f5;display:flex;align-items:center;}.connection-info p{margin:3px 0 0;max-width:780px;}.connection-info .btn{margin-left:auto}.connection-icon{display:grid;place-items:center;flex:0 0 auto;}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;}.calendar-range{display:flex;gap:14px;align-items:center}.calendar-range h2{margin:0;}.week-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-height:390px}.calendar-day{border-right:1px solid var(--line);min-width:0;cursor:pointer;}.calendar-day:last-child{border:0}.calendar-day:hover{background:var(--surface2)}.day-header{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;margin-bottom:24px}.calendar-day.today .day-number{background:var(--green);color:#fff}.calendar-event{text-align:left;display:block;width:100%;margin:7px 0;border-left:3px solid var(--green);color:var(--text);overflow:hidden;}.calendar-event:hover{filter:brightness(.97)}.calendar-event .time{font-size:9px;display:block;}.calendar-event .title{font-size:11px;display:block;line-height:1.35;margin-top:2px;word-wrap:break-word;}.calendar-event .place{font-size:9px;}.calendar-more{font-size:10px;color:var(--green);text-align:center;padding:6px}.below-note{margin:14px 0 0;color:var(--muted);font-size:11px}.list-toolbar{border-bottom:1px solid var(--line);padding-bottom:20px;}.segmented{display:flex;}.segmented button{border:0;background:transparent;font-size:11px;white-space:nowrap;}.search-field{display:flex;align-items:center;color:var(--muted);}.search-field svg{width:16px;height:16px}.search-field input{border:0;outline:0;background:transparent;min-height:37px;}.task-list{min-height:270px}.task-entry{display:flex;align-items:center;gap:13px;padding:15px 1px;border-bottom:1px solid var(--line)}.task-check{display:grid;place-items:center;flex:0 0 auto;padding:0;}.task-check svg{width:13px;height:13px}.task-entry.done .task-check{background:var(--green);border-color:var(--green)}.task-entry.done .item-title{text-decoration:line-through;opacity:.45}.task-meta{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:11px;margin-top:4px;flex-wrap:wrap}.grades-grid{display:grid;grid-template-columns:minmax(250px,.75fr) minmax(0,1.5fr);gap:17px}.average-panel .eyebrow{color:var(--muted)}.giant-average{font-weight:800;}.average-panel>p{font-size:11px}.subject-average{display:flex;gap:10px;align-items:center;margin:17px 0}.subject-average-label{flex:1;font-size:11px;font-weight:700}.subject-average-score{font-size:12px;}.progress-track{overflow:hidden;}.progress-fill{height:100%;background:var(--green);}.grade-score{white-space:nowrap;}.import-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.import-card{display:flex;flex-direction:column;align-items:flex-start;}.import-card .big-icon{width:45px;height:45px;display:grid;place-items:center;border-radius:12px;margin-bottom:18px}.big-icon.teal{background:var(--mint);color:var(--green)}.big-icon.violet{background:#f0ebfb;color:var(--violet)}.big-icon.blue{background:#edf4ff;color:var(--blue)}.import-card h2{margin:0 0 10px}.import-card p{line-height:1.65;flex:1;}.import-card small{font-size:10px;color:var(--muted);display:block;margin-top:11px}.import-card a{font-size:11px;margin-top:8px}.connector-panel{display:flex;align-items:center;gap:24px;justify-content:space-between;margin-top:18px}.connector-panel h2{margin:0 0 7px}.connector-panel p{font-size:11px;max-width:650px;margin:0}.service-badges{display:flex;gap:9px;flex-wrap:wrap}.service-badges>span{font-weight:720;white-space:nowrap;}.service-badges small{display:block;font-weight:500;color:var(--muted)}.settings-grid{display:grid;grid-template-columns:minmax(250px,.85fr) minmax(0,1.5fr);gap:18px}.settings-grid h2{margin:0 0 22px}.field-label{font-size:12px;font-weight:700;display:block;margin:16px 0 6px}.field-control{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:9px;padding:10px 12px;min-height:41px;width:100%;outline:0}.field-control:focus,.search-field:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #29947a21}.settings-actions{margin-top:24px}.setting-line{display:flex;align-items:center;justify-content:space-between;gap:20px;}.setting-line:last-child{border:0}.setting-line strong{font-size:12px;display:block}.setting-line small{font-size:11px;color:var(--muted);display:block;margin-top:4px}.switch{width:43px;height:25px;border:0;border-radius:20px;padding:3px;flex:0 0 auto;transition:.2s;}.switch span{display:block;background:white;border-radius:100%;height:19px;width:19px;transition:.2s}.switch[aria-checked="true"] span{transform:translateX(18px)}.danger-line strong{color:var(--red)}.privacy-note{display:flex;gap:10px;align-items:flex-start;margin-top:21px;padding:15px;color:var(--muted);font-size:11px;background:var(--surface2);border-radius:11px}.privacy-note svg{color:var(--green)}.privacy-note strong{color:var(--text)}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;}.modal-backdrop[hidden]{display:none!important}.modal{width:100%;max-height:min(94dvh,800px);overflow:auto;}.modal-head{display:flex;justify-content:space-between;align-items:center;}.modal-head h2{margin:0;}.form-grid{display:grid;grid-template-columns:1fr 1fr;}.field-group label{display:block;font-weight:650;font-size:11px;margin-bottom:6px}.field-group input,.field-group select,.field-group textarea{width:100%;min-height:39px;padding:9px 11px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--text);outline:none}.field-group textarea{resize:vertical;}.field-group :is(input,select,textarea):focus{border-color:var(--green);box-shadow:0 0 0 3px #29947a20}.modal-footer{display:flex;align-items:center;gap:8px;}.grow{flex:1}.toast{position:fixed;bottom:22px;right:25px;max-width:min(360px,calc(100vw - 40px));color:#fff;box-shadow:0 10px 25px #0003;font-size:12px;z-index:70;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .2s,transform .2s;}.toast.visible{opacity:1;transform:none}.muted{color:var(--muted)}.calendar-placeholder{text-align:center;color:var(--muted);font-size:10px;padding-top:15px}.small-badge{display:inline-flex;align-items:center;gap:5px;border-radius:5px;background:var(--surface2);padding:2px 6px;font-size:10px}.home-item-list{min-height:120px}
html[data-theme=dark]{color-scheme:dark;}html[data-theme=dark] .connection-info{background:#17392d;border-color:#2a5644}html[data-theme=dark] .connection-info p{color:#a6cdbb}html[data-theme=dark] .brand-logo{opacity:1;filter:none}html[data-theme=dark] .calendar-event{background:#1e4333}html[data-theme=dark] .big-icon.violet{background:#352b4d}html[data-theme=dark] .big-icon.blue{background:#1c344c}html[data-theme=dark] .task-priority{background:#463525;color:#dbad6b}html[data-theme=dark] .task-priority.high{background:var(--redlight);color:var(--red)}
@media(max-width:1200px){main{padding:35px 28px 60px}.topbar{padding:0 28px}.week-calendar{min-height:300px}.calendar-day{padding:12px 6px}.import-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:800px){.sidebar{border-right:0;border-top:1px solid var(--line);}.brand,.sidebar-title,.sidebar-title.second,.sidebar-bottom{display:none}.sidebar nav.main-nav{display:flex;flex-direction:row;flex:1;gap:1px;max-width:560px}.sidebar .nav-item{display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:9px;}.sidebar .nav-item span:nth-child(2){overflow:hidden;white-space:nowrap;max-width:100%}.sidebar .nav-counter{display:none}.topbar{height:59px;}.today-date{display:none}.top-actions .btn{min-height:35px}.page-heading{margin-bottom:21px}.heading-aside{display:none}.stat-value{font-size:26px;margin-top:8px}.stat-top{font-size:10px}.stat-caption{font-size:9px}.stat-top svg{display:none}.panel{padding:19px 17px}.connection-info{flex-wrap:wrap}.connection-info .btn{margin-left:0}.calendar-range h2{font-size:12px;}.calendar-toolbar .btn{padding:7px}.grades-grid,.settings-grid{grid-template-columns:1fr}.import-grid{grid-template-columns:1fr}.import-card{min-height:230px}.connector-panel{align-items:start;flex-direction:column}.segmented button{padding:8px}.crumb-dim{display:none}.crumb-sep{display:none}}@media(max-width:430px){.top-actions{gap:5px}.crumb{font-size:12px}.topbar .btn-primary{padding:7px 9px}.page-heading .btn{padding:7px 9px}.page-heading{align-items:flex-start}.stats-grid{grid-template-columns:repeat(2,1fr)}.stat-card:last-child{grid-column:1/3}.panel-heading{gap:5px}.modal-footer{padding:12px}.form-grid{grid-template-columns:1fr}}
/* L'attribut HTML hidden doit primer sur les classes de présentation. */
[hidden]{display:none!important}
@media(max-width:800px){.sidebar nav.main-nav:nth-of-type(2){max-width:104px;}}

/* Comptes et sauvegarde MySQL */
.cloud-panel{margin-top:18px}.cloud-info{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:3px 0 12px}.cloud-info span,.cloud-help{color:var(--muted);font-size:13px}.cloud-help{margin:10px 0 4px;line-height:1.55}.cloud-actions{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}.cloud-details{margin-top:17px;padding-top:14px;}.cloud-details summary{cursor:pointer;font-size:14px;font-weight:650}.cloud-details form{margin-top:12px}.cloud-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:12px 0}.cloud-login{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;align-items:end;margin:15px 0}.cloud-login label,.cloud-fields label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.cloud-login input,.cloud-fields input{width:100%;padding:11px 12px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:10px;outline-offset:2px;font:inherit}.cloud-user-list{margin:14px 0 0}.cloud-user-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.cloud-user-row>div{display:grid;gap:2px}.cloud-user-row small{font-size:12px;color:var(--muted)}.cloud-alert{padding:13px 14px;border:1px solid #e6b185;background:#fff5e9;border-radius:11px;color:#81490b;line-height:1.55}.cloud-panel .panel-heading>span svg{color:var(--green)}@media(max-width:650px){.cloud-login{display:flex;flex-direction:column;align-items:stretch}.cloud-login>*{width:100%}.cloud-user-row{flex-wrap:wrap}}


/* ---- 0.3 visual refresh inspired by clean academic dashboard UIs ---- */
:root{--bg:#edf2f7;--sidebar:#ffffff;--surface:#ffffff;--surface2:#f4f8fd;--text:#243b63;--muted:#92a1bb;--line:#e4edf8;--green:#4a9dff;--green-hover:#2b87f5;--mint:#eef5ff;--blue:#4a9dff;--violet:#8a74ff;--shadow:0 12px 40px rgba(77,114,169,.10);--red:#e05b69;--redlight:#fff1f3}
body{background:linear-gradient(180deg,#f4f7fb 0%,#ecf2f9 100%);color:var(--text);font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif}
.app-layout{align-items:stretch;min-height:100dvh}
.sidebar{width:256px;background:var(--sidebar);padding:18px 16px 20px;border-right:1px solid #e8eef6;box-shadow:none}
.brand{padding:8px 10px 14px}.brand strong{font-size:28px;line-height:1;font-weight:800;letter-spacing:-.03em}.brand small{font-size:14px;color:#9cadc7}.brand-logo{width:63px;height:63px;flex:0 0 63px;border-radius:14px;box-shadow:none}
.subtle-tag{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:2px 7px;background:#eef4ff;color:#4a86de;font-size:11px;font-weight:700}
.sidebar-title{font-size:11px;letter-spacing:.12em;font-weight:800;color:#9aacbf;margin:8px 10px 10px}.sidebar-title.second{margin-top:24px}
.main-nav{gap:8px}.nav-item{position:relative;border-radius:18px;color:#567091;background:transparent;min-height:48px;font-weight:700;padding:12px 14px}.nav-item:hover{background:#f6f9fd}.nav-item.active{background:linear-gradient(135deg,#57b4ff,#3594f6);color:white;box-shadow:0 10px 24px rgba(53,148,246,.28)}.nav-item.active svg{color:white}.nav-item svg{width:18px;height:18px;color:#6c85a9}.nav-counter{background:rgba(255,255,255,.23);color:inherit;border:1px solid rgba(255,255,255,.25)}
.sidebar-bottom{margin-top:auto;padding:10px 8px 4px;color:#93a4bb}.notice-pill{background:#f6f9fe;border:1px solid #e6eef8;border-radius:18px;padding:14px 12px}.notice-pill svg{color:#4a9dff}.notice-pill strong{color:#36507f}.sidebar-bottom p{font-size:12px;line-height:1.55;margin:12px 4px 0}
.main-layout{margin-left:256px}.topbar{background:transparent;padding:20px 28px 10px;height:auto}.crumb{font-size:14px;color:#8ea0b8}.crumb strong{color:#274266}.today-date{padding:0 12px;color:#7f93ae;font-weight:700}.top-actions{gap:10px}.topbar .btn{border-radius:16px}
main{padding:6px 28px 46px}.view.active{display:block}.page-heading{align-items:flex-start;}.page-heading h1{font-size:42px;line-height:1.02;letter-spacing:-.04em;color:#243b63}.page-heading p{font-size:15px;color:#91a0b8;max-width:720px}.eyebrow{display:inline-flex;align-items:center;gap:8px;background:#f3f7fd;border:1px solid #e5edf9;color:#88a0c0;padding:6px 12px;border-radius:999px;font-size:11px;letter-spacing:.1em;font-weight:800;margin-bottom:16px}
.panel,.stat-card,.connection-info{background:#fff;border:1px solid #e6eef8;box-shadow:var(--shadow);border-radius:28px}.panel{padding:24px}.stats-grid{gap:16px;margin-bottom:18px}.stat-card{padding:22px 24px;min-height:136px}.stat-top{font-size:13px;color:#7e96b7;font-weight:700}.stat-value{font-size:44px;line-height:1;letter-spacing:-.04em;color:#223a61}.stat-caption{font-size:12px;color:#9cadc4}
.panel-heading h2,.panel h2{color:#243b63}.panel-heading p{color:#8fa1b9}.text-button{color:#4a9dff;font-weight:800}.text-button svg{width:16px;height:16px}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}.search-field{background:#f7faff;border:1px solid #e5eef9;border-radius:16px;min-height:50px;padding:0 16px;gap:10px}.search-field svg{color:#88a0c0}.search-field input{width:260px;color:#31496f;font-size:15px}.search-field input::placeholder{color:#9fb0c7}.segmented{padding:4px;background:#f6f9fd;border:1px solid #e5edf9;border-radius:16px;gap:4px}.segmented button{border-radius:12px;padding:11px 16px;color:#525252;font-weight:800}.segmented button.selected{background:#4a9dff;color:#fff;box-shadow:0 8px 20px rgba(74,157,255,.24)}
.tasks-panel{min-height:640px}.task-entry,.item-row{padding:16px 18px;border-radius:18px;border:1px solid #edf2fa;background:#fff;box-shadow:none}.task-entry+.task-entry,.item-row+.item-row{margin-top:12px}.task-entry.done,.item-row.done{opacity:.72}.task-check{width:34px;height:34px;border-radius:999px;background:#f1f6fd;border:1px solid #deebfb;color:#4a9dff}.task-check:hover{background:#e8f2ff}.item-click{min-width:0}.item-title{font-size:16px;color:#253c61;font-weight:800}.item-meta,.task-meta{margin-top:4px;}.task-priority{background:#fff4e8;color:#ce8840;border-radius:999px;padding:5px 9px;font-size:11px}.task-priority.high{background:#fff0f2;color:#df6177}.task-priority.low{background:#eef5ff;color:#5b8de0}.date-chip{border-radius:999px;background:#f6f9fd;border:1px solid #e7eef8;padding:8px 12px;color:#6a82a6;font-weight:800}.date-chip.overdue{background:#fff1f4;border-color:#ffd7df;color:#d85a71}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:54px 20px;min-height:420px;border-radius:24px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}.empty-illustration{width:120px;height:120px;border-radius:999px;display:grid;place-items:center;background:#f1f6fc;margin-bottom:22px}.empty-illustration svg{width:44px;height:44px;color:#4a9dff}.empty-state strong{font-size:34px;line-height:1.05;letter-spacing:-.04em;color:#233b61}.empty-state p{margin:12px 0 0;max-width:430px;color:#93a3bb;font-size:17px;line-height:1.6}.empty-action{margin-top:24px;min-height:48px;padding:0 22px}.empty-tip{background:#f4f8fd;border:1px solid #e5eef9;border-radius:16px;padding:14px 18px;}
.connection-info{padding:22px 24px;border-radius:24px;gap:16px}.connection-icon{background:#edf4ff;color:#4a9dff;width:52px;height:52px;border-radius:18px}.connection-info strong{font-size:18px;color:#243b63}.connection-info p{font-size:14px;line-height:1.65;color:#8d9fb7}.connection-info code{background:#f3f7fd;border:1px solid #e5edf8;border-radius:8px;padding:2px 6px}
.calendar-panel{overflow:hidden}.calendar-toolbar{margin-bottom:0;}.calendar-range h2{font-size:18px;color:#294264}.week-calendar{gap:12px}.calendar-day{background:#f9fbff;border:1px solid #e8eef9;border-radius:22px;padding:16px 12px;min-height:330px}.calendar-day.today{background:#eef6ff;border-color:#dcecff;box-shadow:inset 0 0 0 1px #dcecff}.day-label{font-size:11px;color:#90a1ba;font-weight:800;text-transform:uppercase;letter-spacing:.12em}.day-number{width:38px;height:38px;border-radius:14px;background:#fff;color:#294264;border:1px solid #e6eef9;display:grid;place-items:center;font-weight:800}.calendar-event{border-radius:16px;border:1px solid #e8eef7;box-shadow:0 6px 18px rgba(62,100,150,.06);padding:10px 12px;}.calendar-event .time{color:#4a9dff;font-weight:800}.calendar-event .title{color:#28415f;font-weight:800}.calendar-event .place{color:#8fa1b8}
.grades-grid,.settings-grid,.import-grid{gap:16px}.average-panel{display:flex;flex-direction:column;justify-content:flex-start}.giant-average{font-size:56px;line-height:1;color:#24406a;letter-spacing:-.05em;margin:14px 0}.subject-average{padding:12px 0;border-bottom:1px solid #edf2fa}.subject-average-score{background:#edf5ff;color:#457fcf;border-radius:999px;padding:8px 10px;font-weight:800}.grade-score{background:#eef5ff;color:#4b82d2;border-radius:999px;padding:8px 10px;font-weight:800}.progress-track{height:10px;background:#edf2f8;border-radius:999px;margin-top:10px}.progress-fill{border-radius:999px}
.import-card{min-height:320px;border-radius:26px}.big-icon{border-radius:16px}.import-card p{font-size:14px;color:#8f9fb8}.service-badges>span{background:#f5f8fd;border:1px solid #e4edf8;border-radius:16px;color:#2b4265;padding:12px 16px}
.field-label,.setting-line strong,.cloud-login label,.cloud-fields label,.field-group label{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#8fa1b9;font-weight:800}.field-control,.field-group input,.field-group select,.field-group textarea,.cloud-login input,.cloud-fields input{border:none;background:#f4f7fb;color:#28405f;border-radius:16px;min-height:52px;padding:14px 16px;box-shadow:inset 0 0 0 1px #e5edf9}.field-group textarea{min-height:112px}.field-control:focus,.field-group :is(input,select,textarea):focus,.cloud-login input:focus,.cloud-fields input:focus,.search-field:focus-within{box-shadow:inset 0 0 0 1px #bfd9ff,0 0 0 4px rgba(74,157,255,.13)}
.setting-line{padding:18px 0;border-bottom:1px solid #eef3fb}.switch{background:#d9e7f8}.switch[aria-checked="true"]{background:#4a9dff}.switch span{box-shadow:0 2px 8px rgba(0,0,0,.12)}
.btn{border-radius:16px;min-height:46px;font-weight:800;padding:0 16px;border:1px solid transparent}.btn-primary{background:#4a9dff;color:#fff;box-shadow:0 12px 28px rgba(74,157,255,.28)}.btn-primary:hover{background:#2f8cf7}.btn-outline,.btn-light{background:#f5f8fd;color:#49627f;border-color:#e3ecf8}.btn-danger{background:#fff3f5;color:#cf5364;border:1px solid #ffd7df}.btn-icon{width:46px;padding:0}
.modal-backdrop{background:rgba(73,95,131,.22);backdrop-filter:blur(10px)}.modal{max-width:780px;border:none;box-shadow:0 28px 80px rgba(49,73,112,.22);border-radius:28px;background:#fff}.modal-head{padding:22px 28px 16px;border-bottom:1px solid #eef3fb}.modal-head h2{font-size:28px;letter-spacing:-.03em;color:#243b63}.modal-breadcrumb{font-size:13px;color:#9aacbf;margin-bottom:10px}.modal-kind-tabs{display:flex;gap:6px;padding:14px 28px 0}.modal-kind-tabs button{border:0;background:transparent;color:#7f93af;font-weight:800;padding:10px 12px;border-radius:12px}.modal-kind-tabs button.active{background:#eef5ff;color:#3d83df}.modal #modal-fields{padding:18px 28px 24px}.form-grid{gap:14px}.field-group{margin:0 0 18px}.modal-footer{padding:18px 28px;border-top:1px solid #eef3fb;position:sticky;bottom:0;background:#fff;border-radius:0 0 28px 28px}
.toast{background:#2f4f77;border-radius:16px;padding:14px 18px}.toast.error{background:#c85363}
html[data-theme=dark]{--bg:#111826;--sidebar:#121c2c;--surface:#172234;--surface2:#1f2c43;--text:#e9f0fb;--muted:#95a6c6;--line:#283753;--green:#66abff;--green-hover:#559eff;--mint:#1d2f4a;--blue:#66abff;--violet:#a794ff;--shadow:0 16px 36px rgba(0,0,0,.28);--red:#ff93a0;--redlight:#452733}html[data-theme=dark] .eyebrow,html[data-theme=dark] .notice-pill,html[data-theme=dark] .empty-illustration,html[data-theme=dark] .day-number,html[data-theme=dark] .btn-outline,html[data-theme=dark] .btn-light,html[data-theme=dark] .service-badges>span,html[data-theme=dark] .segmented,html[data-theme=dark] .search-field,html[data-theme=dark] .task-check,html[data-theme=dark] .date-chip,html[data-theme=dark] .subject-average-score,html[data-theme=dark] .grade-score,html[data-theme=dark] .field-control,html[data-theme=dark] .field-group input,html[data-theme=dark] .field-group select,html[data-theme=dark] .field-group textarea,html[data-theme=dark] .cloud-login input,html[data-theme=dark] .cloud-fields input{background:var(--surface2)}html[data-theme=dark] .empty-state,html[data-theme=dark] .calendar-day,html[data-theme=dark] .calendar-event{background:var(--surface)}
@media(max-width:1200px){.main-layout{margin-left:236px}.sidebar{width:236px}.page-heading h1{font-size:36px}}
@media(max-width:800px){.sidebar{background:#fff;}.main-layout{margin:0}.topbar{padding:14px 14px 6px}main{padding:8px 14px 100px}.stat-card{min-height:124px;}.stat-card:last-child{grid-column:1/3}.panel,.connection-info{border-radius:24px}.empty-state{min-height:320px;padding:36px 16px}.empty-state strong{font-size:28px}.empty-state p{font-size:15px}.search-field{width:100%}.search-field input{width:100%}.modal{max-width:100%}.modal-head{padding:18px 18px 14px}.modal-kind-tabs{padding:12px 18px 0;overflow:auto}.modal #modal-fields{padding:16px 18px 22px}.modal-footer{padding:14px 18px}}
@media(max-width:430px){.page-heading h1{font-size:26px}.list-toolbar{align-items:stretch}.segmented{width:100%;justify-content:space-between}.segmented button{flex:1}.topbar .btn-primary span:last-child{display:none}}

/* 0.4 school-account integration */

.school-status-label{display:inline-flex;align-items:center;white-space:nowrap;font-size:12px;font-weight:750;padding:7px 13px;border-radius:999px;color:#5084bf;background:#eef5ff}
.school-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.school-service-card{padding:24px;border:1px solid #e3edf9;border-radius:22px;background:#fafdff;min-width:0}
.school-service-card.connected{border-color:#cde2fa;background:#f5faff}
.school-service-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.school-service-header strong,.school-provider{font-weight:800;font-size:20px;letter-spacing:-.035em;color:#25436c}
.school-unlinked,.school-connect-state{display:inline-flex;padding:7px 11px;border-radius:999px;background:#f0f4fa;color:#8497b2;font-size:12px;font-weight:750}
.school-connect-state{background:#e6f8f0;color:#257c62}
.school-service-card p,.school-instruction{font-size:14px;line-height:1.6;color:#8498b5}
.school-service-card form{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.school-service-card .field-label{display:flex;flex-direction:column;gap:8px;margin:0 0 5px;color:#728aaa}
.school-service-card .btn-primary{align-self:start;max-width:100%}
.school-service-card .field-control{font-size:14px}
.school-service-card .school-qr{height:115px;min-height:115px;resize:vertical;font-family:ui-monospace,Consolas,monospace;font-size:12px}
.school-service-card .school-note{font-size:12px;margin:14px 0 0}
.school-service-card .school-actions{display:flex;gap:10px;align-items:center;margin-top:4px}
.school-warning{background:#fff3ed;border:1px solid #f2dacb;color:#a16a4e;padding:15px 17px;border-radius:14px;font-size:14px}
.school-options{display:flex;flex-direction:column;gap:8px}
.school-options label{display:flex;gap:12px;align-items:center;padding:12px 15px;background:#fff;border:1px solid #e2eefa;border-radius:14px;cursor:pointer}
.school-options input{accent-color:#4a9dff;width:18px;height:18px}
.school-result{margin:16px 0 0;border-radius:14px;padding:15px 17px;background:#f0f7ff;color:#557da9;font-weight:650;font-size:13px}
#school-services .field-control:focus{outline:0;box-shadow:0 0 0 4px #4a9dff26}
.school-scan-box{padding:12px;border:1px solid #ddebf9;border-radius:16px;margin:0 0 8px;background:#fff}
.school-scan-box video{width:100%;height:210px;background:#1e293b;object-fit:cover;border-radius:12px}
.school-scan-box button{margin-top:10px}
@media(max-width:950px){.school-grid{grid-template-columns:1fr}}
@media(max-width:800px){.school-panel{margin-top:14px}.school-service-card{padding:18px}.school-service-header strong,.school-provider{font-size:18px}}
html[data-theme=dark] .panel,html[data-theme=dark] .stat-card,html[data-theme=dark] .connection-info{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .sidebar{background:var(--sidebar);border-color:var(--line)}
html[data-theme=dark] .topbar{background:transparent}
html[data-theme=dark] :is(.page-heading h1,.item-title,.panel h2,.panel-heading h2,.stat-value,.stat-top,.connection-info strong,.giant-average,.modal-head h2,.school-service-header strong,.school-provider){color:var(--text)}
html[data-theme=dark] :is(.school-service-card,.school-scan-box,.modal,.modal-footer){background:var(--surface);border-color:var(--line)}
html[data-theme=dark] :is(.item-row,.task-entry,.school-options label){background:var(--surface2);border-color:var(--line)}
html[data-theme=dark] :is(.empty-state,.school-service-card.connected){background:var(--surface)}
html[data-theme=dark] .school-status-label{background:#213c5d;color:#9ccaff}
html[data-theme=dark] .school-connect-state{background:#204b40;color:#8ee6c2}
html[data-theme=dark] .school-unlinked{background:#24344d;color:#99adc8}
html[data-theme=dark] :is(.school-result,.empty-tip){background:var(--surface2);border-color:var(--line);color:var(--muted)}
html[data-theme=dark] .school-warning{background:#49362f;color:#f4b79d;border-color:#704a3f}
html[data-theme=dark] .sidebar .nav-item.active,html[data-theme=dark] .btn-primary{color:#fff}


/* Butterfree 0.5 subject manager + dark theme refinements */
.subjects-panel{margin-top:18px}.subjects-panel .panel-heading{align-items:flex-start}.subject-block-title{font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:4px 0 10px}.subject-chip-list{display:flex;flex-wrap:wrap;gap:10px}.subject-pill{display:inline-flex;align-items:center;gap:10px;border-radius:999px;border:1px solid var(--line);background:var(--surface2);color:var(--text);padding:9px 12px;font-weight:700}.subject-pill:hover{border-color:#9dbdf0}.subject-color{width:12px;height:12px;border-radius:999px;background:var(--subject-color,#7a8daa);box-shadow:inset 0 0 0 1px rgba(26,40,67,.18),0 0 0 1px rgba(111,127,155,.18)}.subject-action{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;background:rgba(74,157,255,.12);color:#4a9dff;font-size:14px;line-height:1}.subject-suggestion .subject-action{background:rgba(54,179,126,.12);color:#37a36b}.custom-subject-form{margin:18px 0 16px}.subject-form-row{display:flex;gap:10px;align-items:center}.subject-form-row input[type=color]{padding:4px;min-width:56px;width:56px}.subject-form-row .btn{flex:0 0 auto}.subject-help{margin-top:8px}.subjects-suggestions{margin-top:8px}
html[data-theme=dark] body{background:radial-gradient(circle at top left,#152342 0%,#0d1528 52%,#09111d 100%) !important;color:#edf4ff}html[data-theme=dark] .sidebar,html[data-theme=dark] .topbar,html[data-theme=dark] .panel,html[data-theme=dark] .stat-card,html[data-theme=dark] .connection-info,html[data-theme=dark] .calendar-day,html[data-theme=dark] .modal,html[data-theme=dark] .notice-pill,html[data-theme=dark] .search-field,html[data-theme=dark] .segmented,html[data-theme=dark] .calendar-event,html[data-theme=dark] .date-chip,html[data-theme=dark] .subject-average-score,html[data-theme=dark] .grade-score,html[data-theme=dark] .field-control,html[data-theme=dark] .field-group input,html[data-theme=dark] .field-group select,html[data-theme=dark] .field-group textarea,html[data-theme=dark] .cloud-login input,html[data-theme=dark] .cloud-fields input,html[data-theme=dark] .subject-pill,html[data-theme=dark] .empty-state,html[data-theme=dark] .empty-illustration,html[data-theme=dark] .day-number,html[data-theme=dark] .school-service-card,html[data-theme=dark] .school-service-form,html[data-theme=dark] .school-challenge,html[data-theme=dark] .school-sync-card{background:#111b31 !important;color:#edf4ff !important;border-color:#223557 !important}html[data-theme=dark] .main-layout,html[data-theme=dark] main{background:transparent !important}html[data-theme=dark] .sidebar{box-shadow:inset -1px 0 0 #223557 !important}html[data-theme=dark] .panel,html[data-theme=dark] .stat-card,html[data-theme=dark] .connection-info,html[data-theme=dark] .modal,html[data-theme=dark] .calendar-day{box-shadow:0 12px 28px rgba(0,0,0,.24) !important}html[data-theme=dark] .page-heading h1,html[data-theme=dark] .panel-heading h2,html[data-theme=dark] .panel h2,html[data-theme=dark] .item-title,html[data-theme=dark] .stat-value,html[data-theme=dark] .empty-state strong,html[data-theme=dark] .modal-head h2,html[data-theme=dark] .connection-info strong,html[data-theme=dark] .brand strong,html[data-theme=dark] .crumb strong{color:#edf4ff !important}html[data-theme=dark] p,html[data-theme=dark] .item-meta,html[data-theme=dark] .task-meta,html[data-theme=dark] .stat-caption,html[data-theme=dark] .today-date,html[data-theme=dark] .crumb,html[data-theme=dark] .sidebar-bottom p,html[data-theme=dark] .brand small,html[data-theme=dark] .sidebar-title,html[data-theme=dark] .cloud-help,html[data-theme=dark] .subject-help,html[data-theme=dark] .empty-state p{color:#b7c6e1 !important}html[data-theme=dark] .nav-item{color:#c4d3ea !important}html[data-theme=dark] .nav-item svg,html[data-theme=dark] .notice-pill svg,html[data-theme=dark] .text-button,html[data-theme=dark] .subject-action{color:#79b3ff !important}html[data-theme=dark] .nav-item:hover{background:#14223d !important}html[data-theme=dark] .nav-item.active{background:linear-gradient(135deg,#4ea0ff,#2f7ce4) !important;color:#fff !important}html[data-theme=dark] .eyebrow,html[data-theme=dark] .school-status-label,html[data-theme=dark] .date-chip,html[data-theme=dark] .subject-average-score,html[data-theme=dark] .grade-score{background:#152745 !important;color:#dce9ff !important;border-color:#27436e !important}html[data-theme=dark] .connection-icon{background:#183256 !important;color:#85b8ff !important}html[data-theme=dark] .btn-outline,html[data-theme=dark] .btn-light{background:#14223f !important;color:#e8f0ff !important;border-color:#27436e !important}html[data-theme=dark] .btn-primary{background:#5da7ff !important;color:#081220 !important}html[data-theme=dark] .btn-danger{background:#34202a !important;color:#ffb2be !important;border-color:#5f3140 !important}html[data-theme=dark] .search-field input::placeholder,html[data-theme=dark] ::placeholder{color:#8ca3c7 !important}html[data-theme=dark] .task-check{background:#152745 !important;border-color:#27436e !important;color:#86b8ff !important}html[data-theme=dark] .calendar-day.today{background:#132847 !important;border-color:#315486 !important;box-shadow:inset 0 0 0 1px #315486,0 12px 28px rgba(0,0,0,.24) !important}html[data-theme=dark] .calendar-placeholder{color:#7bafff !important}html[data-theme=dark] .modal-footer{background:#111b31 !important;border-color:#223557 !important}html[data-theme=dark] .modal-kind-tabs button.active{background:#17325a !important;color:#cfe2ff !important}html[data-theme=dark] .field-control:focus,html[data-theme=dark] .field-group :is(input,select,textarea):focus,html[data-theme=dark] .cloud-login input:focus,html[data-theme=dark] .cloud-fields input:focus,html[data-theme=dark] .search-field:focus-within{box-shadow:inset 0 0 0 1px #4d83ca,0 0 0 4px rgba(93,167,255,.15) !important}html[data-theme=dark] .subject-color{box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 0 0 1px rgba(255,255,255,.12)}
@media(max-width:700px){.subject-form-row{flex-wrap:wrap}.subject-form-row > *{width:100%}.subject-form-row input[type=color]{width:100%;min-width:0;height:52px}}

/* Butterfree 0.6 — sessions de travail */
.focus-live-dot{height:9px;width:9px;border-radius:50%;background:#5aebad;box-shadow:0 0 0 3px rgba(90,235,173,.18);margin-left:auto;animation:focus-pulse 2.4s ease-in-out infinite}@keyframes focus-pulse{50%{box-shadow:0 0 0 7px rgba(90,235,173,0)}}
.focus-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr);gap:18px;margin-bottom:18px}.focus-panel{padding:28px 32px;min-height:490px;display:flex;flex-direction:column;align-items:center}.focus-topline{display:flex;justify-content:space-between;align-items:center;width:100%;gap:12px}.focus-eyebrow{font-size:12px;display:flex;gap:8px;align-items:center;font-weight:800;letter-spacing:.09em;color:#7b94b8}.focus-eyebrow svg{width:19px;color:#4a9dff}.focus-state{font-size:12px;font-weight:800;border-radius:999px;padding:7px 14px;color:#6984a8;background:#f1f6fd}.focus-state[data-status=running]{background:#e3f8f0;color:#138461}.focus-state[data-status=paused]{background:#fff2dd;color:#ad7834}.focus-watch{font-size:clamp(46px,5.5vw,84px);line-height:1.25;color:#203a62;margin-top:44px;white-space:nowrap;}.focus-watch.running{color:#358df4}.focus-message{margin:8px 0 28px;font-size:14px;color:#7b93b3;text-align:center}.focus-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%;margin-bottom:24px}.focus-field{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#7189aa;font-weight:750}.focus-field .field-control{min-width:0}.focus-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:11px;margin:0 0 18px}.focus-controls .btn{min-height:48px}.focus-footnote{text-align:center;font-size:12px;line-height:1.65;color:#90a3bb;max-width:570px;margin:auto 0 0}.focus-side{display:flex;flex-direction:column;gap:18px}.focus-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.focus-metric{padding:17px 12px;min-height:106px;display:flex;flex-direction:column;gap:11px}.focus-metric span{font-size:11px;color:#8296b3;font-weight:700}.focus-metric strong{font-size:clamp(16px,1.4vw,21px);color:#294569;white-space:nowrap}.focus-breakdown{flex:1;min-height:210px}.focus-breakdown-list{display:flex;flex-direction:column;gap:16px}.focus-subject-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.focus-subject-head>span{display:flex;align-items:center;gap:10px;min-width:0;font-weight:750;font-size:13px;color:var(--text)}.focus-subject-head strong{font-size:12px;color:#7590b1;white-space:nowrap}.focus-track{height:8px;background:#edf2fa;border-radius:999px;overflow:hidden}.focus-track>span{height:100%;display:block;border-radius:999px}.focus-no-data{font-size:13px;color:var(--muted);margin-top:34px}.focus-history{min-height:235px}.focus-history-row{display:flex;align-items:center;gap:15px;border-top:1px solid var(--line);padding:16px 0}.focus-history-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.focus-history-info strong{font-size:14px;color:var(--text)}.focus-history-info small{font-size:12px;color:var(--muted)}.focus-history-duration{font-weight:800;font-variant-numeric:tabular-nums;color:#3d82db;white-space:nowrap}.focus-delete{width:32px;height:32px;border:0;border-radius:10px;background:transparent;color:#8298b5;display:grid;place-items:center}.focus-delete svg{width:16px;height:16px}.focus-delete:hover{background:var(--surface2);color:#d95f70}.focus-no-history{padding:30px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--text)}.focus-no-history-icon{width:60px;height:60px;background:#f2f7fc;display:grid;place-items:center;color:#4a9dff;border-radius:22px}.focus-no-history strong{font-size:18px}.focus-no-history p{font-size:13px;max-width:340px}
html[data-theme=dark] .focus-panel,html[data-theme=dark] .focus-metric,html[data-theme=dark] .focus-breakdown,html[data-theme=dark] .focus-history{background:#111b31 !important;border-color:#223557 !important}html[data-theme=dark] .focus-watch,html[data-theme=dark] .focus-no-history strong,html[data-theme=dark] .focus-history-info strong,html[data-theme=dark] .focus-metric strong,html[data-theme=dark] .focus-subject-head>span{color:#eef5ff !important}html[data-theme=dark] .focus-watch.running{color:#7db5ff !important}html[data-theme=dark] .focus-state{background:#1b2b47;color:#ccdfff}html[data-theme=dark] .focus-state[data-status=running]{background:#143a36;color:#8fe6cd}html[data-theme=dark] .focus-state[data-status=paused]{background:#3a3028;color:#e6c18a}html[data-theme=dark] .focus-track,html[data-theme=dark] .focus-no-history-icon{background:#203354}html[data-theme=dark] .focus-history-duration{color:#93c3ff}html[data-theme=dark] .focus-field .field-control{background:#192a46;color:#ecf3ff;border:1px solid #2f456c}html[data-theme=dark] .focus-message,html[data-theme=dark] .focus-footnote,html[data-theme=dark] .focus-field,html[data-theme=dark] .focus-metric span{color:#b5c7e4 !important}
@media(max-width:1150px){.focus-layout{grid-template-columns:1fr}.focus-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.focus-panel{padding:22px 17px;min-height:430px}.focus-watch{margin-top:32px;font-size:clamp(39px,10vw,65px)}.focus-fields{grid-template-columns:1fr}.focus-metrics{grid-template-columns:1fr 1fr}.focus-metric:last-child{grid-column:1/-1}.focus-history-row{gap:10px}.focus-history-duration{font-size:12px}.focus-history-info small{font-size:10px}.focus-controls .btn{width:100%}}

/* Contraste renforcé de la navigation et du texte secondaire en thème sombre */
html[data-theme=dark] .sidebar .nav-item:not(.active){color:#c5d6f0 !important}html[data-theme=dark] .sidebar .nav-item:not(.active) svg{color:#8ebaff !important}html[data-theme=dark] .sidebar .nav-item:not(.active):hover{color:#f4f8ff !important}html[data-theme=dark] .sidebar .nav-item.active,html[data-theme=dark] .sidebar .nav-item.active svg{color:white !important}

@media(max-width:560px){.sidebar .nav-item{position:relative;min-width:0}.sidebar .nav-item span:nth-child(2){padding:0;}.sidebar .nav-item svg{width:21px;height:21px}.sidebar nav.main-nav:nth-of-type(2){flex:1;max-width:none}.sidebar{gap:0}.sidebar nav.main-nav{min-width:0}.sidebar nav.main-nav:nth-of-type(2) .nav-item:nth-child(1){display:flex}}

/* Butterfree 0.7 — Aperçu avant import et historique scolaire */
.school-preview{background:linear-gradient(165deg,#f7fbff,#fff 65%);border:1px solid #cddff7;border-radius:22px;padding:24px;margin-top:24px;box-shadow:0 12px 28px rgba(45,93,165,.06)}
.school-preview[hidden]{display:none!important}
.school-preview-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.school-preview-head .eyebrow{margin:0 0 8px;font-size:10px}
.school-preview-head h3{font-size:21px;letter-spacing:-.02em;color:var(--text);margin:0 0 6px}
.school-preview-head p{font-size:13px;color:var(--muted);margin-bottom:18px}
.school-preview-section{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;margin-top:8px;cursor:pointer}
.school-preview-section:hover{border-color:#9bbff1}
.school-preview-check{display:flex;align-items:center;gap:13px;min-width:0}
.school-preview-check input{width:18px;height:18px;accent-color:#4594f5}
.school-preview-check strong,.school-preview-check small{display:block}
.school-preview-check strong{font-size:14px;color:var(--text)}
.school-preview-check small{color:var(--muted);font-size:12px;margin-top:4px}
.school-preview-count{color:#4d87d5;background:var(--surface2);padding:7px 10px;border-radius:10px;font-size:12px;font-weight:750;white-space:nowrap}
.school-preview-examples{margin:9px 0 12px 32px;display:flex;gap:8px;flex-wrap:wrap}
.school-preview-examples span{background:var(--surface2);border:1px solid var(--line);padding:6px 9px;border-radius:8px;font-size:12px;color:var(--text)}
.school-preview-retained{font-size:12px;color:var(--muted);margin:0 0 12px 32px}
.school-preview-subjects{margin-top:16px;padding:16px;border-radius:14px;background:var(--surface2);border:1px solid var(--line)}
.school-preview-subjects strong{display:block;margin-bottom:6px;color:var(--text)}
.school-preview-subjects p{margin-bottom:5px;font-weight:650;color:var(--text);font-size:13px}
.school-preview-subjects small{font-size:12px;color:var(--muted)}
.school-preview-warnings{background:#fff3ed;color:#a35b35;border-radius:12px;padding:12px 14px;margin-top:14px;font-size:13px}
.school-preview-safety{margin:18px 0 14px;font-size:13px;color:var(--muted);line-height:1.5}
.school-preview-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.school-sync-history{padding:19px 22px;margin-top:20px;box-shadow:none!important}
.school-sync-history .panel-heading h3{font-size:17px;font-weight:800;margin-bottom:3px;color:var(--text)}
.school-history-item{display:flex;gap:12px;align-items:center;padding:13px 2px;border-top:1px solid var(--line)}
.school-history-icon{display:grid;place-items:center;flex:none;height:30px;width:30px;border-radius:10px;background:var(--surface2);color:#4a9dff}
.school-history-icon svg{width:17px;height:17px}
.school-history-item>div{min-width:0;flex:1}
.school-history-item strong,.school-history-item small{display:block}
.school-history-item strong{font-weight:750;color:var(--text)}
.school-history-item small{margin-top:2px;font-size:11px;color:var(--muted);line-height:1.5}
.school-history-total{font-size:12px;white-space:nowrap;font-weight:800;color:#4d87d5}
html[data-theme=dark] .school-preview{background:#111b31;border-color:#28456d;box-shadow:0 10px 28px rgba(0,0,0,.25)}
html[data-theme=dark] .school-preview-head h3,html[data-theme=dark] .school-preview-check strong,html[data-theme=dark] .school-preview-subjects strong,html[data-theme=dark] .school-preview-subjects p,html[data-theme=dark] .school-history-item strong,html[data-theme=dark] .school-sync-history .panel-heading h3{color:#e8f1ff!important}
html[data-theme=dark] .school-preview-section,html[data-theme=dark] .school-preview-examples span,html[data-theme=dark] .school-preview-subjects{background:#15233d;border-color:#2a3e60;color:#dce9ff}
html[data-theme=dark] .school-preview-count,html[data-theme=dark] .school-history-icon{background:#193255;color:#9ac8ff}
html[data-theme=dark] .school-preview-warnings{background:#37281f;color:#f7b88f}
@media(max-width:620px){.school-preview{padding:15px}.school-preview-section{padding:12px}.school-preview-examples{margin-left:12px}.school-history-item{flex-wrap:wrap}.school-history-total{margin-left:42px}.school-preview-actions{width:100%}.school-preview-actions .btn{flex:1}}


/* Butterfree 0.8 – agenda travail personnel */
#home-events{display:grid;grid-template-columns:minmax(280px,1fr) minmax(220px,.9fr);gap:18px;align-items:start}.home-mini-calendar{background:var(--surface2);border:1px solid var(--line);border-radius:18px;padding:18px 18px 16px}.home-mini-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.home-mini-title{font-size:15px;font-weight:800;text-transform:capitalize;letter-spacing:-.2px}.home-mini-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:8px}.home-mini-weekdays span{font-size:11px;color:var(--muted);font-weight:700;text-align:center}.home-mini-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.home-mini-day{min-height:52px;border-radius:14px;border:1px solid transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.55);}.home-mini-day.outside{opacity:.34}.home-mini-day.today{border-color:var(--green);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--green), transparent 30%)}.home-mini-date{font-size:13px;font-weight:720;color:var(--text)}.home-mini-dot{border-radius:999px;background:var(--green);display:block;box-shadow:0 0 0 2px rgba(37,138,114,.12)}.home-mini-legend{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-top:12px}.legend-dot{width:10px;height:10px;border-radius:50%;background:var(--green);flex:0 0 auto}.home-mini-summary{display:flex;gap:10px;margin-top:14px}.home-mini-summary>div{flex:1;border-radius:13px;background:var(--surface);border:1px solid var(--line);padding:11px 12px}.home-mini-summary strong{display:block;font-size:16px;color:var(--text);line-height:1.2}.home-mini-summary small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.home-mini-side{min-height:100%}.home-work-list{height:100%;display:flex;flex-direction:column}.home-work-list h3{margin:2px 0 14px;font-size:15px;letter-spacing:-.2px}.home-work-row{display:flex;align-items:center;gap:10px;padding:11px 0;border-top:1px solid var(--line)}.home-work-row:first-of-type{border-top:0}.home-work-row>div{flex:1;min-width:0}.home-work-row strong{display:block;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-work-row small{display:block;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-work-row>span:last-child{font-size:11px;font-weight:800;color:#335f9e;white-space:nowrap}.home-work-add{margin-top:auto;width:100%}.calendar-event-focus{cursor:default;border-left-color:#5d91da;}.calendar-event-focus .time{color:#5579a7}.calendar-event-focus .place{display:block}.empty-state .empty-action{margin-top:8px}.empty-tip{margin-top:10px;font-size:11px;color:var(--muted);text-align:center;max-width:360px}.modal[data-kind="focusSession"]{max-width:760px}@media(max-width:980px){#home-events{grid-template-columns:1fr}.home-mini-side{margin-top:2px}}@media(max-width:650px){.home-mini-grid{gap:6px}.home-mini-day{min-height:46px;border-radius:12px}.home-mini-title{font-size:14px}}html[data-theme=dark] .home-mini-calendar,html[data-theme=dark] .home-mini-summary>div,html[data-theme=dark] .home-mini-day,html[data-theme=dark] .calendar-event-focus{background:#111b31 !important;border-color:#223557 !important;color:#eef5ff !important}html[data-theme=dark] .home-mini-day.has-work{background:#163253 !important}html[data-theme=dark] .home-mini-day.today{box-shadow:inset 0 0 0 1px #4d83ca !important}html[data-theme=dark] .home-mini-title,html[data-theme=dark] .home-work-list h3,html[data-theme=dark] .home-work-row strong,html[data-theme=dark] .home-mini-summary strong{color:#eef5ff !important}html[data-theme=dark] .home-mini-weekdays span,html[data-theme=dark] .home-mini-legend,html[data-theme=dark] .home-work-row small,html[data-theme=dark] .home-mini-summary small{color:#b7c6e1 !important}html[data-theme=dark] .home-mini-dot,html[data-theme=dark] .legend-dot{background:#7db5ff !important;box-shadow:none !important}html[data-theme=dark] .home-work-row>span:last-child,html[data-theme=dark] .calendar-event-focus .time{color:#93c3ff !important}html[data-theme=dark] .calendar-event-focus .place{color:#b7c6e1 !important}


/* Butterfree 0.8.1 — fixed anchored add panel across all four tabs */
.modal-backdrop{
  align-items:flex-start;
  justify-content:center;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:28px 16px;
}
#main-modal{
  box-sizing:border-box;
  flex:none;
  display:flex;
  flex-direction:column;
  width:min(780px,100%);
  max-width:780px;
  height:min(710px,calc(100dvh - 56px));
  max-height:calc(100dvh - 56px);
  margin:0 auto;
  overflow:hidden;
}
#main-modal .modal-head,#main-modal .modal-kind-tabs,#main-modal .modal-footer{flex:0 0 auto;}
#main-modal .modal-kind-tabs{scrollbar-width:none;white-space:nowrap;overflow-x:auto;overflow-y:hidden;}
#main-modal .modal-kind-tabs::-webkit-scrollbar{display:none;}
#main-modal #item-form{
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
#main-modal #modal-fields{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#main-modal .modal-footer{position:static;margin-top:auto;}
@media(max-width:800px){
  .modal-backdrop{padding:12px;}
  #main-modal{width:100%;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);}
}

@media(max-height:540px){.modal-backdrop{padding:10px 12px}#main-modal{height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}}

/* Butterfree 0.9 — comptes élèves et services scolaires */
.nav-item[hidden]{display:none!important}.student-admin-grid{display:grid;grid-template-columns:minmax(290px,.85fr) minmax(300px,1.15fr);gap:18px}.student-admin-grid .panel{min-width:0}.student-create-form .cloud-fields{display:flex;flex-direction:column;gap:14px}.student-create-form label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:12px;font-weight:750}.student-create-form input:not([type=checkbox]){width:100%;background:var(--surface2);color:var(--text);border:1px solid var(--line);border-radius:13px;min-height:49px;padding:12px 14px;outline:none}.student-create-form input:focus{border-color:#5a9fed}.student-create-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0}.student-show-password{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important}.student-show-password input{width:16px;height:16px}.student-create-form>.btn-primary{width:100%}.student-create-form>.cloud-help{margin-top:12px}.student-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:16px 2px}.student-row:last-child{border-bottom:0}.student-avatar{background:#e5efff;color:#437fc6;font-weight:800;border-radius:14px;height:42px;width:42px;display:grid;place-items:center}.student-info{min-width:0;flex:1}.student-info strong{display:block;font-size:14px;color:var(--text)}.student-info small{color:var(--muted);font-size:12px;}.student-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.student-actions .btn{min-height:38px;padding:7px 10px}.students-count{display:inline-block;background:var(--surface2);border:1px solid var(--line);border-radius:999px;padding:3px 8px;font-size:12px;color:var(--muted)}.student-admin-tip{display:flex;align-items:flex-start;gap:13px;padding:22px 24px;background:var(--surface);border:1px solid var(--line);border-radius:20px;margin-top:18px}.student-admin-tip svg{color:#4a9dff}.student-admin-tip strong{color:var(--text);font-size:14px}.student-admin-tip p{margin:5px 0 0;font-size:13px;line-height:1.6}.cloud-admin-shortcut{margin-top:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface2);padding:20px}.cloud-admin-shortcut strong{display:block;font-size:16px}.cloud-admin-shortcut p{margin:8px 0 15px;font-size:13px}.school-setup{margin-bottom:18px}.school-setup-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.school-setup-row h2{margin:0 0 8px}.school-setup-row p{margin:0;font-size:13px;max-width:630px}.school-setup-status{font-size:12px;font-weight:800;padding:8px 12px;border-radius:999px;white-space:nowrap}.school-setup-status.good{color:#277b5d;background:#e3f8ef}.school-setup-status.warning{color:#ae7831;background:#fff3e2}.school-setup-actions{display:flex;align-items:center;gap:15px;margin-top:18px;flex-wrap:wrap}.school-setup-help{font-size:12px;color:var(--muted);flex:1}.school-panel{margin-top:0}.school-instruction{margin:12px 0 20px}
html[data-theme=dark] .student-avatar,html[data-theme=dark] .cloud-admin-shortcut,html[data-theme=dark] .student-create-form input:not([type=checkbox]){background:#192a46;color:#eef5ff;border-color:#2f456c}html[data-theme=dark] .school-setup-status.good{background:#163a31;color:#9ceacb}html[data-theme=dark] .school-setup-status.warning{background:#3a2d25;color:#e3c396}html[data-theme=dark] .student-admin-tip,html[data-theme=dark] .school-setup{background:#111b31;border-color:#223557}html[data-theme=dark] .student-admin-tip strong{color:#edf4ff}
@media(max-width:1050px){.student-admin-grid{grid-template-columns:1fr}}@media(max-width:650px){.school-setup-row{flex-direction:column}.student-row{align-items:flex-start;flex-wrap:wrap}.student-actions{width:100%;padding-left:54px}.student-admin-tip{padding:16px}.student-create-actions .btn{width:100%}}

.student-password-form{flex:0 0 100%;display:flex;align-items:end;gap:10px;padding:10px 0 2px 54px}.student-password-form[hidden]{display:none!important}.student-password-form label{flex:1;display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}.student-password-form input{min-width:0;width:100%;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--text);min-height:43px;padding:9px 12px}.student-password-form .btn{min-height:43px}@media(max-width:650px){.student-password-form{padding-left:0;flex-wrap:wrap}.student-password-form label,.student-password-form .btn{width:100%}}html[data-theme=dark] .student-password-form input{background:#192a46;color:#eef5ff;border-color:#2f456c}

.student-row{flex-wrap:wrap}.student-created-credentials{padding:16px 18px;border:1px solid #c3d8f5;border-radius:16px;background:#f1f7ff;margin-top:18px}.student-created-credentials[hidden]{display:none!important}.student-created-credentials>strong{font-size:14px;color:#244875}.student-credential-line{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #dae7f9;padding:10px 0}.student-credential-line span{color:#647a96;font-size:12px}.student-credential-line code{font-size:13px;overflow-wrap:anywhere}.student-created-credentials>.btn{margin-top:14px}.student-created-credentials>.cloud-help{margin:10px 0 0}html[data-theme=dark] .student-created-credentials{background:#142846;border-color:#274f80}html[data-theme=dark] .student-created-credentials>strong{color:#d5e8ff}html[data-theme=dark] .student-credential-line{border-color:#274263}html[data-theme=dark] .student-credential-line span{color:#b7c6e1}

/* Butterfree 0.10 : authentification obligatoire, sans mode local. */
.auth-gate[hidden]{display:none!important}
.auth-gate{position:fixed;inset:0;z-index:25000;display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto;background:#eef4fd;}
.auth-card{width:min(100%,440px);padding:32px;background:#fff;border-radius:25px;box-shadow:0 24px 90px rgba(28,59,116,.12);color:#172941;}
.auth-brand{display:flex;align-items:center;gap:16px;margin-bottom:24px;}
.auth-brand img{object-fit:contain;border-radius:12px;flex-shrink:0}.auth-brand h1{font-size:28px;margin:0;letter-spacing:-.7px;color:#172941}.auth-brand p{font-size:13px;margin:3px 0 0;color:#76869d}
.auth-status{font-size:14px;line-height:1.6;color:#526780;margin:0 0 20px}
.auth-login{display:grid;gap:16px}.auth-login label{gap:7px;font-weight:700;font-size:12px;color:#405675;}.auth-login input{width:100%;min-height:49px;padding:12px 14px;border:1px solid #d5dfef;border-radius:12px;font:inherit;font-size:14px;outline:none;}.auth-login input:focus{border-color:#418cef;box-shadow:0 0 0 3px rgba(65,140,239,.1)}.auth-login button{min-height:46px;width:100%}
.auth-footnote{color:#77889e;font-size:12px;line-height:1.6;margin:18px 0 0}.auth-actions{display:flex;flex-wrap:wrap;gap:10px}.auth-actions .btn{flex:1;min-width:125px}.student-info small{display:block;overflow-wrap:anywhere}
@media(max-width:500px){.auth-gate{padding:12px}.auth-card{padding:24px;border-radius:20px}.auth-brand h1{font-size:25px}}

.auth-login{grid-template-columns:minmax(0,1fr);margin:0}.auth-login label{display:flex;flex-direction:column}.auth-login input{background:#fff!important;color:#152a48!important;box-shadow:none!important}.auth-error{color:#ad3047!important;background:#fff0f1;padding:10px 12px;border-radius:10px;font-size:13px;line-height:1.5;margin:0}

/* Butterfree 0.11 — paramètres par rubriques, avatar privé */
.settings-tabs{display:flex;gap:5px;padding:5px;margin-bottom:20px;background:var(--surface2);border-radius:13px;width:max-content;max-width:100%;}
.settings-tabs button{background:transparent;color:var(--muted);border:0;border-radius:10px;font-weight:700;font-size:12px;padding:11px 17px;white-space:nowrap}
.settings-tabs button.selected{background:var(--surface);color:var(--green);box-shadow:0 2px 8px #00000008}
.settings-page[hidden]{display:none!important}
.settings-account-grid{grid-template-columns:minmax(260px,.9fr) minmax(330px,1.1fr);align-items:start}
.settings-account-grid .cloud-panel{margin-top:0}
.settings-page .subjects-panel{margin-top:0}
.profile-avatar-editor{display:flex;align-items:center;gap:18px;margin:18px 0 25px}
.profile-avatar-preview{width:90px;height:90px;border-radius:24px;background:var(--mint);color:var(--green);font-size:31px;font-weight:800;display:grid;place-items:center;overflow:hidden;flex-shrink:0;border:1px solid var(--line)}
.profile-avatar-preview img,.top-account-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.profile-avatar-buttons{display:flex;align-items:flex-start;flex-wrap:wrap;gap:9px}
.profile-avatar-buttons .btn{cursor:pointer}
.profile-avatar-buttons input[hidden],.profile-avatar-buttons button[hidden]{display:none!important}
.top-account-avatar{width:38px;height:38px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--line);border-radius:50%;background:var(--mint);color:var(--green);font-weight:800;padding:0;flex-shrink:0}
.top-account-avatar:hover{box-shadow:0 0 0 3px color-mix(in srgb,var(--green),transparent 84%)}
.cloud-details{border-top:1px solid var(--line)}
.cloud-details summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;user-select:none}
.cloud-details summary::-webkit-details-marker{display:none}
.cloud-details summary::after{content:"⌄";font-size:20px;line-height:1;color:var(--muted);transition:transform .2s}
.cloud-details[open] summary::after{transform:rotate(180deg)}
.cloud-details .cloud-actions{padding:6px 0 0}
@media(max-width:1070px){.settings-account-grid{grid-template-columns:1fr}}
@media(max-width:650px){.settings-tabs{width:100%;overflow-x:auto;flex-wrap:nowrap}.settings-tabs button{font-size:11px;padding:11px 12px}.profile-avatar-preview{width:74px;height:74px;border-radius:19px}.profile-avatar-editor{gap:13px}}

/* Butterfree 0.12 — PWA smartphone et synchronisation scolaire */
.settings-tabs{flex-wrap:wrap}
.pwa-panel{max-width:820px}
.pwa-hero{display:flex;align-items:center;gap:15px;margin:14px 0;padding:16px;border:1px solid var(--line);background:var(--surface2);border-radius:17px}
.pwa-hero img{height:64px;width:64px;border-radius:16px;object-fit:cover}
.pwa-hero strong{font-size:18px;display:block;color:var(--text)}
.pwa-hero span{color:var(--muted);font-size:13px;display:block;margin-top:3px}
.pwa-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.pwa-instructions{margin:13px 0;color:var(--muted);font-size:13px;line-height:1.65}
.pwa-instructions strong{color:var(--text)}
.pwa-update-result{border-left:3px solid var(--green);padding-left:12px;margin-top:12px}
.pwa-footnote{font-size:12px;line-height:1.55;color:var(--muted);padding-top:16px;border-top:1px solid var(--line)}
.school-auto-option{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:16px 0;padding:18px;border-radius:14px;border:1px solid var(--line);background:var(--surface2)}
.school-auto-option strong,.school-auto-option small{display:block}
.school-auto-option strong{color:var(--text);font-size:14px}
.school-auto-option small{color:var(--muted);line-height:1.55;font-size:12px;margin-top:5px;max-width:570px}
.school-auto-option .switch{flex:0 0 auto}
button,a{-webkit-tap-highlight-color:transparent}
@media(display-mode:standalone){.app-layout{min-height:100dvh}.sidebar{padding-bottom:max(8px,env(safe-area-inset-bottom))}.topbar{padding-top:max(8px,env(safe-area-inset-top))}}
@media(max-width:560px){.pwa-actions .btn{width:100%}.pwa-panel{padding:18px}.school-auto-option{padding:13px}.settings-tabs{gap:6px}.settings-tabs button{font-size:12px}}

/* Butterfree 0.13 · tâches enrichies, sélecteur de matière et transitions */
@keyframes bf-fade-in{from{opacity:0}to{opacity:1}}
@keyframes bf-fade-out{from{opacity:1}to{opacity:0}}

.view.active.is-leaving{pointer-events:none;}
.settings-page:not([hidden]){animation:bf-fade-in .2s ease both}
.settings-page.is-leaving{animation:bf-fade-out .2s ease both;pointer-events:none}
.modal-backdrop:not([hidden]){animation:bf-fade-in .2s ease both}
.modal-backdrop.is-closing{animation:bf-fade-out .2s ease both;pointer-events:none}
.task-detail-panel:not([hidden]){animation:bf-fade-in .2s ease both}
.task-detail-panel.is-leaving{animation:bf-fade-out .2s ease both;pointer-events:none}
.task-detail-scrim:not([hidden]){animation:bf-fade-in .2s ease both}
.task-detail-scrim.is-leaving{animation:bf-fade-out .2s ease both;pointer-events:none}
.page-heading{margin-bottom:20px}
.page-heading h1{margin:0}
.tasks-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.tasks-workspace:has(.task-detail-panel:not([hidden])){grid-template-columns:minmax(0,1.25fr) minmax(310px,.95fr)}
.tasks-panel,.task-detail-panel{min-width:0}
.tasks-workspace:has(.task-detail-panel:not([hidden])) .task-entry{padding:15px 12px}
.tasks-workspace .task-entry.selected{background:color-mix(in srgb,var(--task-subject-color,#4a9dff) 10%,var(--surface));border-color:color-mix(in srgb,var(--task-subject-color,#4a9dff) 50%,var(--line));box-shadow:inset 3px 0 0 var(--task-subject-color,#4a9dff)}
.task-meta,.item-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.task-entry .item-click{display:block}
.task-entry .subject-bullet,.item-row .subject-bullet{width:9px;height:9px}
.task-row-progress{margin-top:8px;height:3px;background:var(--line);border-radius:12px;overflow:hidden;width:min(160px,90%)}
.task-row-progress span{display:block;height:100%;background:#4a9dff;border-radius:12px}
.task-check{position:relative;overflow:visible}
.task-entry.done .task-check,.task-check.checked,.task-check.is-completing{background:#4a9dff!important;border-color:#4a9dff!important;color:white!important}
.task-check.is-completing svg{animation:bf-check-in .3s cubic-bezier(.12,1.5,.5,1) both}
@keyframes bf-check-in{from{transform:scale(.2);opacity:0}65%{transform:scale(1.28);opacity:1}to{transform:scale(1)}}
.task-completion-burst{position:fixed;z-index:100;pointer-events:none;width:0;height:0}
.completion-ring{position:absolute;border:2px solid #4a9dff;border-radius:50%;width:42px;height:42px;left:-21px;top:-21px;animation:bf-ring .6s ease-out forwards}
.completion-star{position:absolute;left:-7px;top:-8px;color:#eeb957;font-size:17px;text-shadow:0 0 5px #fff7;animation:bf-star .63s cubic-bezier(.15,.7,.3,1) forwards;--a:calc(var(--i) * 51.43deg);transform:rotate(var(--a))}
@keyframes bf-ring{0%{transform:scale(.2);opacity:.8}100%{transform:scale(2.1);opacity:0}}
@keyframes bf-star{0%{transform:rotate(var(--a)) translateY(0) scale(.3);opacity:0}20%{opacity:1}100%{transform:rotate(var(--a)) translateY(-38px) scale(.75);opacity:0}}
.task-detail-panel{position:sticky;top:16px;padding:0!important;overflow:hidden;min-height:370px;border-radius:22px!important}
.task-detail-hero{position:relative;padding:62px 22px 22px;background:linear-gradient(135deg,color-mix(in srgb,var(--detail-color,#4a9dff) 85%,#238ff2),#208ce8);color:#fff}
.task-detail-hero h2{color:#fff!important;font-size:20px;line-height:1.35;margin:0 0 5px;overflow-wrap:anywhere}
.task-detail-tools{position:absolute;top:14px;right:14px;display:flex;gap:7px}
.task-detail-icon{width:33px;height:33px;display:grid;place-items:center;background:#ffffff22;border:1px solid #ffffff44;color:#fff;border-radius:10px;transition:background .2s}
.task-detail-icon:hover{background:#ffffff44}
.task-detail-icon svg{width:16px;height:16px}
.task-detail-subject{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:650}
.task-detail-subject .subject-bullet{border:1px solid #fff9}
.task-detail-date{font-size:12px;margin-top:11px;opacity:.88}
.task-detail-body{padding:22px 20px 26px}
.task-detail-body h3{margin:0 0 12px;font-size:13px;font-weight:750;color:var(--text)}
.task-detail-body h3 .task-percent{float:right;color:#4a9dff}
.task-progress-area{position:relative;border-radius:12px;height:48px;background:color-mix(in srgb,#4a9dff 12%,var(--surface));display:flex;align-items:center;padding:0 12px}
.task-progress-track{position:absolute;left:12px;right:12px;height:10px;border-radius:10px;background:color-mix(in srgb,#4a9dff 10%,var(--surface));pointer-events:none;overflow:hidden}
.task-progress-track div{height:100%;background:#4a9dff;border-radius:10px;transition:width .2s}
.task-progress-area input[type=range]{appearance:none;width:100%;height:32px;position:relative;background:transparent;cursor:pointer;margin:0;outline-offset:2px}
.task-progress-area input[type=range]::-webkit-slider-runnable-track{height:10px;background:transparent}
.task-progress-area input[type=range]::-webkit-slider-thumb{appearance:none;background:#fff;width:20px;height:20px;margin-top:-5px;border:3px solid #4a9dff;border-radius:50%;box-shadow:0 2px 6px #1d63aa33}
.task-progress-area input[type=range]::-moz-range-thumb{background:#fff;width:17px;height:17px;border:3px solid #4a9dff;border-radius:50%}
.task-progress-area input:disabled{cursor:default;opacity:.5}
.task-progress-help{font-size:11px;color:var(--muted);margin-top:9px}
.task-complete-action{display:flex;width:100%;margin-top:16px;justify-content:center}
.task-detail-section{margin-top:23px;padding-top:20px;border-top:1px solid var(--line)}
.task-detail-section-header{display:flex;justify-content:space-between;gap:10px}
.task-sub-count{font-size:11px;color:var(--muted);font-weight:600}
.task-subtask-list{display:flex;flex-direction:column;gap:5px}
.task-subtask{display:flex;align-items:center;gap:10px;padding:10px 9px;background:var(--surface2);border-radius:9px;min-width:0}
.task-subtask span{flex:1;min-width:0;overflow-wrap:anywhere}
.task-subtask.done span{text-decoration:line-through;opacity:.65}
.task-sub-check{width:21px;height:21px;border-radius:6px;border:1.5px solid #9bb5d4;background:var(--surface);display:grid;place-items:center;color:#fff;padding:0;flex:none}
.task-subtask.done .task-sub-check{background:#4a9dff;border-color:#4a9dff}
.task-sub-check svg{width:13px;height:13px}
.task-sub-delete{display:grid;place-items:center;width:23px;height:23px;border:0;background:transparent;color:var(--muted);opacity:.6}
.task-sub-delete:hover{opacity:1;color:var(--red)}
.task-sub-delete svg{width:14px;height:14px}
.task-sub-empty{font-size:12px;color:var(--muted);margin:0}
.task-add-subtask-form{display:flex;gap:7px;margin-top:10px}
.task-add-subtask-form input{min-width:0;flex:1;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:10px 12px;color:var(--text);font-size:12px}
.task-add-subtask-form .btn{min-height:38px;padding:6px 11px}
.task-detail-description{font-size:12px;color:var(--muted);line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.task-detail-scrim{display:none}
/* Sélecteur de matière personnalisé : pastille colorée dans chaque choix */
.subject-field{position:relative}
.subject-picker{position:relative}
.subject-picker-trigger{width:100%;min-height:49px;display:flex;align-items:center;gap:10px;background:var(--surface2);border:1px solid var(--line);border-radius:12px;padding:11px 14px;text-align:left;color:var(--text)}
.subject-picker-trigger:hover{border-color:#84bcfc}
.subject-picker-trigger:focus-visible,.subject-picker-option:focus-visible{outline:2px solid #4a9dff;outline-offset:1px}
.subject-picker-value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.subject-picker-trigger svg{width:16px;height:16px;color:var(--muted);transition:transform .2s}
.subject-picker-trigger[aria-expanded=true] svg{transform:rotate(180deg)}
.subject-picker-dot{width:10px;height:10px;flex:none;border-radius:50%;border:1px solid #0001}
.subject-picker-dot.empty{background:transparent;border:1px solid var(--muted)}
.subject-picker-menu{position:absolute;inset:auto 0 auto 0;top:calc(100% + 6px);max-height:236px;overflow-y:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;z-index:80;box-shadow:0 14px 34px rgba(28,54,86,.18);animation:bf-fade-in .2s ease}
.subject-picker-menu[hidden]{display:none!important}
.subject-picker-option{display:flex;align-items:center;gap:11px;width:100%;min-height:42px;padding:10px 13px;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text)}
.subject-picker-option:last-child{border-bottom:0}
.subject-picker-option span:nth-child(2){flex:1}
.subject-picker-option:hover,.subject-picker-option.selected{background:color-mix(in srgb,#4a9dff 13%,var(--surface))}
.subject-picker-option.selected{box-shadow:inset 3px 0 0 #4a9dff;color:#317fd7}
.subject-picker-option svg{width:15px;height:15px;color:#4a9dff}
@media(max-width:1050px){
 .tasks-workspace:has(.task-detail-panel:not([hidden])){grid-template-columns:minmax(0,1fr)}
 .task-detail-scrim:not([hidden]){display:block;position:fixed;inset:0;background:#0c173783;z-index:45}
 .task-detail-panel:not([hidden]){position:fixed;inset:0 0 0 auto;width:min(100%,450px);height:100dvh;overflow-y:auto;z-index:46;border-radius:18px 0 0 18px!important;box-shadow:-12px 0 40px #0002}
}
@media(max-width:640px){.task-detail-hero{padding-top:62px}.task-detail-panel:not([hidden]){width:100%;border-radius:0!important}.tasks-workspace .task-entry{gap:8px}.task-add-subtask-form{flex-wrap:wrap}.task-add-subtask-form .btn{flex:none}}
@media(prefers-reduced-motion:reduce){.view.active,.view.active.is-leaving,.settings-page:not([hidden]),.modal-backdrop:not([hidden]),.task-detail-panel:not([hidden]),.task-detail-scrim:not([hidden]),.task-completion-burst{animation:none!important}}

/* Autres panneaux dynamiques */
.school-preview:not([hidden]),.school-setup:not([hidden]),.student-email-form:not([hidden]),.student-password-form:not([hidden]),.pwa-instructions:not([hidden]),.cloud-details[open] > :not(summary){animation:bf-fade-in .2s ease both}
.auth-gate:not([hidden]){animation:bf-fade-in .2s ease both}
@media(prefers-reduced-motion:reduce){.school-preview:not([hidden]),.school-setup:not([hidden]),.student-email-form:not([hidden]),.student-password-form:not([hidden]),.pwa-instructions:not([hidden]),.cloud-details[open] > :not(summary),.auth-gate:not([hidden]){animation:none!important}}


/* Butterfree 0.14 — responsive home, weekly horizontal scrolling and fixed mobile navigation */
.home-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.home-grid > .panel, .home-grid #home-tasks, .home-grid #home-events,
.home-grid .home-mini-calendar, .home-grid .home-mini-side,
.home-mini-summary > div, .home-work-list {min-width:0;max-width:100%}
.home-grid #home-events {grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}
.week-calendar-scroll {min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.week-calendar {min-width:0}
.settings-section-title {font-size:19px;line-height:1.35;margin:0 0 16px;color:var(--text)}
.settings-school-content,.settings-import-content {min-width:0}
.settings-school-content .school-panel {margin-top:0}
@media(max-width:1200px) {
 .home-grid {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:980px) {
 .home-grid #home-events {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:800px) {
 html,body {max-width:100%;}
 .app-layout,.main-layout,main,#page-content,.view,.home-grid {min-width:0;max-width:100%}
 .home-grid {grid-template-columns:minmax(0,1fr);width:100%}
 .home-grid > .panel {width:100%;min-width:0;overflow:hidden}
 .home-grid #home-events {width:100%;grid-template-columns:minmax(0,1fr)}
 .home-mini-calendar {width:100%;min-width:0;padding:clamp(10px,3vw,16px)}
 .home-mini-weekdays,.home-mini-grid {gap:clamp(2px,1.2vw,6px)}
 .home-mini-weekdays span,.home-mini-day {min-width:0}
 .home-mini-day {min-height:43px;border-radius:10px}
 .home-mini-summary > div {min-width:0}
 #home-tasks .item-row {min-width:0;max-width:100%;gap:7px}
 #home-tasks .item-row .item-click {min-width:0;overflow:hidden}
 #home-events .home-work-row {min-width:0}
 .home-grid .panel-heading > div {min-width:0}
 .home-grid .panel-heading h2 {overflow-wrap:anywhere}
 .home-grid .panel-heading .text-button {flex:0 0 auto}
 .calendar-panel {overflow:hidden}
 .calendar-scroll,.week-calendar-scroll {width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
 .week-calendar {display:grid;gap:0;width:max-content;min-width:max-content;min-height:310px;overflow:visible;}
 .calendar-day {width:var(--mobile-day-width);min-width:var(--mobile-day-width);padding:16px 11px 25px}
 .day-label {font-size:12px}
 .calendar-event .title {font-size:12px}
 .sidebar {position:fixed;top:auto!important;left:0;right:0;bottom:0;inset:auto 0 0 0;z-index:30;width:100%;max-width:100vw;height:auto;min-height:calc(70px + env(safe-area-inset-bottom,0px));padding:6px 6px max(8px,env(safe-area-inset-bottom,0px));display:flex;flex-direction:row;justify-content:center;align-items:center;gap:0;overflow:visible}
 .sidebar nav.main-nav,.sidebar nav.main-nav:nth-of-type(2) {display:flex;flex-direction:row;min-width:0;max-width:none;gap:1px}
 .sidebar nav.main-nav:first-of-type {flex:4 1 0}
 .sidebar nav.main-nav:nth-of-type(2) {flex:2 1 0}
 .sidebar nav.main-nav:nth-of-type(2) .nav-item:nth-child(1) {display:flex}
 .sidebar .nav-item {min-width:0;flex:1 1 0;min-height:54px;height:54px;padding:6px 1px;border-radius:11px;gap:3px}
 .sidebar .nav-item svg {width:21px;height:21px}
 .main-layout {margin-left:0}
 main {padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .settings-tabs {width:100%;max-width:100%;min-width:0;display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .settings-tabs::-webkit-scrollbar {display:none}
 .settings-tabs button {flex:0 0 auto}
}
@media(max-width:560px) {
 .sidebar .nav-item span:nth-child(2) {position:static;width:auto;height:auto;margin:0;clip-path:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:clamp(8px,2.2vw,10px);font-weight:650}
 .sidebar .nav-item {gap:2px}
}
@media(max-width:360px) {
 .home-mini-calendar {padding:9px}
 .home-mini-grid,.home-mini-weekdays {gap:2px}
 .home-mini-day {min-height:39px}
 .home-mini-title {font-size:12px}
 .home-mini-header {gap:5px}
 .home-mini-summary {gap:5px}
 .home-mini-summary > div {padding:8px}
 .sidebar .nav-item span:nth-child(2) {font-size:8px}
}
@media(display-mode:standalone) and (max-width:800px) {
 .sidebar {padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
}

/* 0.14 refinements: actual centering even at the two ends of the week. */
@media(min-width:981px) and (max-width:1550px) {
 .home-grid #home-events {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:800px) {
 .week-calendar-scroll {
   --mobile-day-width:clamp(168px,calc((100vw - 50px) / 2),250px);
   padding-inline:max(0px,calc((100% - var(--mobile-day-width)) / 2));
 }
 .week-calendar {--mobile-day-width:inherit}
}
@media(max-width:560px) {
 .sidebar .nav-item span:nth-child(2)[data-mobile-short] {font-size:0;line-height:1.2}
 .sidebar .nav-item span:nth-child(2)[data-mobile-short]::after {content:attr(data-mobile-short);font-size:clamp(9px,2.45vw,11px);font-weight:650}
}


/* Skin clair aéré, boutons flottants noirs.
   Les couleurs des matières, les états de tâches et le mode sombre restent fonctionnels. */
html:not([data-theme="dark"]){
 --bg:#ffffff;--sidebar:#ffffff;--surface:#ffffff;--surface2:#f7f7f7;
 --text:#191a1c;--muted:#72767a;--line:#ededed;--green:#171717;
 --green-hover:#363636;--mint:#f3f3f3;--shadow:none;--radius:18px;
}
html:not([data-theme="dark"]) body{background:#fff;color:var(--text)}
html:not([data-theme="dark"]) .topbar{background:#fff;border-color:#f0f0f0}
html:not([data-theme="dark"]) .sidebar{background:#fff;border-color:#ececec;box-shadow:none}
html:not([data-theme="dark"]) .nav-item{color:#74777a}
html:not([data-theme="dark"]) .nav-item.active{background:#f1f1f1;color:#161616}
html:not([data-theme="dark"]) .nav-item:not(.active):hover{background:#f8f8f8;color:#111}
html:not([data-theme="dark"]) .top-account-avatar{background:#f4f4f4;color:#141414;border-color:#e8e8e8}
html:not([data-theme="dark"]) .subtle-tag{background:#f5f5f5;color:#505050}
html:not([data-theme="dark"]) .stat-card,html:not([data-theme="dark"]) .panel{border:1px solid #ededed;box-shadow:none;background:#fff}
html:not([data-theme="dark"]) .stat-card{border-radius:0;border:0;border-bottom:1px solid #e9e9e9;padding-block:24px}
html:not([data-theme="dark"]) .stat-top,html:not([data-theme="dark"]) .stat-caption{color:#74777b}
html:not([data-theme="dark"]) .stat-top svg{color:#292929}
html:not([data-theme="dark"]) .stat-value{color:#101010;font-weight:760}
html:not([data-theme="dark"]) .panel-heading h2{font-weight:740;letter-spacing:-.45px}
html:not([data-theme="dark"]) .text-button{color:#292929}
html:not([data-theme="dark"]) .connection-info{background:#fcfcfc;border-color:#ececec}
html:not([data-theme="dark"]) .connection-info p{color:#6f7276}
html:not([data-theme="dark"]) .connection-icon{background:#f4f4f4;color:#313131}
html:not([data-theme="dark"]) .btn-primary{background:#151515;color:#fff;border-radius:999px;box-shadow:none}
html:not([data-theme="dark"]) .btn-primary:hover{background:#353535;color:#fff}
html:not([data-theme="dark"]) .btn-outline,html:not([data-theme="dark"]) .btn-light{border-radius:999px;color:#252525}
html:not([data-theme="dark"]) .btn-outline{background:#fff;border-color:#dfdfdf}
html:not([data-theme="dark"]) .btn-outline:hover,html:not([data-theme="dark"]) .btn-light:hover{background:#f4f4f4}
html:not([data-theme="dark"]) .btn-light{background:#f7f7f7}
html:not([data-theme="dark"]) .segmented,html:not([data-theme="dark"]) .settings-tabs{background:#f8f8f8;border:1px solid #f0f0f0}
html:not([data-theme="dark"]) .segmented button.selected,html:not([data-theme="dark"]) .settings-tabs button.selected{background:#fff;color:#161616;box-shadow:0 1px 5px #0000000a}
html:not([data-theme="dark"]) .focus-watch,html:not([data-theme="dark"]) .focus-metric strong{color:#171717}
html:not([data-theme="dark"]) .focus-watch.running{color:#171717}
html:not([data-theme="dark"]) .focus-message,html:not([data-theme="dark"]) .focus-field,html:not([data-theme="dark"]) .focus-metric span{color:#777}
html:not([data-theme="dark"]) .focus-state{background:#f6f6f6;color:#555}
html:not([data-theme="dark"]) .focus-state[data-status=running]{background:#eff8f1;color:#237e56}
html:not([data-theme="dark"]) .home-mini-calendar{background:#fbfbfb;border-color:#eee}
html:not([data-theme="dark"]) .home-mini-day{background:#fff;border-color:#f1f1f1}
html:not([data-theme="dark"]) .home-mini-day.today{border-color:#222;color:#151515}
html:not([data-theme="dark"]) .home-mini-title{color:#141414}

html:not([data-theme="dark"]) .calendar-day.today .day-number{background:#171717;color:#fff}

html:not([data-theme="dark"]) .task-check.is-completing{background:#171717!important;border-color:#171717!important}
html:not([data-theme="dark"]) .auth-gate{background:#fff}
html:not([data-theme="dark"]) .auth-card{box-shadow:0 12px 55px #0000000c;border:1px solid #efefef}
html:not([data-theme="dark"]) .auth-card .btn-primary{background:#171717;color:#fff}
/* Boutons de création/démarrage des en-têtes : pilules noires sur ordinateur. */
.page-heading > .btn:is(.btn-primary,.btn-outline){min-height:43px;border-radius:999px;padding:10px 20px}
html:not([data-theme="dark"]) .page-heading > .btn.btn-outline{background:#171717;color:#fff;border-color:#171717}
html:not([data-theme="dark"]) .page-heading > .btn.btn-outline:hover{background:#343434}
/* Les nouvelles commandes mobiles ne sont pas des duplications visuelles sur ordinateur. */
.mobile-action-bar{display:none}
@media(min-width:801px){
 main{padding-top:48px}
 .panel{padding:27px 29px}
 .calendar-panel{padding:0}
 .stat-card{padding:27px 21px}
 .home-grid{gap:22px}
 .stats-grid{gap:22px;margin-bottom:32px}
 .page-heading{margin-bottom:27px}
}
@media(max-width:800px){
 main{padding-top:26px}
 .sidebar{backdrop-filter:saturate(180%) blur(16px);-webkit-backdrop-filter:saturate(180%) blur(16px);box-shadow:none}
 html:not([data-theme="dark"]) .sidebar{background:rgba(255,255,255,.84);border-top:1px solid rgba(24,24,24,.08);box-shadow:none}
 
 html:not([data-theme="dark"]) .sidebar .nav-item{background:transparent}
 html:not([data-theme="dark"]) .sidebar .nav-item.active{background:rgba(17,17,17,.06);color:#111}
 html:not([data-theme="dark"]) .sidebar .nav-item.active svg{color:#111}
 
 
 .panel{border:0;box-shadow:none;border-radius:19px}
 .stat-card{border:0;border-bottom:1px solid #ececec;padding:20px 10px 18px}
 .home-grid{gap:23px}
 .stats-grid{gap:14px;margin-bottom:30px}
 .page-heading h1{font-size:clamp(25px,6vw,29px);letter-spacing:-.85px}
 /* Le bouton reste centré et collé au haut de l'écran dès qu'il atteint ce seuil,
    à la manière de « + TRIER ET FILTRER » dans la vidéo. */
 .mobile-action-bar{position:sticky;top:calc(11px + env(safe-area-inset-top,0px));z-index:28;
  display:flex;justify-content:center;align-items:center;gap:8px;max-width:100%;
  margin:10px 0 29px;padding:0 3px;pointer-events:none}
 .mobile-action-pill{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:9px;
  border:1px solid #111;border-radius:999px;min-height:43px;padding:11px 19px;
  background:#111;color:#fff;font-size:11px;line-height:1.3;font-weight:750;
  text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;
  box-shadow:none;
  transition:background .18s,box-shadow .18s,transform .18s}
 .mobile-action-pill svg{width:15px;height:15px;stroke-width:2}
 .mobile-action-pill:hover{background:#333}
 .mobile-action-pill:active{transform:scale(.96)}
 .mobile-action-pill-secondary{background:rgba(255,255,255,.8);color:#191919;border-color:#dedede;box-shadow:none}
 .mobile-action-pill-secondary:hover{background:#f2f2f2}
 .page-heading>.btn:is(.btn-primary,.btn-outline){display:none}
 #top-add{display:none}
 #view-home .mobile-action-bar{margin-top:8px}
 #view-focus .mobile-action-bar{margin-bottom:18px}
 .focus-panel{padding-top:29px}
}
@media(max-width:360px){
 .mobile-action-pill{min-height:41px;padding:10px 14px;font-size:10px;gap:5px}
 .mobile-action-pill-secondary{padding:10px 12px}
}
/* Le thème sombre conserve un contraste suffisant pour la nouvelle barre. */


@media(prefers-reduced-motion:reduce){.mobile-action-pill{transition:none}}
/* Ajustements finaux : typographie monochrome et action unique en vue mobile. */
html:not([data-theme="dark"]) :is(h1,h2,h3){color:#171717}
html:not([data-theme="dark"]) :is(.item-title,.task-title,.home-work-row strong,.home-mini-title,.focus-history-info strong,.focus-no-history strong,.student-info strong){color:#171717}
html:not([data-theme="dark"]) .sidebar .nav-item svg{color:#74777b}
html:not([data-theme="dark"]) .sidebar .nav-item.active svg{color:#181818}
html:not([data-theme="dark"]) .topbar .today-date{color:#757575}
html:not([data-theme="dark"]) .sidebar-title{color:#a0a0a0}
html:not([data-theme="dark"]) .focus-history-duration{color:#272727}
@media(max-width:800px){
 /* Les commandes originales du chronomètre restent accessibles sur ordinateur.
    Sur mobile, l'action flottante les remplace sans double bouton. */
 .focus-controls{display:none}
}
html:not([data-theme="dark"]) .calendar-day{background:#fff;border:1px solid #ededed;box-shadow:none}
html:not([data-theme="dark"]) .calendar-day.today{background:#fafafa;border-color:#e4e4e4;box-shadow:none}
html:not([data-theme="dark"]) .calendar-toolbar{border-bottom-color:#ededed}
html:not([data-theme="dark"]) .calendar-range h2{color:#171717}
html:not([data-theme="dark"]) .day-label{color:#777}
html:not([data-theme="dark"]) .focus-field .field-control{background:#fff;border:1px solid #e7e7e7;color:#171717}
html:not([data-theme="dark"]) .field-control:focus{border-color:#777;box-shadow:0 0 0 3px #0000000d}
html:not([data-theme="dark"]) .modal{background:#fff;border-color:#eee}
html:not([data-theme="dark"]) .modal-kind-tabs button.selected{color:#171717;background:#f5f5f5}


@media(max-width:800px){
 html:not([data-theme="dark"]) .sidebar::before,html[data-theme="dark"] .sidebar::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:0}
 html:not([data-theme="dark"]) .sidebar::before{background:linear-gradient(to bottom,rgba(255,255,255,.72),rgba(255,255,255,.88))}
 
 .sidebar>*{position:relative;z-index:1}
}
/* Skin sombre monochrome.
   High contrast without tinted/navy surfaces. Subject identity colors remain available
   on dots and progress charts, and safety/error states retain their semantics. */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#080808; --sidebar:#0d0d0d; --surface:#121212; --surface2:#1d1d1d;
  --text:#f7f7f7; --muted:#b6b6b6; --line:#323232;
  --green:#f7f7f7; --green-hover:#dedede; --mint:#242424;
  --shadow:none; --blue:#dedede; --violet:#cccccc;
  --red:#ff9b9b; --redlight:#382222;
  accent-color:#f7f7f7;
}
html[data-theme="dark"] body{background:#080808!important;color:#f7f7f7!important}
html[data-theme="dark"] :is(.main-layout,main){background:#080808!important}
html[data-theme="dark"] :is(.sidebar,.topbar){background:#0d0d0d!important;border-color:#2b2b2b!important;box-shadow:none!important}
html[data-theme="dark"] .sidebar{box-shadow:none!important}
html[data-theme="dark"] :is(.panel,.stat-card,.connection-info,.modal,.calendar-day,.focus-panel,.focus-metric,.focus-breakdown,.focus-history,.school-setup,.student-admin-tip,.student-admin-grid .panel){
  background:#121212!important;color:#f7f7f7!important;border-color:#303030!important;box-shadow:none!important;
}
html[data-theme="dark"] :is(.stat-card,.panel,.calendar-day,.modal,.connection-info){box-shadow:none!important}
html[data-theme="dark"] :is(.page-heading h1,.panel h2,.panel h3,.panel-heading h2,.item-title,.task-title,.stat-value,.giant-average,.modal-head h2,.brand strong,.crumb strong,.focus-watch,.focus-metric strong,.focus-history-info strong,.focus-no-history strong,.home-mini-title,.home-work-row strong,.home-mini-summary strong,.student-info strong,.school-provider,.school-service-header strong){color:#fff!important}
html[data-theme="dark"] :is(p,.item-meta,.task-meta,.stat-caption,.stat-top,.today-date,.crumb,.crumb-dim,.crumb-sep,.sidebar-bottom p,.brand small,.sidebar-title,.cloud-help,.subject-help,.empty-state p,.page-heading p,.heading-aside,.panel-heading p,.home-work-row small,.home-mini-summary small,.home-mini-weekdays span,.home-mini-legend,.focus-message,.focus-footnote,.focus-field,.focus-metric span,.focus-history-info small,.day-label,.calendar-event .time,.calendar-event .place,.school-service-header small){color:#bcbcbc!important}
html[data-theme="dark"] :is(.subtle-tag,.notice-pill,.connection-icon,.empty-illustration,.big-icon,.profile-avatar-preview,.student-avatar,.focus-no-history-icon){background:#242424!important;color:#f2f2f2!important;border-color:#393939!important;box-shadow:none!important}
html[data-theme="dark"] :is(.nav-item,.sidebar .nav-item:not(.active),.sidebar .nav-item:not(.active) svg,.nav-item svg){color:#bdbdbd!important}
html[data-theme="dark"] .nav-item:hover{background:#222!important;color:#fff!important}
html[data-theme="dark"] :is(.nav-item.active,.sidebar .nav-item.active){background:#292929!important;color:#fff!important;border:0!important;box-shadow:none!important}
html[data-theme="dark"] :is(.nav-item.active svg,.sidebar .nav-item.active svg){color:#fff!important}
html[data-theme="dark"] :is(.top-account-avatar,#theme-toggle){background:#242424!important;color:#f8f8f8!important;border-color:#3b3b3b!important;box-shadow:none!important}
html[data-theme="dark"] :is(.top-account-avatar:hover,#theme-toggle:hover){background:#333!important;box-shadow:none!important}
html[data-theme="dark"] :is(.text-button,.eyebrow,.subject-action,.school-status-label,.calendar-placeholder,.home-work-row>span:last-child,.focus-history-duration){color:#f5f5f5!important}
html[data-theme="dark"] .text-button:hover{text-decoration:underline;text-underline-offset:3px}
html[data-theme="dark"] .btn{box-shadow:none!important}
html[data-theme="dark"] :is(.btn-primary,.page-heading>.btn.btn-outline){background:#f7f7f7!important;color:#111!important;border-color:#f7f7f7!important;border-radius:999px}
html[data-theme="dark"] :is(.btn-primary,.page-heading>.btn.btn-outline):hover{background:#dadada!important;color:#080808!important;border-color:#dadada!important}
html[data-theme="dark"] :is(.btn-outline,.btn-light){background:#222!important;color:#f6f6f6!important;border:1px solid #4d4d4d!important;border-radius:999px}
html[data-theme="dark"] :is(.btn-outline,.btn-light):hover{background:#303030!important;border-color:#727272!important}
html[data-theme="dark"] .btn-danger{background:#351b1b!important;color:#ffb5b5!important;border-color:#6c3535!important}
html[data-theme="dark"] :is(.segmented,.settings-tabs,.modal-kind-tabs){background:#1c1c1c!important;border-color:#343434!important;box-shadow:none!important}
html[data-theme="dark"] :is(.segmented button,.settings-tabs button,.modal-kind-tabs button){color:#bdbdbd!important;background:transparent!important;box-shadow:none!important}
html[data-theme="dark"] :is(.segmented button.selected,.settings-tabs button.selected,.modal-kind-tabs button.active,.modal-kind-tabs button.selected){background:#f5f5f5!important;color:#101010!important;box-shadow:none!important}
html[data-theme="dark"] :is(.segmented button:not(.selected):hover,.settings-tabs button:not(.selected):hover,.modal-kind-tabs button:hover){background:#2c2c2c!important;color:#fff!important}
html[data-theme="dark"] :is(.school-service-card,.school-service-form,.school-challenge,.school-sync-card,.school-scan-box,.school-options label,.school-result,.school-preview,.school-preview-section,.school-preview-subjects,.school-preview-examples span,.school-sync-history,.school-auto-option,.cloud-admin-shortcut,.student-created-credentials,.pwa-hero){background:#161616!important;color:#f0f0f0!important;border-color:#343434!important;box-shadow:none!important}
html[data-theme="dark"] :is(.school-preview-count,.school-status-label,.school-unlinked,.school-connect-state,.school-setup-status,.school-service-card.connected,.empty-tip,.subject-average-score,.grade-score,.date-chip,.task-priority.low,.focus-state){background:#262626!important;color:#f3f3f3!important;border-color:#3b3b3b!important}
html[data-theme="dark"] :is(.subject-pill,.search-field,.field-control,.field-group input,.field-group select,.field-group textarea,.cloud-login input,.cloud-fields input,.student-create-form input:not([type=checkbox]),.student-password-form input,.focus-field .field-control,.modal-footer,.empty-state,.empty-illustration,.day-number){background:#1b1b1b!important;color:#f3f3f3!important;border-color:#3e3e3e!important;box-shadow:none!important}
html[data-theme="dark"] :is(.field-control,.field-group input,.field-group select,.field-group textarea,.cloud-login input,.cloud-fields input,.student-create-form input:not([type=checkbox]),.student-password-form input,.focus-field .field-control,.search-field input,.auth-login input){color:#fff!important;caret-color:#fff}
html[data-theme="dark"] :is(input,textarea,select)::placeholder{color:#a6a6a6!important;opacity:1}
html[data-theme="dark"] :is(.field-control,.field-group input,.field-group select,.field-group textarea,.cloud-login input,.cloud-fields input,.student-create-form input:not([type=checkbox]),.student-password-form input,.focus-field .field-control,.search-field,.auth-login input):focus,
html[data-theme="dark"] .search-field:focus-within{outline:0!important;border-color:#ececec!important;box-shadow:0 0 0 2px #d8d8d8!important}
html[data-theme="dark"] :is(.task-entry,.item-row,.school-options label){border-color:#303030!important}
html[data-theme="dark"] :is(.task-entry,.item-row){background:transparent!important}
html[data-theme="dark"] .task-entry.selected{background:#262626!important;border-color:#555!important;box-shadow:inset 3px 0 0 #d5d5d5!important}
html[data-theme="dark"] .task-check{background:#1b1b1b!important;color:#fff!important;border-color:#878787!important}
html[data-theme="dark"] :is(.task-entry.done .task-check,.task-check.is-completing){background:#ededed!important;color:#111!important;border-color:#ededed!important}
html[data-theme="dark"] .task-check.is-completing svg,html[data-theme="dark"] .task-entry.done .task-check svg{color:#111!important}
html[data-theme="dark"] :is(.progress-track,.focus-track){background:#333!important}
html[data-theme="dark"] :is(.progress-fill,.focus-track>span){background:#f1f1f1}
html[data-theme="dark"] .calendar-toolbar{border-color:#303030!important}
html[data-theme="dark"] .calendar-day:hover{background:#1f1f1f!important}
html[data-theme="dark"] .calendar-day.today{background:#202020!important;border-color:#6c6c6c!important;box-shadow:none!important}
html[data-theme="dark"] .calendar-day.today .day-number{background:#f8f8f8!important;color:#101010!important;box-shadow:none!important}


html[data-theme="dark"] :is(.home-mini-calendar,.home-mini-summary>div,.home-mini-day,.calendar-event-focus){background:#1a1a1a!important;border-color:#393939!important;color:#f7f7f7!important;}
html[data-theme="dark"] .home-mini-day.has-work{background:#303030!important}
html[data-theme="dark"] .home-mini-day.today{background:#f5f5f5!important;color:#0b0b0b!important;box-shadow:none!important;border-color:#f5f5f5!important}

html[data-theme="dark"] .home-mini-day.today.has-work{background:#ededed!important}
html[data-theme="dark"] :is(.home-mini-dot,.legend-dot){box-shadow:none!important}
html[data-theme="dark"] :is(.focus-panel,.focus-metric,.focus-breakdown,.focus-history){background:#121212!important;border-color:#303030!important}
html[data-theme="dark"] :is(.focus-watch,.focus-watch.running,.focus-metric strong,.focus-no-history strong,.focus-history-info strong,.focus-subject-head>span){color:#fff!important}
html[data-theme="dark"] :is(.focus-state,.focus-state[data-status=running],.focus-state[data-status=paused]){background:#262626!important;color:#f7f7f7!important;border:1px solid #444}
html[data-theme="dark"] .focus-history-duration{color:#fff!important}
html[data-theme="dark"] .focus-no-history-icon{background:#262626!important;color:#f7f7f7!important}
html[data-theme="dark"] .focus-eyebrow,html[data-theme="dark"] .focus-eyebrow svg{color:#f5f5f5!important}
html[data-theme="dark"] :is(.modal,.modal-footer,.task-detail-panel,.task-detail-content,.task-detail-header){background:#151515!important;border-color:#303030!important;color:#f7f7f7!important;box-shadow:none!important}
html[data-theme="dark"] :is(.modal-backdrop,.task-detail-scrim){background:rgba(0,0,0,.75)!important}
html[data-theme="dark"] .school-preview-warnings{background:#322420!important;color:#ffd8bd!important}
html[data-theme="dark"] .auth-gate{background:#080808!important}
html[data-theme="dark"] .auth-card{background:#151515!important;border:1px solid #363636!important;color:#fff!important;box-shadow:none!important}
html[data-theme="dark"] .auth-card :is(h1,strong){color:#fff!important}
html[data-theme="dark"] .auth-card :is(p,label,.auth-status,.auth-footnote){color:#bdbdbd!important}
html[data-theme="dark"] .auth-login input{background:#222!important;color:#fff!important;border:1px solid #505050!important;box-shadow:none!important}
html[data-theme="dark"] .auth-error{background:#332020!important;color:#ffc8c8!important}
html[data-theme="dark"] :is(.profile-avatar-preview,.top-account-avatar,.student-avatar){color:#fff!important}
html[data-theme="dark"] :is(a,.cloud-details summary){color:#f4f4f4}
html[data-theme="dark"] a:hover{text-decoration:underline}
html[data-theme="dark"] :is(button,input,select,textarea,a):focus-visible{outline:2px solid #f7f7f7!important;outline-offset:3px}
/* Same unshadowed, airy typographic hierarchy as the light skin. */
html[data-theme="dark"] .stat-card{border-radius:0!important;border:0!important;border-bottom:1px solid #343434!important;padding-block:24px}
html[data-theme="dark"] .stat-value{color:#fff!important}
html[data-theme="dark"] .mobile-action-pill{background:#f7f7f7!important;color:#101010!important;border-color:#f7f7f7!important;box-shadow:none!important}
html[data-theme="dark"] .mobile-action-pill:hover{background:#dfdfdf!important;border-color:#dfdfdf!important}
html[data-theme="dark"] .mobile-action-pill-secondary{background:#242424!important;color:#fff!important;border-color:#606060!important;box-shadow:none!important}
html[data-theme="dark"] .mobile-action-pill-secondary:hover{background:#343434!important}
@media(max-width:800px){
 html[data-theme="dark"] .sidebar{background:rgba(13,13,13,.89)!important;border-top:1px solid rgba(255,255,255,.16)!important;box-shadow:none!important;-webkit-backdrop-filter:blur(16px) saturate(130%);backdrop-filter:blur(16px) saturate(130%)}
 html[data-theme="dark"] .sidebar::before{background:linear-gradient(to bottom,rgba(13,13,13,.13),rgba(13,13,13,.35))!important}
 html[data-theme="dark"] .sidebar .nav-item{background:transparent!important}
 html[data-theme="dark"] .sidebar .nav-item.active{background:rgba(255,255,255,.13)!important;color:#fff!important}
 html[data-theme="dark"] .sidebar .nav-item.active svg{color:#fff!important}
 html[data-theme="dark"] :is(.panel,.stat-card){box-shadow:none!important}
}
/* Final monochrome readability and unboxed dashboard metrics. */
html[data-theme="dark"] .stat-card{background:transparent!important}
html[data-theme="dark"] :is(.calendar-event .title,.calendar-event-focus .title){color:#fff!important}
html[data-theme="dark"] :is(.home-mini-summary strong,.focus-subject-head strong,.focus-subject-head>span,.focus-metric strong){color:#f7f7f7!important}
html[data-theme="dark"] :is(.school-preview-count,.student-created-credentials>strong,.student-credential-line code){color:#f7f7f7!important}
/* Raise specificity where grouped legacy selectors previously won the cascade. */
html[data-theme="dark"] body .stats-grid>.stat-card{background:transparent!important}
html[data-theme="dark"] body .sidebar nav .nav-item.active{color:#fff!important;background:#292929!important}
html[data-theme="dark"] body .sidebar nav .nav-item.active svg{color:#fff!important}
html[data-theme="dark"] :is(.field-label,.setting-line strong,.cloud-login label,.cloud-fields label,.field-group label,.student-create-form label,.school-service-card .field-label,.student-credential-line span){color:#c9c9c9!important}
html[data-theme="dark"] :is(.focus-subject-head strong,.focus-history-duration,.home-work-row>span:last-child,.calendar-event .time){color:#dedede!important}
@media(max-width:800px){
 
}

/* Butterfree 0.18 — calendrier personnel, événements par matière et navigation épurée. */
.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-mini-day{gap:0}
.home-mini-day.has-work{background:rgba(128,128,128,.045)}
.home-mini-day.has-work .home-mini-dot{flex:0 0 auto;max-width:80%;max-height:80%}
.home-mini-day.today:not(.has-work) .home-mini-date{text-decoration:underline;text-underline-offset:4px}
/* Every course card uses a subtle tint of its own subject colour. */
.calendar-event{background:color-mix(in srgb,var(--event-color,#939393) 11%,#fff);border-left-color:var(--event-color,#939393)}
.calendar-event-focus{background:color-mix(in srgb,var(--event-color,#939393) 9%,#fff)}
html[data-theme="dark"] :is(.home-mini-calendar,.home-mini-summary>div,.home-mini-day,.calendar-event-focus){border:0!important;box-shadow:none!important}
html[data-theme="dark"] .home-mini-calendar{background:#1a1a1a!important}
html[data-theme="dark"] .home-mini-summary>div{background:#202020!important}
html[data-theme="dark"] .home-mini-day,html[data-theme="dark"] .home-mini-day.has-work,html[data-theme="dark"] .home-mini-day.today,html[data-theme="dark"] .home-mini-day.today.has-work{background:#1a1a1a!important;color:#f7f7f7!important}
html[data-theme="dark"] .home-mini-day.today :is(span,strong){color:#f7f7f7!important}
html[data-theme="dark"] .home-mini-date{color:#f7f7f7!important}
html[data-theme="dark"] .home-mini-dot,html[data-theme="dark"] .legend-dot{background:#ededed!important;box-shadow:none!important}
html[data-theme="dark"] .calendar-event{background:color-mix(in srgb,var(--event-color,#939393) 18%,#1a1a1a)!important;border-left-color:var(--event-color,#939393)!important}
html[data-theme="dark"] .calendar-event-focus{border:0!important;background:color-mix(in srgb,var(--event-color,#939393) 13%,#1b1b1b)!important}
@media(max-width:800px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* In-app, theme-aware date picker; never uses the native date/datetime popup. */
.bf-date-field{min-width:0}
.bf-date-trigger{width:100%;min-height:46px;display:flex;align-items:center;gap:9px;min-width:0;padding:11px 13px;text-align:left;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:13px;font-size:13px;transition:border-color .17s,background .17s}
.bf-date-trigger svg{width:17px;height:17px;color:var(--muted)}
.bf-date-trigger .bf-date-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.bf-date-trigger:hover,.bf-date-trigger[aria-expanded="true"]{border-color:var(--text)}
.bf-date-popover{position:fixed;z-index:9999;width:min(350px,calc(100vw - 24px));padding:16px;background:#fff;color:#191919;border:1px solid #e7e7e7;border-radius:20px;box-shadow:0 14px 45px #00000018}
.bf-date-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}
.bf-date-head strong{text-transform:capitalize;font-size:14px;letter-spacing:-.2px}
.bf-date-nav{width:35px;height:35px;border:0;border-radius:50%;background:transparent;color:inherit;display:grid;place-items:center}
.bf-date-nav:hover{background:#f3f3f3}
.bf-date-weekdays,.bf-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
.bf-date-weekdays{margin-bottom:7px}
.bf-date-weekdays span{font-size:11px;color:#898989;font-weight:740;padding:4px 0}
.bf-date-day{width:100%;aspect-ratio:1;border:0;border-radius:50%;background:transparent;color:#1d1d1d;font-size:12px;font-weight:650;padding:0;display:grid;place-items:center}
.bf-date-day.outside{color:#aaa}
.bf-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px #777}
.bf-date-day.selected{background:#171717;color:#fff}
.bf-date-day:not(:disabled):hover:not(.selected){background:#ededed}
.bf-date-day:disabled{opacity:.19;cursor:not-allowed}
.bf-date-time{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:13px 0 0;padding:12px 0;border-top:1px solid #e8e8e8}
.bf-date-time label{font-size:11px;font-weight:700;color:#717171;display:flex;flex-direction:column;gap:5px}
.bf-date-time select{background:#f7f7f7;color:#151515;border:1px solid #e7e7e7;padding:10px 9px;border-radius:10px;min-height:43px;font-size:13px}
.bf-date-foot{display:flex;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid #e8e8e8}
.bf-date-foot button{border:0;background:transparent;color:#333;font-weight:700;font-size:12px;border-radius:999px;padding:9px 12px}
.bf-date-foot [data-bf-date-done]{background:#171717;color:#fff;padding:9px 18px}
html[data-theme="dark"] .bf-date-trigger{background:#1b1b1b;color:#f5f5f5;border-color:#454545}
html[data-theme="dark"] .bf-date-trigger:hover,html[data-theme="dark"] .bf-date-trigger[aria-expanded="true"]{border-color:#f5f5f5}
html[data-theme="dark"] .bf-date-popover{background:#171717;color:#f5f5f5;border-color:#383838;box-shadow:0 14px 48px #0009}
html[data-theme="dark"] .bf-date-nav{color:#f5f5f5}
html[data-theme="dark"] .bf-date-nav:hover{background:#292929}
html[data-theme="dark"] .bf-date-weekdays span,html[data-theme="dark"] .bf-date-day.outside{color:#9d9d9d}
html[data-theme="dark"] .bf-date-day{color:#f5f5f5}
html[data-theme="dark"] .bf-date-day.selected{background:#f4f4f4;color:#111}
html[data-theme="dark"] .bf-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px #999}
html[data-theme="dark"] .bf-date-day:not(:disabled):hover:not(.selected){background:#303030}
html[data-theme="dark"] .bf-date-time,html[data-theme="dark"] .bf-date-foot{border-color:#393939}
html[data-theme="dark"] .bf-date-time label{color:#c8c8c8}
html[data-theme="dark"] .bf-date-time select{background:#272727;color:#f7f7f7;border-color:#4a4a4a}
html[data-theme="dark"] .bf-date-foot button{color:#eee}
html[data-theme="dark"] .bf-date-foot [data-bf-date-done]{background:#f7f7f7;color:#121212}
@media(max-width:600px){
 .bf-date-popover{width:auto!important;position:fixed;left:12px!important;right:12px;top:auto!important;bottom:max(12px,env(safe-area-inset-bottom,0px));border-radius:22px;padding:16px 18px;max-height:calc(100dvh - 34px);overflow-y:auto}
 .bf-date-day{max-height:44px}
}
html:not([data-theme="dark"]) .calendar-event{background:color-mix(in srgb,var(--event-color,#939393) 11%,#ffffff)}
html:not([data-theme="dark"]) .calendar-event-focus{background:color-mix(in srgb,var(--event-color,#939393) 8%,#ffffff)}
/* The dashboard now has only two metrics, neither spans both columns. */
.stats-grid>.stat-card:last-child{grid-column:auto}

/* Butterfree 0.19 — agenda continu, tâches fluides, réveil et notifications */
.focus-watch{font-family:"Poppins","Century Gothic","Segoe UI",sans-serif!important;font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.04em}
@media(max-width:800px){
 .week-calendar{grid-template-columns:repeat(var(--calendar-columns,7),var(--mobile-day-width));}
}
.task-entry{will-change:height,opacity}
.priority-field{position:relative;min-width:0}
.priority-trigger{display:flex;align-items:center;gap:9px;width:100%;min-height:45px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--text);text-align:left;padding:10px 13px;font-weight:700}
.priority-trigger>svg{margin-left:auto;width:16px;height:16px}
.priority-options{position:absolute;left:0;right:0;top:calc(100% - 2px);z-index:150;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:5px;box-shadow:0 12px 30px #0000001c}
.priority-options[hidden]{display:none}
.priority-option{border:0;background:transparent;color:var(--text);padding:12px;display:flex;align-items:center;gap:10px;text-align:left;width:100%;border-radius:8px;font-weight:650}
.priority-option:hover,.priority-option[aria-selected="true"]{background:var(--surface2)}
.priority-option>svg{margin-left:auto;height:16px;width:16px}
.priority-indicator{display:inline-block;width:10px;height:10px;border-radius:50%;background:#949494;flex:none}
.priority-high .priority-indicator{background:#ed5757}
.priority-normal .priority-indicator{background:#e4aa42}
.priority-low .priority-indicator{background:#46b783}
.priority-trigger.priority-high{color:#c53642}
.priority-trigger.priority-normal{color:#94611d}
.priority-trigger.priority-low{color:#20845a}
html[data-theme="dark"] .priority-trigger.priority-high{color:#ff9797}
html[data-theme="dark"] .priority-trigger.priority-normal{color:#f3c87e}
html[data-theme="dark"] .priority-trigger.priority-low{color:#8ee0b7}
html[data-theme="dark"] .priority-options{box-shadow:0 15px 35px #0007;background:#161616}
.top-notice-button{position:relative;width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;border:0;border-radius:50%;color:var(--text);background:transparent}
.top-notice-button svg{width:21px;height:21px;stroke-width:1.8}
.top-notice-button:hover{background:var(--surface2)}
.notice-badge{position:absolute;right:-1px;top:0;min-width:16px;height:16px;border-radius:20px;background:#d34444;color:white;font-size:10px;line-height:16px;padding:0 3px;text-align:center;font-weight:750}
.notice-banner{position:fixed;top:calc(82px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);z-index:210;display:flex;align-items:center;gap:10px;width:max-content;max-width:min(92vw,440px);border:1px solid var(--line);border-radius:15px;background:var(--surface);color:var(--text);padding:13px 15px;box-shadow:0 12px 38px #00000024;font-size:13px;font-weight:650}
.notice-banner[hidden],.notice-panel[hidden]{display:none!important}
.notice-banner>svg{color:#d14d4d;flex:none}.notice-banner button{margin-left:auto;border:0;background:transparent;color:var(--muted);font-size:23px;line-height:1}
.notice-panel{position:fixed;right:clamp(12px,3vw,55px);top:calc(73px + env(safe-area-inset-top,0px));z-index:205;width:min(370px,calc(100vw - 24px));max-height:65dvh;overflow-y:auto;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 55px #0000002e;padding:13px}

.notice-row{display:flex;align-items:center;gap:11px;text-align:left;border:0;background:transparent;color:var(--text);border-bottom:1px solid var(--line);padding:13px 4px;width:100%}
.notice-row:hover{background:var(--surface2)}
.notice-row>span:nth-child(2){min-width:0;flex:1}
.notice-row strong,.notice-row small{display:block;overflow:hidden;text-overflow:ellipsis}
.notice-row strong{font-size:13px;white-space:nowrap}.notice-row small{color:var(--muted);font-size:11px;margin-top:3px}
.notice-row svg{width:15px;height:15px}
.notice-dot{width:8px;height:8px;border-radius:50%;background:#e5ac48;flex:none}.notice-dot.is-overdue{background:#e15b5b}.notice-dot.is-urgent{background:#e15b5b}
.notice-empty{padding:12px 7px;margin:0;font-size:12px}.notice-focus-line{padding:10px 7px;font-size:12px;color:var(--muted)}
.focus-alarm{margin:12px 0 22px;padding:17px;border:1px solid var(--line);border-radius:16px;background:var(--surface2);width:100%}
.focus-alarm-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:13px}
.focus-alarm-head svg{width:17px;height:17px}.focus-alarm-head strong{font-size:13px}
.focus-alarm-head #focus-alarm-status{margin-left:auto;font-size:11px;color:var(--muted)}
.focus-alarm-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.focus-alarm-options label{display:flex;flex-direction:column;gap:6px;text-align:left;min-width:0;color:var(--muted);font-size:11px;font-weight:700}
.focus-alarm-options .field-control{min-width:0;width:100%;min-height:41px;font-size:13px}
.focus-alarm-actions{display:flex;justify-content:flex-end;margin-top:12px}
.focus-alarm-ringing{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;background:color-mix(in srgb,#e85a5a 12%,var(--surface));border-radius:12px;padding:13px;margin-top:12px}
.focus-alarm-ringing[hidden]{display:none}.focus-alarm-ringing strong{font-size:14px}
.focus-alarm-help{font-size:11px;line-height:1.5;text-align:left;margin:12px 0 0;color:var(--muted)}
html[data-theme="dark"] .notice-panel,html[data-theme="dark"] .notice-banner{background:#161616;box-shadow:0 14px 50px #0009}
html[data-theme="dark"] .focus-alarm{background:#181818}
@media(max-width:560px){.notice-banner{top:calc(69px + env(safe-area-inset-top,0px))}.notice-panel{top:calc(60px + env(safe-area-inset-top,0px))}.focus-alarm-options{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.focus-alarm-head #focus-alarm-status{margin-left:0;width:100%}}
@media(prefers-reduced-motion:reduce){.task-entry{transition:none!important}}

.priority-options[hidden],.focus-alarm-options label[hidden]{display:none!important}

#focus-alarm-set[hidden],#focus-alarm-cancel[hidden],#focus-alarm-clock-field[hidden],#focus-alarm-duration-field[hidden],#notice-badge[hidden],#notice-focus-line[hidden]{display:none!important}

/* The continuous week strip fills seven columns on desktop and remains draggable. */
@media(min-width:801px){
 .week-calendar{display:grid;grid-template-columns:repeat(var(--calendar-columns,49),var(--calendar-day-width));width:max-content;min-width:max-content;}
 .week-calendar .calendar-day{width:var(--calendar-day-width);min-width:var(--calendar-day-width);}
}


/* 0.20 — loader animé fourni, respect du thème et du mouvement réduit. */
.bf-startup-spinner .box5631:nth-child(1){animation:bf-moveBox5631-1 4s infinite;}
@keyframes bf-moveBox5631-1{9.090909091%{transform:translate(-12px,0px)}18.18181818%{transform:translate(0px,0px)}27.27272727%{transform:translate(0px,0px)}36.36363636%{transform:translate(12px,0px)}45.45454545%{transform:translate(12px,12px)}54.54545455%{transform:translate(12px,12px)}63.63636364%{transform:translate(12px,12px)}72.72727273%{transform:translate(12px,0px)}81.81818182%{transform:translate(0px,0px)}90.90909091%{transform:translate(-12px,0px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(2){animation:bf-moveBox5631-2 4s infinite;}
@keyframes bf-moveBox5631-2{9.090909091%{transform:translate(0px,0px)}18.18181818%{transform:translate(12px,0px)}27.27272727%{transform:translate(0px,0px)}36.36363636%{transform:translate(12px,0px)}45.45454545%{transform:translate(12px,12px)}54.54545455%{transform:translate(12px,12px)}63.63636364%{transform:translate(12px,12px)}72.72727273%{transform:translate(12px,12px)}81.81818182%{transform:translate(0px,12px)}90.90909091%{transform:translate(0px,12px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(3){animation:bf-moveBox5631-3 4s infinite;}
@keyframes bf-moveBox5631-3{9.090909091%{transform:translate(-12px,0px)}18.18181818%{transform:translate(-12px,0px)}27.27272727%{transform:translate(0px,0px)}36.36363636%{transform:translate(-12px,0px)}45.45454545%{transform:translate(-12px,0px)}54.54545455%{transform:translate(-12px,0px)}63.63636364%{transform:translate(-12px,0px)}72.72727273%{transform:translate(-12px,0px)}81.81818182%{transform:translate(-12px,-12px)}90.90909091%{transform:translate(0px,-12px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(4){animation:bf-moveBox5631-4 4s infinite;}
@keyframes bf-moveBox5631-4{9.090909091%{transform:translate(-12px,0px)}18.18181818%{transform:translate(-12px,0px)}27.27272727%{transform:translate(-12px,-12px)}36.36363636%{transform:translate(0px,-12px)}45.45454545%{transform:translate(0px,0px)}54.54545455%{transform:translate(0px,-12px)}63.63636364%{transform:translate(0px,-12px)}72.72727273%{transform:translate(0px,-12px)}81.81818182%{transform:translate(-12px,-12px)}90.90909091%{transform:translate(-12px,0px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(5){animation:bf-moveBox5631-5 4s infinite;}
@keyframes bf-moveBox5631-5{9.090909091%{transform:translate(0px,0px)}18.18181818%{transform:translate(0px,0px)}27.27272727%{transform:translate(0px,0px)}36.36363636%{transform:translate(12px,0px)}45.45454545%{transform:translate(12px,0px)}54.54545455%{transform:translate(12px,0px)}63.63636364%{transform:translate(12px,0px)}72.72727273%{transform:translate(12px,0px)}81.81818182%{transform:translate(12px,-12px)}90.90909091%{transform:translate(0px,-12px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(6){animation:bf-moveBox5631-6 4s infinite;}
@keyframes bf-moveBox5631-6{9.090909091%{transform:translate(0px,0px)}18.18181818%{transform:translate(-12px,0px)}27.27272727%{transform:translate(-12px,0px)}36.36363636%{transform:translate(0px,0px)}45.45454545%{transform:translate(0px,0px)}54.54545455%{transform:translate(0px,0px)}63.63636364%{transform:translate(0px,0px)}72.72727273%{transform:translate(0px,12px)}81.81818182%{transform:translate(-12px,12px)}90.90909091%{transform:translate(-12px,0px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(7){animation:bf-moveBox5631-7 4s infinite;}
@keyframes bf-moveBox5631-7{9.090909091%{transform:translate(12px,0px)}18.18181818%{transform:translate(12px,0px)}27.27272727%{transform:translate(12px,0px)}36.36363636%{transform:translate(0px,0px)}45.45454545%{transform:translate(0px,-12px)}54.54545455%{transform:translate(12px,-12px)}63.63636364%{transform:translate(0px,-12px)}72.72727273%{transform:translate(0px,-12px)}81.81818182%{transform:translate(0px,0px)}90.90909091%{transform:translate(12px,0px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(8){animation:bf-moveBox5631-8 4s infinite;}
@keyframes bf-moveBox5631-8{9.090909091%{transform:translate(0px,0px)}18.18181818%{transform:translate(-12px,0px)}27.27272727%{transform:translate(-12px,-12px)}36.36363636%{transform:translate(0px,-12px)}45.45454545%{transform:translate(0px,-12px)}54.54545455%{transform:translate(0px,-12px)}63.63636364%{transform:translate(0px,-12px)}72.72727273%{transform:translate(0px,-12px)}81.81818182%{transform:translate(12px,-12px)}90.90909091%{transform:translate(12px,0px)}100%{transform:translate(0px,0px)}}
.bf-startup-spinner .box5631:nth-child(9){animation:bf-moveBox5631-9 4s infinite;}
@keyframes bf-moveBox5631-9{9.090909091%{transform:translate(-12px,0px)}18.18181818%{transform:translate(-12px,0px)}27.27272727%{transform:translate(0px,0px)}36.36363636%{transform:translate(-12px,0px)}45.45454545%{transform:translate(0px,0px)}54.54545455%{transform:translate(0px,0px)}63.63636364%{transform:translate(-12px,0px)}72.72727273%{transform:translate(-12px,0px)}81.81818182%{transform:translate(-24px,0px)}90.90909091%{transform:translate(-12px,0px)}100%{transform:translate(0px,0px)}}
@media(prefers-reduced-motion:reduce){.bf-startup-spinner .box5631{animation:none!important}}

/* Butterfree 0.21: notifications de notes scolaires */
.notice-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 6px 7px;color:var(--muted);font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.035em}
.notice-section-head:not(:first-child){border-top:1px solid var(--line);margin-top:5px;padding-top:16px}
.notice-read-all{border:0;background:transparent;font-size:10px;color:var(--text);font-weight:700;cursor:pointer;text-transform:none;letter-spacing:0}
.notice-grade-row .notice-dot.is-grade{background:#5b93eb}
html[data-theme="dark"] .notice-grade-row .notice-dot.is-grade{background:#fff}
html[data-theme="dark"] .notice-grade-row{background:transparent}

/* Butterfree 0.22 — autorisation explicite des notifications Android, sans surcharge visuelle. */
.pwa-notifications-line{align-items:center;gap:14px}
.pwa-notifications-line>div{min-width:0;flex:1}
.pwa-notifications-line .btn{flex:0 0 auto;min-width:94px}
.pwa-notification-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:8px 0 17px}
.pwa-notification-actions small{color:var(--muted);font-size:11px;line-height:1.5;flex:1 1 230px}
html[data-theme="dark"] .pwa-notifications-line .btn{background:#f7f7f7;border-color:#f7f7f7;color:#101010;box-shadow:none}
html[data-theme="dark"] .pwa-notification-actions .btn{background:#272727;border-color:#444;color:#fff;box-shadow:none}
@media(max-width:420px){.pwa-notifications-line{align-items:flex-start;flex-wrap:wrap}.pwa-notifications-line .btn{margin-left:0}}

/* Butterfree 0.23 — mobile navigation and simplified agenda. */
@media(max-width:800px){
  /* A flat, clean active tab, even where older dark-theme rules used shadows. */
  .sidebar,.sidebar .nav-item,.sidebar .nav-item.active,
  html:not([data-theme="dark"]) .sidebar .nav-item.active,
  html[data-theme="dark"] .sidebar .nav-item.active{
    box-shadow:none!important;filter:none!important;text-shadow:none!important;
  }
  html:not([data-theme="dark"]) body .sidebar nav .nav-item.active{
    background:#101010!important;color:#fff!important;border:0!important;
  }
  html:not([data-theme="dark"]) body .sidebar nav .nav-item.active svg,
  html:not([data-theme="dark"]) body .sidebar nav .nav-item.active span{
    color:#fff!important;
  }
  html[data-theme="dark"] body .sidebar nav .nav-item.active{
    background:#f4f4f4!important;color:#101010!important;
  }
  html[data-theme="dark"] body .sidebar nav .nav-item.active svg,
  html[data-theme="dark"] body .sidebar nav .nav-item.active span{
    color:#101010!important;
  }
  /* Titles already appear in the top app bar. */
  .view:not(#view-home) > .page-heading{display:none!important}
}
/* Outside mobile, title-free action lines retain their button aligned to the right. */
.view:not(#view-home) > .page-heading{justify-content:flex-end}
/* No other creation command on the agenda: click directly in a day column. */

/* An optional end date, collapsed until explicitly requested. */
.optional-event-end{margin:2px 0 14px}
.optional-event-end-toggle{display:inline-flex;align-items:center;gap:8px;padding:10px 0;border:0;background:transparent;color:var(--text);font-weight:650;font-size:12px;text-align:left}
.optional-event-end-toggle svg{height:17px;width:17px}
.optional-event-end-toggle:hover{opacity:.72}
.optional-event-end #event-end-field{padding:6px 0 0}
.optional-event-end #event-end-field[hidden]{display:none!important}
@media(max-width:800px){
 #view-calendar{padding-top:0}
 #view-home .home-grid{margin-top:0}
}

/* Rapport / Notes / Stats, and faster mobile navigation. */
.view.active{animation:bf-fade-in .09s ease-out both}
.view.active.is-leaving{animation:none!important}
.sidebar .nav-item{transition:background .09s,color .09s!important}
.report-page[hidden],.report-custom-dates[hidden]{display:none!important}
.report-tabs{display:flex;gap:4px;padding:4px;margin-bottom:20px;width:max-content;max-width:100%;background:var(--surface2);border:1px solid var(--line);border-radius:999px}
.report-tabs button{min-width:105px;border:0;border-radius:999px;padding:11px 22px;font-size:13px;font-weight:750;background:transparent;color:var(--muted);transition:background .1s,color .1s}
.report-tabs button.selected{background:#131313;color:#fff}
html[data-theme="dark"] .report-tabs button.selected{background:#f8f8f8;color:#111}
.report-notes-actions{display:flex;justify-content:flex-end;margin:0 0 16px}
.report-notes-actions .btn{min-height:43px}
.report-stats-panel{padding:26px!important;min-width:0}
.report-stats-title h2{font-size:19px;margin:0 0 3px;font-weight:760;color:var(--text)}
.report-stats-title p{margin:0;color:var(--muted);font-size:12px}
.report-period-picker{display:flex;flex-wrap:wrap;gap:7px;margin:22px 0 16px}
.report-period-picker button{border:1px solid var(--line);background:var(--surface);color:var(--muted);padding:8px 13px;border-radius:999px;font-size:12px;font-weight:700;transition:background .1s}
.report-period-picker button.selected{color:#fff;background:#171717;border-color:#171717}
html[data-theme="dark"] .report-period-picker button.selected{color:#111;background:#f8f8f8;border-color:#f8f8f8}
.report-custom-dates{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:12px;margin-bottom:12px}
.report-custom-dates .field-group{min-width:0}
.report-stats-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:12px;margin:17px 0;padding:20px 0}
.report-stats-metrics>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.report-stats-metrics span{font-size:12px;color:var(--muted)}
.report-stats-metrics strong{font-size:clamp(18px,3vw,27px);font-weight:770;line-height:1.25;color:var(--text);letter-spacing:-.4px}
.report-stats-range{font-size:12px;color:var(--muted);margin:4px 0 20px}
.report-stats-chart-area{display:grid;grid-template-columns:minmax(0,320px) minmax(0,1fr);align-items:center;gap:clamp(22px,5vw,65px);max-width:900px}
.report-stats-pie{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:250px}
.report-pie-svg{width:min(100%,300px);height:auto;aspect-ratio:1;overflow:visible;filter:none}
.report-stats-legend{display:flex;flex-direction:column;gap:0;min-width:0}
.report-stats-legend-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto 56px;align-items:center;gap:11px;padding:12px 0;border-bottom:1px solid var(--line);color:var(--text);font-size:13px}
.report-stats-legend-row:last-child{border-bottom:0}
.report-stats-legend-dot{width:11px;height:11px;border-radius:50%;border:1px solid color-mix(in srgb,var(--text) 10%,transparent)}
.report-stats-legend-name{min-width:0;overflow-wrap:anywhere}
.report-stats-legend-row strong{font-size:13px;white-space:nowrap}
.report-stats-legend-pct{font-size:11px;color:var(--muted);text-align:right;white-space:nowrap}
.report-stats-empty{text-align:center;color:var(--muted);font-size:13px;margin:0}
.report-stats-empty-icon svg{width:36px;height:36px;color:var(--muted)}
@media(max-width:800px){
 .report-stats-panel{padding:19px!important}
 .report-stats-chart-area{grid-template-columns:1fr;gap:12px}
 .report-stats-pie{min-height:220px}
 .report-pie-svg{width:min(75vw,270px)}
 .report-period-picker{gap:6px;margin-top:18px}
 .report-period-picker button{font-size:11px;padding:8px 11px}
 .report-notes-actions{justify-content:center}
 .report-notes-actions .btn{width:100%;max-width:260px}
 .report-tabs{margin:2px auto 19px;justify-content:center}
}
@media(max-width:380px){
 .report-stats-metrics{gap:6px}
 .report-stats-metrics span{font-size:10px}
 .report-stats-legend-row{grid-template-columns:10px minmax(0,1fr) auto 43px;gap:7px;font-size:11px}
 .report-stats-legend-row strong{font-size:11px}
 .report-stats-legend-pct{font-size:10px}
 .report-custom-dates{grid-template-columns:1fr}
}

/* Geometry shared by the light and dark skins (0.25). */
:where(.panel,.stat-card,.connection-info,.calendar-day,.home-mini-calendar,.home-mini-summary>div,.school-setup,.student-admin-tip,.school-service-card,.school-sync-card,.school-preview,.student-admin-grid .panel){border-width:0!important;box-shadow:none}
.item-meta,.task-meta{font-size:13px;color:#282828}
html[data-theme="dark"] :is(.item-meta,.task-meta){color:#bcbcbc!important}
.task-priority{display:none}
.task-priority.high{display:inline-flex;font-weight:800}
.calendar-range h2{min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;line-height:1.3;text-align:center}
.calendar-range-dates{display:block;white-space:nowrap;font-size:clamp(12px,3.1vw,18px);font-weight:750}
.calendar-range-year{display:block;white-space:nowrap;font-size:clamp(12px,2.8vw,16px);font-weight:750}
.calendar-panel{padding:0}
.calendar-toolbar{padding:20px 22px;margin:0;border-bottom:1px solid var(--line)}
@media(max-width:800px){
 .home-grid>.panel:nth-child(2){order:-1}
 .calendar-toolbar{padding:15px clamp(10px,3vw,22px)}
 .calendar-range{min-width:0;flex:1;justify-content:center;gap:clamp(5px,2vw,14px)}
 .calendar-range h2{flex:1;min-width:0}
 .calendar-range-dates{font-size:clamp(11px,3.15vw,15px)}
 .calendar-range-year{font-size:clamp(11px,3vw,14px)}
 #today-button{flex:0 0 auto}
}


/* 0.26 — En-tête stable, transitions, thème et calendrier à déplacement tactile. */
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px}
.calendar-range{display:grid!important;grid-template-columns:42px minmax(178px,230px) 42px;column-gap:10px;align-items:center;justify-content:start!important;flex:none!important;width:auto;min-width:0}
.calendar-range h2{width:100%;min-width:0!important;max-width:none;flex:none!important;margin:0;white-space:normal}
.calendar-range :is(#prev-week,#next-week){width:42px;height:42px;min-height:42px;min-width:42px;padding:0;justify-self:center}
.calendar-range-dates{font-size:clamp(12px,1.5vw,18px)}
.calendar-range-year{font-size:clamp(12px,1.35vw,16px)}
.calendar-drag-ghost{position:fixed;z-index:9000;pointer-events:none;max-width:225px;min-width:110px;padding:9px 13px;border-radius:12px;background:#171717;color:#fff;font-size:12px;font-weight:750;box-shadow:0 9px 24px #0003;transform:translateY(-100%);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
html[data-theme="dark"] .calendar-drag-ghost{background:#f5f5f5;color:#111}
.calendar-event[data-calendar-move-id]{cursor:grab;touch-action:none}
.calendar-event.calendar-is-dragging{opacity:.35;cursor:grabbing}
.calendar-day.calendar-drop-target{outline:2px solid var(--text);outline-offset:-4px;background:color-mix(in srgb,var(--text) 5%,var(--surface))!important}
.calendar-event-task{background:color-mix(in srgb,var(--event-color,#888) 12%,var(--surface));border-left-color:var(--event-color,#888)}
.calendar-event-task .time{font-size:10px;opacity:.8}
.calendar-event-imported{cursor:default}
#theme-toggle svg{color:#181818;transition:color .15s ease}
html[data-theme="dark"] #theme-toggle svg{color:#fff}
.report-tabs{position:relative;isolation:isolate}
.report-tabs::before{content:"";position:absolute;left:4px;top:4px;bottom:4px;width:calc((100% - 8px)/2);border-radius:999px;background:#131313;pointer-events:none;z-index:-1;transition:transform .24s cubic-bezier(.22,1,.36,1),background .2s ease}
.report-tabs[data-active="notes"]::before{transform:translateX(100%)}
.report-tabs button,.report-tabs button.selected{position:relative;z-index:1;background:transparent!important;box-shadow:none!important;transition:color .2s ease}
.report-tabs button.selected{color:#fff}
html[data-theme="dark"] .report-tabs::before{background:#f8f8f8}
html[data-theme="dark"] .report-tabs button.selected{color:#111}
@media(max-width:800px){
 .calendar-toolbar{gap:8px}
 .calendar-range{grid-template-columns:36px minmax(108px,154px) 36px;column-gap:4px}
 .calendar-range :is(#prev-week,#next-week){width:36px;height:36px;min-width:36px;min-height:36px}
 .calendar-range-dates{font-size:clamp(11px,3.05vw,15px)}
 .calendar-range-year{font-size:clamp(11px,3vw,14px)}
}
@media(max-width:370px){
 .calendar-range{grid-template-columns:32px minmax(98px,120px) 32px;column-gap:3px}
 .calendar-range :is(#prev-week,#next-week){width:32px;height:32px;min-width:32px;min-height:32px}
 .calendar-toolbar{gap:6px}
 #today-button{padding-inline:8px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.report-tabs::before{transition:none}}


/* Butterfree 0.27 — interface et navigation consolidées */
#view-calendar .mobile-action-bar{margin-bottom:20px}
@media(min-width:801px){.brand-logo{width:63px;height:63px;flex-basis:63px}}
/* Le bandeau de notifications démarre directement par les informations. */
.notice-panel{padding:9px 13px}
.notice-row:last-child{border-bottom:0}
html[data-theme="dark"] .notice-panel{background:#181818;color:#f7f7f7;border-color:#323232;box-shadow:0 17px 45px rgba(0,0,0,.50)}
html[data-theme="dark"] .notice-row{color:#f7f7f7;border-color:#303030}
html[data-theme="dark"] .notice-row small,html[data-theme="dark"] .notice-empty,html[data-theme="dark"] .notice-focus-line{color:#bdbdbd}
html[data-theme="dark"] .notice-row:hover{background:#252525}
html[data-theme="dark"] .notice-banner{background:#1b1b1b;color:#f6f6f6;border-color:#343434}
html[data-theme="dark"] .calendar-event:not(.calendar-event-focus){background:color-mix(in srgb,var(--event-color,#939393) 22%,#171717)!important;border-left-color:var(--event-color,#939393)!important}
html[data-theme="dark"] .calendar-event-focus{background:color-mix(in srgb,var(--event-color,#939393) 13%,#171717)!important}
/* Indicateur coulissant : Devoirs et Paramètres. */
#task-filters,.settings-tabs{position:relative;isolation:isolate}
#task-filters::before,.settings-tabs::before{content:"";position:absolute;top:4px;bottom:4px;left:var(--selected-tab-x,4px);width:var(--selected-tab-width,0px);border-radius:12px;background:#fff;opacity:0;pointer-events:none;z-index:0;box-shadow:none;transition:left .24s cubic-bezier(.22,1,.36,1),width .24s cubic-bezier(.22,1,.36,1)}
#task-filters.has-tab-indicator::before,.settings-tabs.has-tab-indicator::before{opacity:1}
html[data-theme="dark"] #task-filters::before,html[data-theme="dark"] .settings-tabs::before{background:#f5f5f5}
#task-filters > button,.settings-tabs > button{position:relative;z-index:1;border-radius:12px;transition:color .18s ease;background:transparent!important;box-shadow:none!important}
#task-filters > button.selected,.settings-tabs > button.selected{background:transparent!important;box-shadow:none!important;color:#161616!important}
html[data-theme="dark"] #task-filters > button.selected,html[data-theme="dark"] .settings-tabs > button.selected{background:transparent!important;box-shadow:none!important;color:#101010!important}
html:not([data-theme="dark"]) #task-filters > button:not(.selected){color:#525252}
@media(prefers-reduced-motion:reduce){#task-filters::before,.settings-tabs::before{transition:none}}


/* Butterfree 0.28 — couleurs de matières plus lisibles, cartes intégrales. */
/* La dernière carte de l'accueil doit conserver ses QUATRE bordures. */
#home-tasks > .item-row,
#home-tasks > .item-row:last-child {
  border: 1px solid color-mix(in srgb, var(--line) 85%, #777) !important;
  border-radius: 18px;
  overflow: visible;
}
html[data-theme="dark"] #home-tasks > .item-row,
html[data-theme="dark"] #home-tasks > .item-row:last-child {
  border-color: #383838 !important;
}
/* Les tâches du tableau sont identifiées par leur matière, y compris la dernière. */
#tasks-list .task-entry,
#tasks-list .task-entry:last-child {
  border: 2px solid color-mix(in srgb, var(--task-subject-color,#8b6ff0) 83%, #fff) !important;
  background: color-mix(in srgb, var(--task-subject-color,#8b6ff0) 8%, #fff) !important;
  border-radius: 18px;
}
html[data-theme="dark"] #tasks-list .task-entry,
html[data-theme="dark"] #tasks-list .task-entry:last-child {
  border-color: color-mix(in srgb,var(--task-subject-color,#8b6ff0) 85%, #5a5a5a) !important;
  background: color-mix(in srgb,var(--task-subject-color,#8b6ff0) 16%, #141414) !important;
}
/* Le remplissage et le contour de chaque cours, tâche et session reprennent la teinte de sa matière. */
.calendar-event,
.calendar-event.calendar-event-task,
.calendar-event.calendar-event-focus {
  background: color-mix(in srgb,var(--event-color,#8b6ff0) 29%, #fff) !important;
  border: 1.5px solid color-mix(in srgb,var(--event-color,#8b6ff0) 88%, #fff) !important;
  border-left: 4px solid var(--event-color,#8b6ff0) !important;
  box-shadow: none;
}
.calendar-event .time {
  color: color-mix(in srgb,var(--event-color,#8b6ff0) 80%, #101010);
}
html[data-theme="dark"] .calendar-event:not(.calendar-event-focus),
html[data-theme="dark"] .calendar-event.calendar-event-task,
html[data-theme="dark"] .calendar-event.calendar-event-focus {
  background: color-mix(in srgb,var(--event-color,#8b6ff0) 43%, #111) !important;
  border: 1.5px solid color-mix(in srgb,var(--event-color,#8b6ff0) 83%, #707070) !important;
  border-left: 4px solid var(--event-color,#8b6ff0) !important;
}
html[data-theme="dark"] .calendar-event .time {
  color: color-mix(in srgb,var(--event-color,#8b6ff0) 56%, #fff) !important;
}
html[data-theme="dark"] .brand-logo { opacity:1!important; filter:none!important; mix-blend-mode:normal!important; }
