:root{--home-surface:#fff;--home-line:#e2e8f0;--home-shadow:0 6px 18px #172c4610,0 1px 2px #172c4608}
:root[data-theme=dark]{--home-surface:#182538;--home-line:#33445c;--home-shadow:0 8px 24px #0003,inset 0 1px 0 #ffffff09}
.home-focus{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:1100px;margin:0 auto 20px}.home-greeting{grid-column:1/-1}.home-greeting h1{font-size:28px;letter-spacing:-.7px;margin:4px 0 8px}.home-greeting small{color:var(--muted,#64748b)}.home-card{padding:20px;border:1px solid var(--home-line);border-radius:18px;background:var(--home-surface);box-shadow:var(--home-shadow)}.home-card header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.home-card h2{font-size:17px;margin:0}.home-card p{margin:8px 0;line-height:1.5}.home-card .home-next{font-size:23px;font-weight:700;letter-spacing:-.4px}.home-task{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-top:1px solid var(--home-line)}.home-task small{color:var(--muted,#64748b)}.home-full>summary{cursor:pointer;padding:14px 18px;border:1px solid var(--home-line);border-radius:12px;font-weight:600;margin-bottom:16px}.home-full:not([open])>*:not(summary){display:none}
@media(max-width:767px){.home-focus{grid-template-columns:1fr;gap:12px}.home-greeting h1{font-size:25px}.home-card{padding:16px}.home-card header .link{font-size:13px;min-height:44px}.home-card .home-next{font-size:21px}}
@media(prefers-reduced-motion:no-preference){.home-card{transition:box-shadow .18s ease,transform .18s ease}@media(hover:hover){.home-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px #0002}}}
@media screen{.panel,.ag-agent-card,.ad-panel{border-radius:18px;box-shadow:var(--home-shadow)}.btn{border-radius:12px}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}h1,h2,h3{letter-spacing:-.025em}}
@media print{.home-focus{display:none}.home-full>summary{display:none}.home-full:not([open])>*:not(summary){display:block}}

/* Relief permanent sur écran tactile et compteurs alignés. */
@media screen{
.ag-counters{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px;align-items:stretch}
.ag-counters>div{display:grid!important;grid-template-rows:minmax(38px,auto) auto;align-content:center;justify-items:center;text-align:center;padding:12px 6px!important;min-width:0;border-radius:14px}
.ag-counters small{align-self:center;text-align:center;line-height:1.3;font-size:11px!important}.ag-counters b{align-self:end;font-variant-numeric:tabular-nums;font-size:15px!important;white-space:normal}
.ev-replacements>summary{cursor:pointer;font-size:16px;font-weight:650;min-height:44px;display:list-item;align-content:center}.ev-replacements:not([open])>article{display:none}
.tabs [data-unavailability]{white-space:nowrap;margin:0;font-size:13px}.tabs{overflow-x:auto;flex-wrap:nowrap}.ag-personal-tabs{margin:12px 0}
:root[data-theme=dark] :is(.home-card,.panel,.ad-panel,.ag-agent-card,.ag-person,.ag-counters>div){background:linear-gradient(145deg,#23354b,#172436)!important;border:1px solid #435671!important;box-shadow:0 10px 22px #0006,inset 0 1px 0 #ffffff14!important}
:root[data-theme=dark] .ag-timeline-card{box-shadow:0 5px 10px #0004,inset 0 1px 0 #ffffff18!important;border:1px solid #ffffff10!important}
:root:not([data-theme=dark]) :is(.home-card,.ag-agent-card,.ag-counters>div){box-shadow:0 8px 20px #20395b20,inset 0 1px 0 #fff!important}
}
@media(max-width:380px){.ag-counters{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Accueil : hiérarchie colorée, relief visible aussi sur écran tactile. */
@media screen{
.home-focus .home-next{grid-column:1/-1}
:root .home-focus .home-card.home-next{position:relative;isolation:isolate;overflow:hidden;padding:26px;border:1px solid #b9b4ff66!important;background:radial-gradient(ellipse at 100% 0,#a275ed88,transparent 58%),linear-gradient(125deg,#14379f,#4a35a2 70%,#633a9c)!important;color:#fff!important;box-shadow:0 14px 30px #2442a236,inset 0 1px 0 #ffffff40!important}
.home-card.home-next h2{color:#e0e9ff;font-size:15px;font-weight:600}.home-card.home-next .link{color:white;border:1px solid #ffffff55;border-radius:999px;padding:8px 14px;background:#ffffff16;min-height:44px}
.home-next-date{font-size:14px;color:#e0e9ff}.home-next-time{font-size:clamp(38px,6vw,60px);font-weight:750;letter-spacing:-2px;line-height:1.1!important;margin:10px 0!important;font-variant-numeric:tabular-nums}.home-next-time span{font-size:.55em;font-weight:500;letter-spacing:-.5px;color:#e4dcff}.home-card .home-next{font-size:22px;margin:8px 0 0}.home-next-pool{color:#e0e9ff;font-size:14px}
.home-focus .home-tasks{border-top:3px solid #f6a74d!important;background:linear-gradient(135deg,#fff6e8,var(--home-surface))!important}.home-focus .home-messages{border-top:3px solid #8c7af2!important;background:linear-gradient(135deg,#f0edff,var(--home-surface))!important}.home-focus .home-alert{border-top:3px solid #ed6176!important;background:linear-gradient(135deg,#fff0f3,var(--home-surface))!important}.home-focus .home-live{border-top:3px solid #39bba0!important}
:root[data-theme=dark] .home-focus .home-tasks{background:linear-gradient(135deg,#392c23,#182538)!important}:root[data-theme=dark] .home-focus .home-messages{background:linear-gradient(135deg,#302846,#182538)!important}:root[data-theme=dark] .home-focus .home-alert{background:linear-gradient(135deg,#3d2432,#182538)!important}
@media(max-width:767px){:root .home-focus .home-card.home-next{padding:20px;border-radius:22px}.home-next-time{font-size:46px}.home-card.home-next header{align-items:flex-start}.home-card.home-next .link{font-size:12px}}
}

@media(max-width:767px){.home-card.home-next header{flex-wrap:wrap;gap:8px}.home-focus{min-width:0}.home-card{min-width:0;overflow-wrap:anywhere}.home-next-time{white-space:nowrap;font-size:clamp(34px,10vw,46px)}}

.home-card.home-next .home-course{display:inline-block;padding:7px 13px;border-radius:10px;background:var(--course-color,#ffce7a);color:#152037;font-weight:750;box-shadow:0 3px 10px #0003}.home-card.home-next .home-course[style*="#171d28"]{color:white;border:1px solid #ffffff55}
