/* KDT 3.0 — visual system aligned with the supplied premium dashboard reference.
   Presentation-only layer: no database, data, or business-logic mutations. */
:root{
  --bg:#050811;--bg2:#080E1A;--bg3:#0D1728;
  --card:#091321;--card2:#0D192B;
  --border:rgba(133,165,211,.15);--border2:rgba(133,165,211,.25);--border3:rgba(133,165,211,.09);
  --teal:#0866F5;--teal-l:#48A0FF;--teal-d:#064BC2;
  --teal-dim:rgba(8,102,245,.14);--teal-glow:rgba(8,102,245,.30);
  --cyan:#32B8FF;--cyan-dim:rgba(50,184,255,.13);
  --green:#16C79A;--green-dim:rgba(22,199,154,.13);
  --coral:#FF536B;--coral-l:#FF8798;--coral-dim:rgba(255,83,107,.13);
  --red:#FF536B;--red-dim:rgba(255,83,107,.13);
  --amber:#FFBD45;--amber-dim:rgba(255,189,69,.13);
  --violet:#9C8CFF;--violet-dim:rgba(156,140,255,.13);
  --text:#F3F7FF;--text2:#A6B5CC;--text3:#71819B;
  --r-sm:9px;--r-md:13px;--r-lg:17px;--gap:16px;
  --sidebar-w:246px;--topbar-h:76px;
  --sh-sm:0 3px 12px rgba(0,0,0,.22);--sh-md:0 12px 32px rgba(0,0,0,.30);--sh-lg:0 24px 60px rgba(0,0,0,.42);
}
html,body{background:var(--bg);color:var(--text)}
body::before{background:radial-gradient(850px 460px at 78% -18%,rgba(8,102,245,.10),transparent 65%),radial-gradient(620px 360px at 0% 100%,rgba(50,184,255,.045),transparent 68%)}
/* Application frame */
.sidebar{background:linear-gradient(180deg,#080E19 0%,#070C16 100%);border-right:1px solid var(--border);box-shadow:8px 0 28px rgba(0,0,0,.12)}
.sidebar-head{height:82px;padding:0 20px;border-bottom:1px solid var(--border)}
.logo-box{width:39px;height:39px;border-radius:12px;background:linear-gradient(145deg,#1684FF,#064BC2);color:white;box-shadow:0 7px 22px rgba(8,102,245,.30)}
.sidebar-brand{font-size:17px;letter-spacing:-.045em}.sidebar-brand span{color:#48A0FF}
.sidebar-nav{padding:18px 13px 22px}
.nav-section-label{font-family:var(--sans);font-size:9px;letter-spacing:1.45px;font-weight:800;color:#647792;margin:22px 0 9px;padding-left:11px}
.nav-item{min-height:42px;padding:10px 12px;border-radius:10px;font-size:13px;gap:12px;color:#A7B6CC;margin-bottom:4px}
.nav-item:hover{background:rgba(38,91,166,.13);color:#F4F8FF}
.nav-item.active{background:linear-gradient(100deg,#0759DC,#0645B5);color:#fff;box-shadow:0 7px 20px rgba(0,83,218,.22);font-weight:650}
.nav-item.active::before{display:none}
.nav-item-ic{width:20px;display:inline-flex;align-items:center;justify-content:center;font-size:16px;color:currentColor}
.nav-sub-item{border-radius:8px;color:#8193AE;padding:8px 12px 8px 42px;font-size:12px}
.nav-sub-item:hover{background:rgba(38,91,166,.12);color:#fff}
.sidebar-foot{border-top:1px solid var(--border);padding:13px}
.user-card{background:rgba(17,35,60,.62);border:1px solid var(--border);border-radius:11px;padding:10px}
/* Top bar */
.main{margin-left:var(--sidebar-w);min-width:0;background:transparent}
.topbar{height:var(--topbar-h);padding:0 28px;background:rgba(5,9,17,.88);backdrop-filter:blur(18px);border-bottom:1px solid var(--border);gap:16px}
.page-title{font-size:20px;font-weight:750;letter-spacing:-.045em;color:#F4F7FF}
#topbar-date{font-family:var(--sans)!important;font-size:11px!important;color:#7F91AC!important}
.topbar-btn,.topbar button{transition:background .18s,border-color .18s,color .18s}
#notif-bell{border-color:var(--border)!important;background:#0B1524!important;color:#B7C6DB!important}
#notif-bell:hover{border-color:rgba(72,160,255,.55)!important;color:#fff!important}
/* Content rhythm and section headings */
.section{padding:24px 26px 36px;max-width:1900px;margin:0 auto}
.section.active{animation:kdtSectionIn .24s ease both}
@keyframes kdtSectionIn{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}
.section h1,.section h2,.section h3{letter-spacing:-.035em}
.section h1{font-size:23px}.section h2{font-size:19px}.section h3{font-size:15px}
.section .kpi-label,.section [style*="text-transform:uppercase"]{letter-spacing:.075em}
/* Panels, cards, metrics */
.card,.kpi-card,[data-widget]>.card{background:linear-gradient(145deg,rgba(13,25,43,.97),rgba(8,17,30,.98));border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-sm);}
.card{padding:18px}
.card:hover{border-color:rgba(72,160,255,.30);box-shadow:var(--sh-md)}
.kpi-card{position:relative;overflow:hidden;padding:17px 18px;background:linear-gradient(145deg,#0D1B30,#091321);border-color:rgba(102,151,219,.19);min-height:112px}
.kpi-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:linear-gradient(180deg,#1684FF,rgba(22,132,255,0));opacity:.85}
.kpi-card::after{content:"";position:absolute;right:-30px;top:-44px;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,rgba(8,102,245,.11),transparent 70%);pointer-events:none}
.kpi-card:hover{transform:translateY(-2px);border-color:rgba(72,160,255,.35)}
.kpi-label{font-family:var(--sans);font-size:10px;font-weight:750;letter-spacing:1px;color:#91A4C0;text-transform:uppercase}
.kpi-val{font-family:var(--sans);font-size:clamp(22px,2vw,29px);font-weight:750;letter-spacing:-.045em;color:#F4F8FF;font-variant-numeric:tabular-nums}
.kpi-sub{font-family:var(--sans);font-size:11px;color:#8294AF;letter-spacing:0}
/* Dashboard layout: denser KPI row, balanced chart panels */
#section-dashboard>.kpi-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:13px;margin-bottom:15px}
#section-dashboard [data-widget="score"],#section-dashboard [data-widget="capital"],#section-dashboard [data-widget="calendrier"],#section-dashboard [data-widget="netpnl"],#section-dashboard [data-widget="ana-essentiel"]{gap:14px}
#section-dashboard [data-widget="score"]>.card,#section-dashboard [data-widget="calendrier"]>.card,#section-dashboard [data-widget="netpnl"]>.card{min-width:0}
#section-dashboard .card canvas{max-width:100%}
#section-dashboard .card [id$="-list"]{scrollbar-gutter:stable}
/* Tables, forms and controls shared by every section */
.section table{border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}
.section thead th{background:#0C1A2D;color:#8FA4C2;font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.075em;border-bottom:1px solid var(--border2);padding:12px 13px;white-space:nowrap}
.section tbody td{padding:11px 13px;border-bottom:1px solid var(--border3);color:#D4DEED;font-size:12px}
.section tbody tr:hover td{background:rgba(22,104,220,.07)}
.section input:not([type=checkbox]):not([type=radio]),.section select,.section textarea{background:#081321!important;border:1px solid rgba(125,157,202,.23)!important;border-radius:9px!important;color:#EDF4FF!important;min-height:38px}
.section input:focus,.section select:focus,.section textarea:focus{outline:none!important;border-color:#2687FF!important;box-shadow:0 0 0 3px rgba(38,135,255,.13)!important}
.section input::placeholder,.section textarea::placeholder{color:#71839D!important}
.section .btn-primary,.section button[class*="primary"]{background:linear-gradient(100deg,#0866F5,#0751CA);border:1px solid rgba(94,166,255,.25);color:#fff;border-radius:9px;box-shadow:0 5px 15px rgba(8,102,245,.16)}
.section .btn-primary:hover,.section button[class*="primary"]:hover{filter:brightness(1.12);transform:translateY(-1px)}
.section .btn:not(.btn-primary),.section button.btn{border:1px solid var(--border2);border-radius:8px;color:#B7C7DE;background:rgba(15,29,48,.75)}
.section .btn:hover{border-color:rgba(72,160,255,.45);color:#fff;background:rgba(22,73,139,.25)}
/* Filters, tabs, badges and empty states */
.tf-btn,.dash-per-btn,.stat-scope-btn,.jt-fbtn,.eco-view-btn,.cg-btn,.pct-btn{border-radius:8px!important}
.tf-btn.active,.dash-per-btn.dash-per-active,.stat-scope-btn.active,.jt-fbtn.active,.eco-view-btn.active,.cg-btn.active{background:#0757D2!important;color:#fff!important;border-color:#287FF0!important;box-shadow:0 3px 12px rgba(8,102,245,.20)}
.section [style*="background:var(--bg3)"],.section [style*="background: var(--bg3)"]{background:#0B192B!important}
.section .empty-state,.section [class*="empty"]{color:#8294AF}
/* Charts: keep transparent canvas, make surrounding plot areas legible */
.section canvas{max-width:100%}
/* Calendar and event cards */
.section .kdt-cal-grid>*,.section [class*="cal-day"]{border-color:var(--border)!important}
/* Scrollbars and focus accessibility */
:focus-visible{outline:2px solid #48A0FF!important;outline-offset:2px}
/* Light theme preserves contrast with the same hierarchy */
html[data-theme="clair"] .card,html[data-theme="clair"] .kpi-card{background:#fff;border-color:rgba(30,65,115,.13);box-shadow:0 4px 18px rgba(20,45,80,.06)}
html[data-theme="clair"] .section input:not([type=checkbox]):not([type=radio]),html[data-theme="clair"] .section select,html[data-theme="clair"] .section textarea{background:#F7F9FD!important;color:#17243A!important}
/* Responsive */
@media(max-width:1500px){#section-dashboard>.kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1100px){:root{--sidebar-w:230px}.section{padding:20px 18px 30px}.topbar{padding:0 18px}#section-dashboard>.kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:780px){.main{margin-left:0}.section{padding:17px 13px 28px}.topbar{height:64px;padding:0 13px}.page-title{font-size:17px}.card{padding:15px!important}#section-dashboard>.kpi-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#section-dashboard [data-widget="score"],#section-dashboard [data-widget="capital"],#section-dashboard [data-widget="calendrier"],#section-dashboard [data-widget="netpnl"],#section-dashboard [data-widget="ana-essentiel"]{grid-template-columns:1fr!important}.kpi-card{min-height:96px;padding:13px}.kpi-val{font-size:21px}.section table{min-width:620px}}
@media(max-width:420px){.section{padding:13px 10px 24px}#section-dashboard>.kpi-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.kpi-card{padding:11px}.kpi-label{font-size:9px}.kpi-val{font-size:19px}.topbar-right{gap:6px}}
@media(prefers-reduced-motion:reduce){.section.active{animation:none!important}*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important}}


/* KDT 3.1 — dashboard cockpit: compact events, capital curve, quotes, tasks */
#kdt-sticky-kpi{position:sticky!important;top:calc(var(--topbar-h,76px) + 4px)!important;z-index:45!important;backdrop-filter:blur(16px);background:rgba(7,15,28,.94)!important;border:1px solid rgba(72,160,255,.24)!important;box-shadow:0 10px 28px rgba(0,0,0,.26)!important}
.kdt-daily-focus{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:14px;margin:0 0 15px;align-items:stretch}
.kdt-ann-card{min-width:0;max-width:100%}.kdt-ann-card #dash-annonces-list{max-height:225px;overflow:auto;padding-right:4px}
.kdt-ann-card #dash-annonces-list>div{min-width:0}
.kdt-widget-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.kdt-widget-title{font-family:var(--display);font-size:15px;font-weight:750;letter-spacing:-.025em;color:var(--text)}
.kdt-widget-sub{font-size:10.5px;color:var(--text3);margin-top:3px;line-height:1.4}
.kdt-widget-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:rgba(8,102,245,.14);border:1px solid rgba(72,160,255,.25);color:#55A5FF;font-size:16px;flex-shrink:0}
.kdt-task-form{display:flex;gap:7px;margin:8px 0 10px}.kdt-task-form input{flex:1;min-width:0;background:#081321;border:1px solid var(--border2);border-radius:8px;padding:9px 10px;color:var(--text);font:inherit;font-size:11.5px}.kdt-task-form button{white-space:nowrap;padding:7px 12px;font-size:11px}
.kdt-task-list{display:flex;flex-direction:column;gap:5px;max-height:165px;overflow:auto}.kdt-task-empty,.kdt-market-loading{padding:22px 10px;text-align:center;color:var(--text3);font-size:11px;line-height:1.6}
.kdt-task-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;background:rgba(10,24,42,.72);border:1px solid var(--border3);border-radius:8px}.kdt-task-item label{display:flex;align-items:center;gap:9px;min-width:0;flex:1;font-size:11.5px;color:var(--text2);cursor:pointer}.kdt-task-item label span{overflow-wrap:anywhere}.kdt-task-item input{accent-color:#1684FF}.kdt-task-item.is-done label span{text-decoration:line-through;opacity:.55}.kdt-task-item>button{border:0;background:transparent;color:var(--text3);font-size:18px;cursor:pointer;padding:0 4px}.kdt-task-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px;padding-top:8px;border-top:1px solid var(--border3);font-size:10px;color:var(--text3)}.kdt-text-btn{border:0;background:transparent;color:#58A2FF;font-size:10px;cursor:pointer}
.kdt-capital-market-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.85fr);gap:14px;margin-bottom:14px;align-items:stretch}
.kdt-dash-charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.kdt-equity-summary{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:4px 0 12px}.kdt-equity-summary span:first-child{font:750 23px var(--mono);letter-spacing:-.04em;color:#16C79A;font-variant-numeric:tabular-nums}.kdt-equity-summary span:last-child{font-size:10px;color:var(--text3)}
.kdt-chart-wrap{position:relative;height:220px;min-width:0}.kdt-equity-chart{height:245px}.kdt-month-chart{height:220px}.kdt-donut-layout{display:grid;grid-template-columns:minmax(130px,.9fr) minmax(120px,1fr);gap:12px;align-items:center}.kdt-donut-layout .kdt-chart-wrap{height:205px}.kdt-chart-legend{display:flex;flex-direction:column;gap:12px}.kdt-legend-row{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--text2);font-size:11px}.kdt-legend-row span{display:flex;align-items:center;gap:8px}.kdt-legend-row i{width:8px;height:8px;border-radius:50%;display:inline-block}.kdt-market-card{min-width:0;overflow:hidden}.kdt-live-dot{font-size:9px;color:#52CBA8;white-space:nowrap}.kdt-live-dot:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:#16C79A;margin-right:6px;box-shadow:0 0 8px rgba(22,199,154,.65)}.kdt-market-quotes{min-height:260px;overflow:hidden}.kdt-market-note{font-size:9px;line-height:1.45;color:var(--text3);margin-top:8px}.kdt-dashboard-settings-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:18px;padding:14px;border:1px solid var(--border);border-radius:11px;background:rgba(10,25,44,.55)}
@media(max-width:1050px){.kdt-daily-focus,.kdt-capital-market-grid{grid-template-columns:1fr}.kdt-ann-card{max-width:none}.kdt-market-quotes{min-height:250px}}
@media(max-width:780px){.kdt-dash-charts-grid{grid-template-columns:1fr}.kdt-daily-focus,.kdt-capital-market-grid{gap:10px}.kdt-equity-chart{height:205px}.kdt-donut-layout{grid-template-columns:minmax(110px,.8fr) minmax(110px,1fr)}.kdt-donut-layout .kdt-chart-wrap{height:175px}.kdt-equity-summary span:first-child{font-size:19px}#kdt-sticky-kpi{top:calc(64px + 2px)!important}}
@media(max-width:420px){.kdt-task-form{flex-wrap:wrap}.kdt-task-form input{flex-basis:100%}.kdt-task-form button{width:100%}.kdt-widget-title{font-size:14px}.kdt-equity-summary{align-items:flex-start;flex-direction:column;gap:3px}}

/* KPI hierarchy: seven real metrics, spacious desktop grid */
#section-dashboard>.kpi-row{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1500px){#section-dashboard>.kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:780px){#section-dashboard>.kpi-row{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ── KDT 2026-10-30 : corrections dashboard, navigation et agenda ── */
#kdt-sticky-kpi{
  position:sticky!important;
  top:calc(var(--topbar-h, 58px) + var(--spacebar-h, 48px) + env(safe-area-inset-top,0px))!important;
  z-index:1200!important;
  isolation:isolate;
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  box-shadow:0 12px 32px rgba(0,0,0,.32),0 1px 0 rgba(72,160,255,.12) inset;
}
#kdt-sticky-kpi::after{
  content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  background:linear-gradient(105deg,rgba(37,134,255,.055),transparent 38%,rgba(37,134,255,.035));
}
#kdt-sticky-kpi .sticky-kpi-tile,#kdt-sticky-kpi .sticky-kpi-per{position:relative;z-index:1}
#page-app .content{width:100%;max-width:none;min-width:0}
#section-dashboard{min-width:0}
.kdt-daily-focus{
  display:grid;grid-template-columns:minmax(0,1.12fr) minmax(300px,.88fr);
  gap:14px;margin:8px 0 18px;align-items:stretch
}
.kdt-ann-card,.kdt-task-card{min-width:0;max-width:100%;position:relative;overflow:hidden}
.kdt-ann-card::before,.kdt-task-card::before{
  content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(54,145,255,.55),transparent)
}
.kdt-task-card{min-height:210px}
.kdt-task-form input:focus{outline:none;border-color:#2586ff;box-shadow:0 0 0 3px rgba(37,134,255,.13)}
.kdt-task-form button{background:linear-gradient(135deg,#0866f5,#2586ff);border:1px solid rgba(115,180,255,.3);color:white}
.kdt-task-item{transition:background .18s,border-color .18s,transform .18s}
.kdt-task-item:hover{background:rgba(21,49,83,.72);border-color:rgba(67,147,255,.35);transform:translateY(-1px)}
.kdt-task-item input{width:15px;height:15px;cursor:pointer}
.kdt-task-empty{border:1px dashed rgba(91,135,190,.2);border-radius:9px;margin-top:8px}
.kdt-cal-agenda{background:linear-gradient(145deg,rgba(13,28,49,.96),rgba(7,15,27,.98));}
.kdt-cal-agenda-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.kdt-cal-agenda-head strong{font-size:14px}
.kdt-cal-agenda-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.kdt-cal-agenda-label{font:700 10px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--text3);margin-bottom:8px}
.kdt-agenda-row{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 0;border-bottom:1px solid var(--border3);font-size:11.5px;color:var(--text2)}
.kdt-agenda-row>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.kdt-agenda-row small{font:10px var(--mono);color:var(--text3);white-space:nowrap}
.kdt-agenda-dot{width:7px;height:7px;border-radius:50%;background:#2586ff;box-shadow:0 0 9px rgba(37,134,255,.45);flex:0 0 auto}
.kdt-agenda-dot.done{background:#16c79a}.kdt-agenda-dot.high{background:#ff536b;box-shadow:0 0 9px rgba(255,83,107,.4)}
.kdt-agenda-row .is-done{text-decoration:line-through;opacity:.55}
.kdt-agenda-empty{font-size:11px;color:var(--text3);padding:12px 0}
.kdt-cal-selectable{transition:transform .16s,border-color .16s,box-shadow .16s}
.kdt-cal-selectable:hover{transform:translateY(-2px);border-color:rgba(54,145,255,.6)!important;box-shadow:0 7px 18px rgba(0,0,0,.2)}
.sess-map-wrap{
  background:
    radial-gradient(ellipse at 52% 48%,rgba(10,73,151,.20),transparent 52%),
    linear-gradient(145deg,#071326,#050914 70%);
  box-shadow:inset 0 0 45px rgba(25,100,210,.09),0 12px 28px rgba(0,0,0,.18)
}
.sess-map{filter:drop-shadow(0 0 10px rgba(27,115,255,.08))}
.sess-map-wrap::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(115deg,transparent 20%,rgba(46,133,255,.035) 50%,transparent 78%);
  background-size:220% 100%;animation:kdtMapSweep 12s linear infinite
}
@keyframes kdtMapSweep{from{background-position:180% 0}to{background-position:-40% 0}}
#kdt-market-quotes{width:100%;min-width:0;overflow:hidden;border-radius:12px}
#kdt-market-quotes .tradingview-widget-container{width:100%!important;max-width:100%!important}
#kdt-market-quotes iframe{max-width:100%!important}
.kdt-market-live-note{font:10px var(--mono);color:var(--text3);margin-top:7px}
@media(max-width:900px){
  .kdt-daily-focus{grid-template-columns:1fr}
  .kdt-ann-card #dash-annonces-list{max-height:190px}
}
@media(max-width:620px){
  #kdt-sticky-kpi{top:calc(var(--topbar-h,54px) + var(--spacebar-h,46px) + env(safe-area-inset-top,0px))!important;padding:8px 9px!important;border-radius:10px}
  #kdt-sticky-kpi .sticky-kpi-tile{flex:1 1 30%;padding:0 7px!important}
  #kdt-sticky-kpi .sticky-kpi-val{font-size:13px}
  #kdt-sticky-kpi .sticky-kpi-lbl{font-size:8px}
  .kdt-cal-agenda-grid{grid-template-columns:1fr}
  .kdt-daily-focus{gap:10px}
}

.kdt-task-form #kdt-task-date{flex:0 0 132px;max-width:132px;background:#081321;border:1px solid var(--border2);border-radius:8px;padding:8px;color:var(--text2);font:10px var(--mono);color-scheme:dark}
.kdt-task-due{font:9px var(--mono);color:#69aaff;white-space:nowrap;margin-left:auto}
.kdt-task-item label{width:100%}
@media(max-width:560px){.kdt-task-form{flex-wrap:wrap}.kdt-task-form input[type=text]{flex:1 1 100%}.kdt-task-form #kdt-task-date{flex:1 1 45%;max-width:none}.kdt-task-form button{flex:1 1 35%}}

/* Atmosphère financière discrète, sans gêner la lisibilité ni les interactions. */
#section-dashboard .card{background-image:linear-gradient(155deg,rgba(21,54,94,.11),transparent 48%),linear-gradient(180deg,var(--card2),var(--card))}
#section-dashboard .kpi-card{position:relative;overflow:hidden}
#section-dashboard .kpi-card::after{content:"";position:absolute;right:-35px;top:-42px;width:105px;height:105px;border-radius:50%;background:radial-gradient(circle,rgba(37,134,255,.10),transparent 70%);pointer-events:none}

.kdt-market-customizer{margin:0 0 10px;padding:8px 10px;border:1px solid var(--border3);border-radius:9px;background:rgba(6,15,28,.55)}
.kdt-market-customizer summary{cursor:pointer;color:#72b4ff;font:600 10px var(--mono);list-style:none}
.kdt-market-customizer summary::-webkit-details-marker{display:none}
.kdt-market-selects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.kdt-market-selects label{display:flex;flex-direction:column;gap:4px;color:var(--text3);font:9px var(--mono)}
.kdt-market-selects select{min-width:0;width:100%;padding:7px 8px;border-radius:7px;border:1px solid var(--border2);background:#081321;color:var(--text);font:10px var(--mono)}
.kdt-market-selects button{grid-column:1/-1;justify-self:end}
@media(max-width:480px){.kdt-market-selects{grid-template-columns:1fr 1fr}}


/* KDT 3.2 — organiser les vrais blocs, agenda mensuel et bandeau capital prioritaire */
#kdt-sticky-kpi{z-index:15000!important;position:sticky!important;top:calc(var(--topbar-h,58px) + var(--spacebar-h,48px) + env(safe-area-inset-top,0px))!important}
#kdt-layout-modal{z-index:20000!important;align-items:center;padding:18px}
#kdt-layout-modal .modal{width:min(480px,calc(100vw - 28px));max-height:min(82vh,760px);display:flex;flex-direction:column;overflow:hidden}
#kdt-layout-modal #lay-list{flex:1;min-height:120px;max-height:none!important;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
#kdt-layout-modal .lay-row{min-height:54px;transition:border-color .16s,background .16s}
#kdt-layout-modal .lay-row:hover{border-color:rgba(64,145,255,.5)!important;background:rgba(20,48,82,.8)!important}
#kdt-layout-modal .lay-row .toggle{flex:0 0 38px}
#cal-grid [data-cal-date].is-selected{outline:2px solid #3994ff;outline-offset:1px;box-shadow:0 0 0 4px rgba(57,148,255,.12),0 8px 24px rgba(0,0,0,.2)}
.kdt-cal-marks{display:flex;flex-direction:column;gap:2px;margin-top:auto;padding-top:5px;align-items:center;font:8px var(--mono);line-height:1.25}
.kdt-cal-marks .event{color:#ffbd45}.kdt-cal-marks .task{color:#52b5ff}
.kdt-cal-agenda{border-color:rgba(72,160,255,.24)!important}
.kdt-cal-agenda-grid>div{min-width:0}
.kdt-agenda-row{overflow:hidden}
.kdt-agenda-row>span:nth-child(2){overflow-wrap:anywhere}
.kdt-map-flows path{animation:kdtFlowDash 18s linear infinite}
@keyframes kdtFlowDash{to{stroke-dashoffset:-80}}
#section-dashboard::before{content:"";position:absolute;pointer-events:none;inset:0 0 auto;height:420px;z-index:0;background:radial-gradient(ellipse at 78% 4%,rgba(20,105,230,.10),transparent 58%),radial-gradient(ellipse at 12% 34%,rgba(36,183,255,.045),transparent 55%)}
#section-dashboard>*{position:relative;z-index:1}
@media(max-width:620px){#kdt-layout-modal .modal{padding:16px!important}#kdt-layout-modal #lay-list{max-height:58vh!important}.kdt-cal-marks{font-size:7px}}

/* Fonds subtils cohérents dans toutes les sections, sans gêner les graphiques. */
body{background-image:radial-gradient(900px 520px at 78% -8%,rgba(8,102,245,.075),transparent 66%),radial-gradient(700px 460px at 2% 82%,rgba(50,184,255,.035),transparent 70%)}
.section .card{background-image:linear-gradient(145deg,rgba(20,53,91,.12),transparent 48%),linear-gradient(180deg,rgba(13,25,43,.98),rgba(8,17,30,.99));}
.kdt-agenda-event{align-items:flex-start;padding:9px 0}
.kdt-agenda-event-main{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.kdt-agenda-event-main strong{font-size:11px;font-weight:650;color:var(--text);line-height:1.35}
.kdt-agenda-event-main small{font-size:9px;line-height:1.45;color:var(--text3);white-space:normal}
.kdt-agenda-dot.medium{background:#ffbd45;box-shadow:0 0 8px rgba(255,189,69,.35)}


/* KDT 3.3 — widgets compacts, agenda à deux colonnes et carte proportionnée */
.kdt-cal-agenda-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:start;gap:16px}
#kdt-cal-agenda-tasks,#kdt-cal-agenda-events{min-width:0;max-height:250px;overflow-y:auto;overflow-x:hidden;padding-right:5px;overscroll-behavior:contain}
.kdt-agenda-event{align-items:flex-start;gap:8px}
.kdt-agenda-event-main{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;overflow-wrap:anywhere}
.kdt-agenda-event-main strong{font-size:11px;line-height:1.35;font-weight:600;overflow-wrap:anywhere}
.kdt-agenda-event-main small{white-space:normal!important;line-height:1.4;overflow-wrap:anywhere}
#section-dashboard [data-widget="sessions"]{max-width:1080px;width:100%;margin:0 auto 14px;min-width:0}
#dash-sessions{width:100%;max-width:960px;margin:0 auto;min-width:0}
#dash-sessions .sess-map-wrap,.sess-map-wrap{width:100%;max-width:960px;margin:0 auto}
#dash-sessions .sess-map{width:100%;height:auto;max-height:480px;object-fit:contain}
#kdt-market-quotes{min-height:260px;max-height:300px}
#kdt-market-quotes iframe{width:100%!important;max-width:100%!important;min-width:0!important}
.kdt-market-loading{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;min-height:210px;padding:18px;text-align:center;color:var(--text3);font-size:11px}
@media(max-width:760px){.kdt-cal-agenda-grid{grid-template-columns:minmax(0,1fr)!important}#kdt-cal-agenda-tasks,#kdt-cal-agenda-events{max-height:190px}#section-dashboard [data-widget="sessions"]{padding:14px!important}#dash-sessions .sess-map{max-height:300px}}

/* KDT 3.5 — cadre responsive : la feuille de finition rétablissait la marge desktop
   après le breakpoint tablette, alors que le menu latéral est déjà en tiroir. */
@media (max-width:1100px){
  .main{margin-left:0!important;min-width:0;width:100%}
  .topbar,.spacebar,.glisse-zone{left:0!important}
  .content{width:100%;max-width:none;min-width:0}
  .section{width:100%;max-width:none;margin-left:0;margin-right:0}
}
@media (max-width:780px){
  .section{padding-left:13px;padding-right:13px}
  #section-calperf>.card{width:100%;min-width:0}
}

/* Groupe cohérent : planisphère à gauche, analyse des sessions à droite. */
#section-dashboard [data-widget="market-insights"]{
  display:grid!important;
  grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
  gap:14px;align-items:stretch;width:100%;min-width:0;
}
#section-dashboard [data-widget="market-insights"]>[data-wname="Sessions de marché"],
#section-dashboard [data-widget="market-insights"]>[data-wname="Analyse express"]{min-width:0;width:100%;margin:0!important}
#section-dashboard #dash-sessions{width:100%;max-width:620px;margin:0!important}
#section-dashboard #dash-sessions .sess-map-wrap{width:100%;max-width:620px;margin:0!important}
#section-dashboard #dash-sessions .sess-map{width:100%;max-height:300px;height:auto}
#section-dashboard [data-widget="market-insights"] .ana-stat{min-width:0}
@media(max-width:920px){
  #section-dashboard [data-widget="market-insights"]{grid-template-columns:minmax(0,1fr)}
  #section-dashboard #dash-sessions{max-width:760px}
  #section-dashboard #dash-sessions .sess-map-wrap{max-width:760px}
  #section-dashboard #dash-sessions .sess-map{max-height:340px}
}
@media(max-width:560px){
  #section-dashboard [data-widget="market-insights"]{gap:10px}
  #section-dashboard #dash-sessions .sess-map{max-height:250px}
}

/* KDT 3.5 — aperçu central du jour, tâches éditables directement. */
.kdt-cal-day-preview{z-index:30000!important;padding:clamp(10px,3vw,28px)!important}
.kdt-cal-preview-modal{
  width:min(900px,calc(100vw - 32px));max-width:900px!important;
  max-height:min(88vh,900px);overflow:auto;padding:22px!important;
  border:1px solid rgba(72,160,255,.32);
  box-shadow:0 28px 90px rgba(0,0,0,.62),0 0 45px rgba(30,115,255,.10)
}
.kdt-cal-preview-head,.kdt-cal-preview-foot{display:flex;align-items:center;justify-content:space-between;gap:14px}
.kdt-cal-preview-head{margin-bottom:18px}
.kdt-cal-preview-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.kdt-cal-preview-columns>section{min-width:0;background:rgba(8,18,32,.42);border:1px solid var(--border2);border-radius:12px;padding:14px}
.kdt-preview-task{display:grid;grid-template-columns:18px minmax(0,1fr) 132px 28px;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border3)}
.kdt-preview-task input[type=checkbox]{width:16px;height:16px;accent-color:#2586ff}
.kdt-preview-task-title,.kdt-preview-task-date,.kdt-preview-add input{
  min-width:0;width:100%;background:var(--bg3);border:1px solid var(--border2);
  color:var(--text);border-radius:7px;padding:8px 9px;font:11px var(--sans)
}
.kdt-preview-task-title.done{text-decoration:line-through;opacity:.6}
.kdt-preview-task-date{font:10px var(--mono);color:var(--text2);color-scheme:dark}
.kdt-preview-delete{height:28px;border:1px solid rgba(239,68,68,.25);border-radius:7px;background:rgba(239,68,68,.08);color:#ff7b86;cursor:pointer}
.kdt-preview-add{display:flex;gap:8px;margin-top:12px}
.kdt-preview-add input{flex:1}
.kdt-preview-event{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:9px;align-items:start;padding:10px 0;border-bottom:1px solid var(--border3)}
.kdt-preview-event>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.kdt-preview-event strong{font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.kdt-preview-event small,.kdt-preview-event time{font:9px var(--mono);color:var(--text3);overflow-wrap:anywhere}
.kdt-preview-impact{width:7px;height:7px;border-radius:50%;margin-top:4px}
.kdt-preview-impact.high{background:#ef4444;box-shadow:0 0 9px rgba(239,68,68,.45)}
.kdt-preview-impact.medium{background:#f59e0b;box-shadow:0 0 9px rgba(245,158,11,.35)}
.kdt-preview-impact.low{background:#3b82f6}
.kdt-cal-preview-foot{justify-content:flex-end;margin-top:18px;padding-top:14px;border-top:1px solid var(--border3)}
/* Calendrier : les journées à annonces gardent leur code couleur et leur lisibilité. */
.kdt-cal-selectable[style*="rgba(239,68,68"]{box-shadow:inset 0 0 0 1px rgba(239,68,68,.08)}
.kdt-cal-selectable[style*="rgba(245,158,11"]{box-shadow:inset 0 0 0 1px rgba(245,158,11,.08)}
.kdt-cal-selectable[style*="rgba(59,130,246"]{box-shadow:inset 0 0 0 1px rgba(59,130,246,.08)}
@media(max-width:700px){
  .kdt-cal-preview-modal{padding:15px!important;width:calc(100vw - 20px)}
  .kdt-cal-preview-columns{grid-template-columns:minmax(0,1fr);gap:12px}
  .kdt-preview-task{grid-template-columns:18px minmax(0,1fr) 112px 26px;gap:6px}
  .kdt-cal-preview-head .modal-title{font-size:17px}
}
@media(max-width:420px){
  .kdt-preview-task{grid-template-columns:18px minmax(0,1fr) 26px}
  .kdt-preview-task-date{grid-column:2/3}
  .kdt-preview-delete{grid-column:3;grid-row:1/3}
  .kdt-preview-add{flex-wrap:wrap}
  .kdt-preview-add button{width:100%}
  .kdt-cal-preview-foot{flex-wrap:wrap}
  .kdt-cal-preview-foot button{flex:1}
}
/* Sur téléphone, conserver sept colonnes de jours sans la colonne récapitulative. */
@media(max-width:620px){
  #section-calperf .kdt-cal-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important;overflow:visible!important;gap:4px!important}
  #section-calperf .kdt-cal-grid .kdt-cal-week{display:none!important}
  #section-calperf .kdt-cal-grid>div{min-width:0!important;padding-left:2px!important;padding-right:2px!important}
  #section-calperf .kdt-cal-grid [data-cal-date]{min-height:56px!important;padding:6px 2px!important}
  #section-calperf .kdt-cal-grid .kdt-cal-marks{font-size:7px!important}
  #section-calperf .kdt-cal-grid .cal-day-long{display:none!important}
  #section-calperf .kdt-cal-grid .cal-day-short{display:inline!important}
}

/* KDT 3.6 — le bandeau KPI reste sous le menu latéral mobile */
#kdt-sticky-kpi{z-index:100!important;isolation:auto!important}
.sidebar-backdrop{z-index:150!important}
.sidebar{z-index:200!important}
.topbar{z-index:120!important}
@media(max-width:1100px){#kdt-sticky-kpi{top:calc(var(--topbar-h,58px) + var(--spacebar-h,48px) + env(safe-area-inset-top,0px))!important}}

/* KDT 3.6 — plan de trading simple, lisible et cohérent avec le cockpit */
.kdt-plan-page{width:100%;max-width:1120px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.kdt-plan-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap}
.kdt-plan-heading .modal-title{font-size:22px;font-weight:750}
.kdt-plan-subtitle{font-size:12px;color:var(--text3);margin-top:5px}
.kdt-plan-save-state{font:10px var(--mono);color:var(--teal-l);background:var(--teal-dim);border:1px solid rgba(79,141,253,.2);padding:7px 10px;border-radius:8px}
.kdt-plan-save-state.is-local{color:var(--amber)}
.kdt-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kdt-plan-card{padding:17px!important;min-width:0}
.kdt-plan-card-head{display:flex;align-items:center;gap:11px;margin-bottom:12px}
.kdt-plan-number{width:31px;height:31px;display:grid;place-items:center;flex:none;border-radius:9px;background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.24);color:#78adff;font:700 12px var(--mono)}
.kdt-plan-card-head strong{display:block;font-size:13px;font-weight:700;color:var(--text)}
.kdt-plan-card-head small{display:block;margin-top:2px;font-size:10px;color:var(--text3)}
.kdt-plan-field{width:100%;min-height:72px!important;resize:vertical;line-height:1.55;font-size:12px!important;padding:11px 12px!important}
.kdt-plan-checklist{padding:17px!important}
.kdt-plan-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.kdt-plan-checks label{display:flex;align-items:flex-start;gap:9px;min-width:0;font-size:11px;color:var(--text2);line-height:1.45;cursor:pointer}
.kdt-plan-checks input{accent-color:#3b82f6;width:15px;height:15px;flex:none;margin-top:1px}
.kdt-plan-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:16px;padding-top:13px;border-top:1px solid var(--border3)}
.kdt-plan-actions>span{font-size:10px;color:var(--text3)}
@media(max-width:760px){.kdt-plan-grid{grid-template-columns:minmax(0,1fr)}.kdt-plan-heading{align-items:flex-start}.kdt-plan-checks{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.kdt-plan-card,.kdt-plan-checklist{padding:14px!important}.kdt-plan-heading .modal-title{font-size:19px}}

/* KDT 3.7 — mobile header: title and clock have separate, non-overlapping space */
@media(max-width:780px){
  .topbar{display:flex!important;align-items:center!important;gap:7px!important;padding-left:10px!important;padding-right:10px!important}
  .topbar-zone-l{flex:1 1 0!important;min-width:0!important;gap:7px!important}
  .topbar-left{flex:1 1 0!important;min-width:0!important;max-width:clamp(78px,25vw,132px)!important}
  .page-title{max-width:100%!important;font-size:13px!important;line-height:1.15!important}
  #topbar-date{display:none!important}
  .topbar-right{flex:0 0 auto!important;min-width:max-content!important;margin-left:auto!important;gap:5px!important}
  .tb-status{flex:0 0 auto!important;gap:5px!important;white-space:nowrap!important}
  .tb-status .market-live{display:none!important}
  .tb-status .tb-sep{display:none!important}
  .live-clock{display:block!important;flex:0 0 auto!important;white-space:nowrap!important;font-size:10px!important;letter-spacing:-.25px}
  .tb-tools{display:none!important}
  .topbar-action{margin-left:2px!important}
  .topbar-action .topbar-btn.primary{min-width:34px!important;padding:0 8px!important}
}
@media(max-width:430px){
  .topbar{gap:5px!important}
  .topbar-zone-l{gap:5px!important}
  .topbar-left{max-width:clamp(62px,20vw,88px)!important}
  .page-title{font-size:12px!important}
  .live-clock{font-size:9px!important}
  .topbar-right{gap:4px!important}
  #notif-bell,#priv-btn{width:28px!important;height:28px!important}
}
/* La barre des espaces est fixe : le contenu doit toujours commencer après elle.
   Une seule réserve safe-area est comptée, identique pour les deux barres. */
@media(max-width:1100px){
  .glisse-zone{top:calc(var(--topbar-h) + var(--safe-top))!important;height:var(--spacebar-h)!important;z-index:115!important}
  .content{padding-top:calc(var(--topbar-h) + var(--safe-top) + var(--spacebar-h) + 22px)!important}
}
@media(max-width:780px){
  .glisse-zone{height:var(--spacebar-h)!important}
  .spacebar{height:100%!important;min-height:0!important;padding:0 10px!important}
  .glisse-fleche{flex:0 0 28px!important;width:28px!important}
  .content{padding-top:calc(var(--topbar-h) + var(--safe-top) + var(--spacebar-h) + 20px)!important}
}
/* Dashboard: chaque carte est un widget autonome et déplaçable.
   Deux widgets d'analyse cohérents se placent côte à côte, les autres
   blocs gardent toute la largeur. */
#section-dashboard{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  column-gap:14px!important;
  row-gap:14px!important;
}
#section-dashboard>[data-widget]{grid-column:1/-1;min-width:0;width:100%;margin:0!important}
#section-dashboard>[data-widget="sessions"]{grid-column:span 1;min-width:0}
#section-dashboard>[data-widget="session-performance"]{grid-column:span 1;min-width:0}
#section-dashboard>[data-widget="session-performance"]>.card,
#section-dashboard>[data-widget="best-moments"]>.card{height:100%;min-width:0}
#section-dashboard>[data-widget="best-moments"]{grid-column:1/-1;min-width:0}
#section-dashboard>[data-widget="sessions"] #dash-sessions,
#section-dashboard>[data-widget="sessions"] .sess-map-wrap{max-width:100%;width:100%;margin:0!important}
#section-dashboard>[data-widget="sessions"] .sess-map{max-height:285px;width:100%}
@media(max-width:900px){
  #section-dashboard{grid-template-columns:minmax(0,1fr)!important}
  #section-dashboard>[data-widget="sessions"],
  #section-dashboard>[data-widget="session-performance"],
  #section-dashboard>[data-widget="best-moments"]{grid-column:1/-1!important}
  #section-dashboard>[data-widget="sessions"] .sess-map{max-height:320px}
}
/* Tâches : choix de date, répétition et jours personnalisés */
.kdt-task-form-advanced{display:flex;flex-direction:column;gap:9px}
.kdt-task-main-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,160px) auto;gap:8px;align-items:end}
.kdt-task-main-row>#kdt-task-input{min-width:0}
.kdt-task-date-field,.kdt-task-repeat-select,.kdt-task-until,.kdt-task-interval{display:flex;flex-direction:column;gap:4px;min-width:0}
.kdt-task-date-field>span,.kdt-task-repeat-select>span,.kdt-task-until>span,.kdt-task-interval>span,.kdt-task-days-title{font:9px var(--mono);letter-spacing:.5px;text-transform:uppercase;color:var(--text3)}
.kdt-task-date-field input,.kdt-task-repeat-select select,.kdt-task-until input,.kdt-task-interval input{
  min-width:0;width:100%;height:36px;background:#081321;border:1px solid var(--border2);
  color:var(--text2);border-radius:8px;padding:7px 9px;font:10px var(--mono);color-scheme:dark
}
.kdt-task-repeat-row{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.kdt-task-repeat-select{width:min(220px,48%)}
.kdt-task-until{width:min(170px,42%)}
.kdt-task-interval{width:115px}
.kdt-task-interval-inline{display:flex;align-items:center;gap:6px}
.kdt-task-interval-inline input{width:48px}
.kdt-task-interval-inline small{font-size:10px;color:var(--text3)}
.kdt-task-custom-days{padding:10px 11px;border:1px solid var(--border3);border-radius:9px;background:rgba(5,15,29,.45)}
.kdt-task-custom-days[hidden],.kdt-task-interval[hidden]{display:none!important}
.kdt-task-days{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}
.kdt-task-days label{display:flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid var(--border2);border-radius:7px;font-size:10px;color:var(--text2);cursor:pointer}
.kdt-task-days input{accent-color:#287fff}
.kdt-task-custom-days>small{font-size:9px;color:var(--text3)}
@media(max-width:560px){
  .kdt-task-main-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .kdt-task-main-row>#kdt-task-input{grid-column:1/-1}
  .kdt-task-main-row>button{width:100%;min-height:36px}
  .kdt-task-date-field{grid-column:1}
  .kdt-task-repeat-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .kdt-task-repeat-select,.kdt-task-until{width:100%}
  .kdt-task-interval{grid-column:1/-1;width:100%}
}

.kdt-task-repeat-tag{font:8px var(--mono);color:#83b8ff;background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.2);border-radius:5px;padding:2px 5px;margin-left:5px;white-space:nowrap}

@media(max-width:780px){
  /* Fallback iOS : même si la WebView renvoie une safe-area nulle,
     la barre du site reste sous l'horloge système. */
  :root{--safe-top:max(env(safe-area-inset-top,0px),24px)}
  .topbar{height:calc(var(--topbar-h) + var(--safe-top))!important;padding-top:var(--safe-top)!important}
}

/* KDT 3.7.2 — IMPORTANT : la grille dashboard ne doit exister que lorsque
   le dashboard est actif. Le sélecteur ID + !important écrasait
   .section { display:none } même après le clic sur une autre rubrique. */
#section-dashboard:not(.active){
  display:none!important;
}
#section-dashboard.active{
  display:grid!important;
}

/* KDT 3.8 — widgets regroupés, filtres de capital et personnalisation manuelle */
#section-dashboard>[data-widget="session-performance"]{display:flex;flex-direction:column;gap:12px;min-width:0}
#section-dashboard .kdt-best-moments-inner{margin-top:0!important}
.kdt-chart-controls{display:flex;align-items:center;gap:8px;margin:10px 0 8px;flex-wrap:wrap}
.kdt-chart-controls label{font:10px var(--mono);color:var(--text3);text-transform:uppercase;letter-spacing:.5px}
.kdt-chart-controls select,.kdt-year-select{min-width:130px;max-width:190px;font-size:11px!important;padding:7px 10px!important}
.kdt-year-select{min-width:76px;max-width:90px}
.kdt-trade-checklist{margin:14px 0 10px;padding:13px;border:1px solid rgba(59,130,246,.24);background:rgba(37,99,235,.055);border-radius:11px}
.kdt-trade-checklist-head{display:flex;flex-direction:column;gap:3px;margin-bottom:10px}
.kdt-trade-checklist-head strong{font-size:12px;color:var(--text)}
.kdt-trade-checklist-head span{font-size:10px;color:var(--text3)}
.kdt-trade-checklist-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}
.kdt-trade-checklist-grid label{display:flex;align-items:flex-start;gap:8px;font-size:11px;color:var(--text2);line-height:1.45}
.kdt-trade-checklist-grid input{accent-color:#3b82f6;flex:none;margin-top:1px}
.kdt-note-colors{display:flex;gap:9px;flex-wrap:wrap}
.kdt-note-color{width:28px;height:28px;border-radius:50%;background:var(--note-color);border:2px solid rgba(180,200,230,.25);cursor:pointer;box-shadow:inset 0 0 0 2px rgba(0,0,0,.12)}
.kdt-note-color.is-selected{outline:2px solid #60a5fa;outline-offset:3px}
.kdt-psychology-detail{margin-top:14px;padding:12px 14px;border:1px solid rgba(139,92,246,.25);border-radius:10px;background:rgba(139,92,246,.07);font-size:12px;color:var(--text2);line-height:1.55}
.kdt-psychology-detail strong{display:block;color:var(--text);margin-bottom:5px}
.fil-ligne{transition:background .15s ease}
.fil-ligne[style*="border-left"]{border-radius:7px;padding-left:8px}
.kdt-manual-drag,.kdt-manual-resize{display:none;position:absolute;z-index:30;width:28px;height:26px;border:1px solid rgba(100,160,255,.45);background:#0b1930;color:#9fc5ff;border-radius:7px;cursor:pointer;align-items:center;justify-content:center;font-size:15px;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.kdt-manual-drag{top:7px;right:42px;cursor:grab;touch-action:none}
.kdt-manual-resize{right:7px;bottom:7px;cursor:nwse-resize;touch-action:none}
body.kdt-free-layout #section-dashboard>[data-widget]{outline:1px dashed rgba(96,165,250,.28);outline-offset:2px}
body.kdt-free-layout .kdt-manual-drag,body.kdt-free-layout .kdt-manual-resize{display:flex}
body.kdt-free-layout .kdt-manual-drag{position:absolute}
.kdt-is-dragging{opacity:.55;outline:2px dashed #60a5fa!important}
@media(max-width:760px){
 .kdt-trade-checklist-grid{grid-template-columns:minmax(0,1fr)}
 #kdt-free-layout-toggle{display:none!important}
 .kdt-chart-controls{align-items:stretch}
}

/* KDT — page Objectifs : espace de motivation et suivi mesurable */
.kdt-goals-page{display:flex;flex-direction:column;gap:18px;min-width:0}
.kdt-goals-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:230px;padding:28px 32px;border:1px solid rgba(67,143,255,.28);border-radius:18px;background:linear-gradient(115deg,#0b1b32 0%,#0b2342 56%,#0a1830 100%)}
.kdt-goals-hero-copy{position:relative;z-index:2;max-width:680px}
.kdt-goals-eyebrow{font:10px var(--mono);letter-spacing:1.5px;color:#69adff;font-weight:700}
.kdt-goals-hero h2{font-size:clamp(24px,3vw,34px);margin:9px 0 7px;color:#f2f7ff}
.kdt-goals-hero p{font-size:13px;color:#a8bbd5;max-width:560px;margin:0;line-height:1.6}
.kdt-goals-hero-stats{display:flex;gap:30px;flex-wrap:wrap;margin-top:24px}
.kdt-goals-hero-stats>div{display:flex;flex-direction:column;gap:3px}
.kdt-goals-hero-stats strong{font:700 23px var(--mono);color:#63adff}
.kdt-goals-hero-stats span{font-size:10px;color:#8fa4c0}
.kdt-goals-hero-art{position:relative;flex:0 0 220px;height:180px;display:grid;place-items:center}
.kdt-goals-orbit{position:absolute;border:1px solid rgba(85,161,255,.35);border-radius:50%;transform:rotate(-24deg)}
.kdt-goals-orbit.orbit-one{width:190px;height:100px}
.kdt-goals-orbit.orbit-two{width:145px;height:145px;border-color:rgba(85,161,255,.2)}
.kdt-goals-hero-star{position:absolute;top:18px;right:34px;color:#ffd27a;font-size:24px}
.kdt-goals-hero-target{font-size:74px;line-height:1;color:#67b1ff;text-shadow:0 0 34px rgba(53,142,255,.35)}
.kdt-goals-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.kdt-goals-toolbar h3{font-size:17px;color:var(--text)}
.kdt-goals-toolbar p{font-size:11px;color:var(--text3);margin:4px 0 0}
.kdt-goals-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.kdt-goal-card{min-width:0;overflow:hidden;border:1px solid var(--border2);border-radius:15px;background:linear-gradient(180deg,#0d1b2e,#091321)}
.kdt-goal-card.is-complete{border-color:rgba(34,197,139,.45)}
.kdt-goal-card-image{height:145px;position:relative;overflow:hidden;background:linear-gradient(135deg,#102c50,#0c192d)}
.kdt-goal-image{width:100%;height:100%;object-fit:cover;display:block}
.kdt-goal-image-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#76b7ff}
.kdt-goal-image-empty span{font-size:38px}
.kdt-goal-image-empty small{font-size:10px;color:#8fa4c0}
.kdt-goal-category{position:absolute;left:12px;top:12px;border:1px solid rgba(140,190,255,.3);border-radius:20px;padding:5px 9px;background:rgba(5,16,32,.82);color:#b9d9ff;font:9px var(--mono)}
.kdt-goal-card-body{padding:16px}
.kdt-goal-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.kdt-goal-card-top h3{font-size:15px;color:#edf5ff;line-height:1.35}
.kdt-goal-card-top p{font-size:11px;color:#93a8c3;margin:5px 0 0;line-height:1.5;white-space:pre-wrap}
.kdt-goal-percent{font:700 18px var(--mono);color:#62aaff;white-space:nowrap}
.kdt-goal-progress{height:8px;border-radius:10px;background:#172a42;overflow:hidden;margin:16px 0 13px}
.kdt-goal-progress span{height:100%;display:block;border-radius:10px;background:linear-gradient(90deg,#1672f5,#4eb4ff)}
.kdt-goal-card.is-complete .kdt-goal-progress span{background:linear-gradient(90deg,#0da77b,#44d6a7)}
.kdt-goal-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.kdt-goal-numbers>div{padding:9px;border-radius:9px;background:rgba(20,39,64,.68);min-width:0}
.kdt-goal-numbers small{display:block;font-size:9px;color:#8398b4;line-height:1.35;margin-bottom:5px}
.kdt-goal-numbers strong{font:600 12px var(--mono);color:#e4efff;overflow-wrap:anywhere}
.kdt-goal-numbers em{font-style:normal;color:#8ca4c2;font-size:9px}
.kdt-goal-deadline{font-family:var(--sans)!important;font-size:10px!important}
.kdt-goal-quick{display:flex;align-items:center;gap:10px;margin:13px 0 4px}
.kdt-goal-quick label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;font-size:9px;color:#8fa4c0;flex-wrap:wrap}
.kdt-goal-quick input{width:100%;accent-color:#278aff;flex:1 0 100%}
.kdt-goal-quick b{font:10px var(--mono);color:#65adff}
.kdt-goal-quick button{border:1px solid var(--border2);border-radius:8px;padding:7px 10px;color:#b9d8ff;font-size:10px;white-space:nowrap}
.kdt-goal-steps{margin-top:14px;padding-top:12px;border-top:1px solid rgba(115,145,185,.14)}
.kdt-goal-steps-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}
.kdt-goal-steps-head strong{font-size:10px;color:#d9e8fc}
.kdt-goal-steps-head span{font:9px var(--mono);color:#7f98b8}
.kdt-goal-step{display:flex;gap:8px;align-items:flex-start;padding:6px 0;font-size:10px;color:#a8bad1;line-height:1.45}
.kdt-goal-step input{accent-color:#2388ff;margin-top:2px}
.kdt-goal-step.is-done span{text-decoration:line-through;color:#6f8aab}
.kdt-goal-no-steps{margin-top:13px;padding:11px;border-radius:8px;background:rgba(25,45,70,.5);font-size:10px;color:#8097b4}
.kdt-goals-empty{padding:36px 20px;text-align:center;border:1px dashed rgba(87,147,220,.35);border-radius:15px;background:rgba(13,29,50,.5)}
.kdt-goals-empty-icon{font-size:36px}
.kdt-goals-empty h3{font-size:17px;margin:9px 0 5px;color:#e8f2ff}
.kdt-goals-empty p{max-width:460px;margin:0 auto 16px;color:#8fa4c0;font-size:11px;line-height:1.6}
.kdt-goals-footer{padding:13px 16px;border:1px solid rgba(71,139,222,.18);border-radius:10px;background:rgba(13,30,51,.55);font-size:11px;color:#91a7c4}
.kdt-goals-footer span{font:9px var(--mono);letter-spacing:1px;color:#65aaff;margin-right:10px}
.kdt-goal-editor{width:min(720px,calc(100vw - 28px));max-height:88vh;overflow:auto}
.kdt-goal-editor-head{display:flex;justify-content:space-between;gap:14px;margin-bottom:18px}
.kdt-goal-editor-head h3{font-size:19px;margin:5px 0;color:var(--text)}
.kdt-goal-editor-head p{font-size:11px;color:var(--text3);margin:0}
.kdt-goal-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.kdt-goal-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:10px;color:var(--text2)}
.kdt-goal-field-wide{grid-column:1/-1}
.kdt-goal-field input,.kdt-goal-field select,.kdt-goal-field textarea{width:100%;min-width:0;border:1px solid var(--border2);border-radius:8px;padding:10px 11px;background:var(--bg3);color:var(--text);font-size:12px}
.kdt-goal-field small{font-size:9px;color:var(--text3)}
.kdt-goal-upload{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px;border:1px dashed var(--border2);border-radius:10px}
.kdt-goal-upload>div{width:90px;height:65px;border-radius:7px;background:var(--bg3);overflow:hidden;display:grid;place-items:center;color:#6ab2ff;font-size:26px}
.kdt-goal-upload img{width:100%;height:100%;object-fit:cover}
.kdt-goal-upload small{flex:1 1 180px;color:var(--text3);font-size:9px}
.kdt-goal-editor-actions{display:flex;align-items:center;gap:10px;margin-top:18px}
.kdt-goal-editor-actions span{flex:1}
@media(max-width:900px){.kdt-goals-grid{grid-template-columns:1fr}.kdt-goals-hero-art{flex-basis:150px}.kdt-goals-hero{padding:23px}}
@media(max-width:620px){.kdt-goals-hero{padding:20px;min-height:0}.kdt-goals-hero-art{display:none}.kdt-goals-hero-stats{gap:18px;margin-top:18px}.kdt-goals-hero-stats strong{font-size:19px}.kdt-goals-hero-stats span{font-size:9px}.kdt-goals-toolbar{align-items:flex-start}.kdt-goals-toolbar .btn{width:100%}.kdt-goal-numbers{grid-template-columns:1fr 1fr}.kdt-goal-numbers>div:last-child{grid-column:1/-1}.kdt-goal-editor-grid{grid-template-columns:1fr}.kdt-goal-field-wide{grid-column:auto}.kdt-goal-editor-actions{flex-wrap:wrap}.kdt-goal-editor-actions .btn{flex:1}}
/* Désactivation des effets d'ambiance et animations décoratives de fond. */
body::before{display:none!important;content:none!important}
body{background-image:none!important}
#section-dashboard::before{display:none!important;content:none!important}
.section .card{background-image:none!important}
.kdt-map-flows path{animation:none!important}

/* KDT 4.0 — planisphère pleine largeur + fonds animés personnalisables */
#section-dashboard [data-widget="sessions"],
#section-analytics #ana-clock-wrap{min-width:0}
#section-dashboard #dash-sessions,
#section-analytics #ana-clock{width:100%;max-width:none;min-width:0}
#section-dashboard #dash-sessions .sess-map-wrap,
#section-analytics #ana-clock .sess-map-wrap{width:100%!important;max-width:none!important;margin:0!important;position:relative;overflow:hidden;border-radius:12px}
#section-dashboard #dash-sessions .sess-map,
#section-analytics #ana-clock .sess-map{display:block;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;aspect-ratio:2/1;object-fit:fill}
#section-dashboard [data-widget="sessions"]{width:100%;max-width:none;min-width:0}
#section-dashboard #dash-sessions .ana-sess-row{width:100%;min-width:0}

/* L'animation reste derrière les widgets et n'intercepte aucun clic. */
#page-app .app-shell{isolation:isolate}
#kdt-background-layer{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;opacity:1;transition:opacity .35s ease}
#page-app .app-shell>.sidebar,#page-app .app-shell>.main{position:relative;z-index:2}
#kdt-background-layer .kdt-bg-glow{position:absolute;border-radius:50%;filter:blur(65px);will-change:transform,opacity}
.kdt-bg-glow-a{width:42vw;height:42vw;min-width:320px;min-height:320px;left:18%;top:-22%;background:radial-gradient(circle,rgba(27,112,255,.20),transparent 68%);animation:kdtBgFloatA 22s ease-in-out infinite alternate}
.kdt-bg-glow-b{width:38vw;height:38vw;min-width:280px;min-height:280px;right:-12%;bottom:-28%;background:radial-gradient(circle,rgba(0,190,170,.13),transparent 68%);animation:kdtBgFloatB 28s ease-in-out infinite alternate}
.kdt-bg-network{position:absolute;inset:0;width:100%;height:100%;opacity:.42}
.kdt-bg-path{fill:none;stroke:url(#kdtBgLine);stroke-width:1.35;stroke-dasharray:8 14;animation:kdtBgFlow 32s linear infinite}
.kdt-bg-path.path-b{animation-duration:43s;animation-direction:reverse;opacity:.65}
.kdt-bg-path.path-c{animation-duration:52s;opacity:.45}
.kdt-bg-nodes{fill:#4da3ff;filter:drop-shadow(0 0 7px rgba(50,145,255,.8));animation:kdtBgPulse 4s ease-in-out infinite alternate}
.kdt-bg-grid{position:absolute;inset:0;opacity:.12;background-image:linear-gradient(rgba(115,165,230,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(115,165,230,.13) 1px,transparent 1px);background-size:72px 72px;mask-image:radial-gradient(ellipse at 50% 42%,#000 0%,transparent 78%)}
@keyframes kdtBgFlow{to{stroke-dashoffset:-440}}
@keyframes kdtBgFloatA{0%{transform:translate3d(-8%,0,0) scale(.9);opacity:.55}100%{transform:translate3d(24%,20%,0) scale(1.2);opacity:1}}
@keyframes kdtBgFloatB{0%{transform:translate3d(8%,8%,0) scale(1);opacity:.45}100%{transform:translate3d(-28%,-20%,0) scale(1.18);opacity:.9}}
@keyframes kdtBgPulse{0%{opacity:.35}100%{opacity:.9}}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-network{opacity:.08}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-grid{opacity:.025}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-a{background:radial-gradient(circle,rgba(22,116,255,.25),rgba(0,194,175,.12) 42%,transparent 70%)}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-b{background:radial-gradient(circle,rgba(106,72,255,.18),rgba(0,190,170,.13) 45%,transparent 70%)}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-network{opacity:.04}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-glow{opacity:.25}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-grid{opacity:.30;animation:kdtBgGrid 36s linear infinite}
@keyframes kdtBgGrid{to{background-position:72px 72px}}
html[data-kdt-bg="stars"] #kdt-background-layer .kdt-bg-network{opacity:.06}
html[data-kdt-bg="stars"] #kdt-background-layer .kdt-bg-grid{opacity:0}
html[data-kdt-bg="stars"] #kdt-background-layer:after{content:"";position:absolute;inset:0;background-image:radial-gradient(2px 2px at 12% 18%,rgba(130,190,255,.7) 50%,transparent 100%),radial-gradient(1px 1px at 32% 68%,rgba(160,210,255,.6) 50%,transparent 100%),radial-gradient(2px 2px at 73% 27%,rgba(100,165,255,.6) 50%,transparent 100%),radial-gradient(1px 1px at 88% 78%,rgba(160,210,255,.65) 50%,transparent 100%),radial-gradient(1px 1px at 56% 42%,rgba(160,210,255,.5) 50%,transparent 100%);background-size:420px 360px;animation:kdtBgStars 24s linear infinite}
@keyframes kdtBgStars{to{background-position:210px 180px}}
html[data-kdt-bg="off"] #kdt-background-layer{opacity:0}
.kdt-bg-settings{margin-top:20px;padding-top:18px;border-top:1px solid var(--border3)}
.kdt-bg-settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.kdt-bg-settings-head strong{display:block;font-size:12.5px;color:var(--text)}
.kdt-bg-settings-head small{display:block;margin-top:3px;font-size:10px;color:var(--text3)}
.kdt-bg-live-indicator{font:9px var(--mono);letter-spacing:.7px;color:#55b4ff}
.kdt-background-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.kdt-bg-choice{border:1px solid var(--border2);border-radius:10px;padding:7px;background:var(--bg3);cursor:pointer;text-align:left;transition:border-color .2s,transform .2s,box-shadow .2s;min-width:0}
.kdt-bg-choice:hover{transform:translateY(-2px);border-color:rgba(75,155,255,.65)}
.kdt-bg-choice[aria-pressed="true"]{border-color:#3995ff;box-shadow:0 0 0 1px rgba(57,149,255,.25),0 5px 20px rgba(20,100,230,.12)}
.kdt-bg-preview{height:62px;border-radius:7px;position:relative;overflow:hidden;background:#071326}
.kdt-bg-preview:before,.kdt-bg-preview:after{content:"";position:absolute;border-radius:50%;filter:blur(13px)}
.kdt-bg-preview:before{width:85px;height:85px;left:15%;top:-35px;background:rgba(35,122,255,.65)}
.kdt-bg-preview:after{width:75px;height:75px;right:5%;bottom:-40px;background:rgba(0,190,160,.4)}
.kdt-bg-preview span{position:absolute;inset:0;background-image:linear-gradient(135deg,transparent 40%,rgba(100,180,255,.65) 41%,transparent 42%),linear-gradient(30deg,transparent 62%,rgba(0,200,170,.6) 63%,transparent 64%);background-size:100% 100%}
.kdt-bg-preview.aurora{background:linear-gradient(120deg,#08162b,#092f42,#101b3d)}
.kdt-bg-preview.aurora span{filter:blur(7px);background:linear-gradient(120deg,transparent 20%,rgba(0,200,175,.45),rgba(80,110,255,.4),transparent 80%)}
.kdt-bg-preview.grid{background-color:#071326;background-image:linear-gradient(rgba(110,160,220,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(110,160,220,.22) 1px,transparent 1px);background-size:12px 12px}
.kdt-bg-preview.stars{background-color:#050a16;background-image:radial-gradient(2px 2px at 15% 25%,#8cc8ff 50%,transparent),radial-gradient(1px 1px at 60% 60%,#8cc8ff 50%,transparent),radial-gradient(2px 2px at 85% 20%,#8cc8ff 50%,transparent)}
.kdt-bg-preview.off{background:#090e18}
.kdt-bg-choice-label{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:7px 2px 1px;font-size:10px;color:var(--text2)}
.kdt-bg-choice-label b{font-size:10px;color:var(--text)}

@media(max-width:620px){#section-dashboard #dash-sessions .sess-map{max-height:none!important}.kdt-background-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* KDT 4.1 — étirement réel du dashboard : suppression du retrait horizontal fantôme */
#page-app{width:100%;min-width:0}#page-app .app-shell{display:block!important;width:100%;min-width:0;max-width:none}#page-app .main{display:flex;width:calc(100% - var(--sidebar-w))!important;min-width:0;max-width:none;flex:none!important;margin-left:var(--sidebar-w)!important;background:transparent!important;box-sizing:border-box}
#page-app .content{width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;align-self:stretch;box-sizing:border-box}
#page-app #section-dashboard{width:100%!important;max-width:none!important;min-width:0!important;margin-left:0!important;margin-right:0!important;justify-self:stretch;box-sizing:border-box}
@media(max-width:1100px){#page-app .main{width:100%!important;flex:none!important;margin-left:0!important}}
/* Le fond reste visible entre les widgets, sans passer au-dessus du contenu. */
#page-app .app-shell{position:relative;background:transparent!important}
#page-app .main{isolation:isolate}
#page-app .main>.content{position:relative;z-index:1;background:transparent!important}
#page-app #kdt-background-layer{z-index:0!important;opacity:1!important}
#page-app .main{background-color:transparent!important}
#kdt-bg-custom-image{position:absolute;inset:0;z-index:0;background-position:center;background-size:cover;background-repeat:no-repeat;opacity:1;display:none;transform:scale(1.015)}
#kdt-background-layer>.kdt-bg-glow,#kdt-background-layer>.kdt-bg-network,#kdt-background-layer>.kdt-bg-grid{z-index:1}
html[data-kdt-bg="custom"] #kdt-background-layer>.kdt-bg-glow{opacity:.08}
html[data-kdt-bg="custom"] #kdt-background-layer>.kdt-bg-network{opacity:.06}
html[data-kdt-bg="custom"] #kdt-background-layer>.kdt-bg-grid{opacity:0}
html[data-kdt-bg="custom"] #kdt-background-layer #kdt-bg-custom-image{display:block}
.kdt-bg-preview.custom{background-position:center;background-size:cover;background-repeat:no-repeat}
.kdt-bg-preview.custom:before,.kdt-bg-preview.custom:after{display:none}
.kdt-bg-custom-upload{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:14px;padding:13px;border:1px dashed rgba(91,151,220,.35);border-radius:11px;background:rgba(10,24,42,.55)}
.kdt-bg-custom-copy strong{display:block;font-size:11px;color:var(--text)}
.kdt-bg-custom-copy small,.kdt-bg-custom-status{display:block;margin-top:4px;font-size:9px;line-height:1.5;color:var(--text3)}
.kdt-bg-custom-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.kdt-bg-custom-actions .btn{white-space:nowrap}
.kdt-bg-custom-preview{grid-column:1/-1;height:104px;border-radius:8px;background-position:center;background-size:cover;background-repeat:no-repeat;border:1px solid var(--border2)}
.kdt-bg-custom-status{grid-column:1/-1;margin-top:0}
@media(max-width:620px){.kdt-bg-custom-upload{grid-template-columns:1fr}.kdt-bg-custom-actions{width:100%}.kdt-bg-custom-actions .btn{flex:1;justify-content:center}}



/* KDT 4.3 — correction structurelle de la largeur et fonds animés renforcés */
#page-app,#page-app>.app-shell{width:100%!important;max-width:none!important;min-width:0!important}
#page-app .app-shell{overflow:visible}
#page-app .sidebar{flex:0 0 var(--sidebar-w)!important;width:var(--sidebar-w)!important}
#page-app .main{min-width:0!important;max-width:none!important}
#page-app .content{display:block!important;flex:1 1 auto!important;min-width:0!important}
#page-app #section-dashboard{display:grid!important;width:100%!important;max-width:none!important;min-width:0!important}
#kdt-background-layer{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:0!important;opacity:1!important;pointer-events:none!important}
#kdt-background-layer .kdt-bg-network{opacity:.92!important}
#kdt-background-layer .kdt-bg-path{stroke-width:2.25!important;stroke-dasharray:13 11!important;filter:drop-shadow(0 0 4px rgba(47,145,255,.9))!important}
#kdt-background-layer .kdt-bg-path.path-a{stroke-width:2.8!important}
#kdt-background-layer .kdt-bg-path.path-b{opacity:.95!important;stroke-width:2.4!important}
#kdt-background-layer .kdt-bg-path.path-c{opacity:.8!important;stroke-width:2.1!important}
#kdt-background-layer .kdt-bg-nodes{filter:drop-shadow(0 0 11px rgba(50,150,255,1))!important}
#kdt-background-layer .kdt-bg-nodes circle{r:5!important}
#kdt-background-layer .kdt-bg-glow-a{opacity:1!important;background:radial-gradient(circle,rgba(24,112,255,.34),rgba(24,112,255,.10) 38%,transparent 72%)!important;filter:blur(48px)!important}
#kdt-background-layer .kdt-bg-glow-b{opacity:.9!important;background:radial-gradient(circle,rgba(0,205,185,.24),rgba(0,150,220,.09) 42%,transparent 72%)!important;filter:blur(54px)!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-network{opacity:.22!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-a{opacity:1!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-b{opacity:1!important}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-grid{opacity:.42!important}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-network{opacity:.12!important}
html[data-kdt-bg="stars"] #kdt-background-layer .kdt-bg-network{opacity:.10!important}
html[data-kdt-bg="stars"] #kdt-background-layer:after{opacity:1!important}
html[data-kdt-bg="custom"] #kdt-background-layer .kdt-bg-network{opacity:.10!important}
html[data-kdt-bg="custom"] #kdt-background-layer .kdt-bg-glow-a,
html[data-kdt-bg="custom"] #kdt-background-layer .kdt-bg-glow-b{opacity:.22!important}
html[data-kdt-bg="off"] #kdt-background-layer{opacity:0!important}


/* KDT 4.3.1 — verrouillage géométrique : sidebar fixe + contenu indépendant */
#page-app .app-shell{display:block!important;position:relative!important;width:100%!important;min-width:0!important;overflow:visible!important}
#page-app .sidebar{position:fixed!important;left:0!important;top:0!important;width:var(--sidebar-w)!important;flex:none!important}
#page-app .main{position:relative!important;display:flex!important;flex-direction:column!important;left:auto!important;right:auto!important;transform:none!important;margin-left:var(--sidebar-w)!important;width:calc(100% - var(--sidebar-w))!important;max-width:none!important;min-width:0!important;flex:none!important;box-sizing:border-box!important}
#page-app .content{position:relative!important;display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
#page-app #section-dashboard{position:relative!important;display:grid!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important}
@media(max-width:1100px){
  #page-app .main{margin-left:0!important;width:100%!important}
  #page-app .content,#page-app #section-dashboard{width:100%!important}
}

/* KDT 4.4 — lisibilité : widgets opaques, ambiance animée discrète */
#page-app .card,
#page-app .kpi-card,
#page-app [data-widget]>.card,
#page-app .sticky-kpi,
#page-app .kdt-widget{
  background-color:#0A1423!important;
  background-image:linear-gradient(155deg,rgba(13,29,49,.985),rgba(7,15,27,.99))!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
#page-app .kpi-card{background-image:linear-gradient(155deg,#0D1B30,#091321)!important}
#page-app .card{border-color:rgba(91,133,190,.28)!important}
#kdt-background-layer .kdt-bg-network{opacity:.34!important}
#kdt-background-layer .kdt-bg-path{opacity:.24!important;stroke-width:1.25!important;filter:drop-shadow(0 0 2px rgba(47,145,255,.28))!important}
#kdt-background-layer .kdt-bg-path.path-a{opacity:.30!important;stroke-width:1.45!important}
#kdt-background-layer .kdt-bg-path.path-b{opacity:.22!important;stroke-width:1.2!important}
#kdt-background-layer .kdt-bg-path.path-c{opacity:.16!important;stroke-width:1.1!important}
#kdt-background-layer .kdt-bg-nodes{opacity:.24!important;filter:drop-shadow(0 0 4px rgba(50,150,255,.35))!important}
#kdt-background-layer .kdt-bg-nodes circle{r:3!important}
#kdt-background-layer .kdt-bg-glow-a{opacity:.28!important;filter:blur(72px)!important}
#kdt-background-layer .kdt-bg-glow-b{opacity:.22!important;filter:blur(78px)!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-a,
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-b{opacity:.34!important}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-grid{opacity:.14!important}
html[data-kdt-bg="stars"] #kdt-background-layer:after{opacity:.32!important}
html[data-kdt-bg="custom"] #kdt-background-layer .kdt-bg-custom-image{opacity:.88!important}

/* KDT 4.4 — état actif explicite : une seule section visible */
#page-app .section:not(.active){display:none!important}
#page-app .section.active{display:flex!important;flex-direction:column;min-width:0}
#page-app #section-dashboard.active{display:grid!important}
#page-app .section.active[aria-current="page"]{visibility:visible!important;opacity:1!important;pointer-events:auto!important}

/* KDT 4.4 — sidebar hors du flux : empêche le retrait gauche doublé */
#page-app .app-shell>.sidebar{position:fixed!important;left:0!important;top:0!important;z-index:200!important}
#page-app .app-shell>.main{position:relative!important;z-index:2!important}

/* KDT 4.5 — fond animé visible mais mesuré, derrière des panneaux opaques */
#page-app .app-shell{position:relative!important;isolation:isolate!important;background:transparent!important}
#page-app #kdt-background-layer{
  position:fixed!important;inset:0!important;z-index:1!important;
  display:block!important;visibility:visible!important;pointer-events:none!important;
  opacity:1!important;overflow:hidden!important;
}
#page-app .app-shell>.sidebar{position:fixed!important;z-index:200!important}
#page-app .app-shell>.main{position:relative!important;z-index:2!important;background:transparent!important}
#page-app .main>.content,#page-app .section{background:transparent!important}
#kdt-background-layer .kdt-bg-network{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;opacity:.48!important}
#kdt-background-layer .kdt-bg-path{fill:none!important;stroke:url(#kdtBgLine)!important;stroke-width:1.55!important;stroke-dasharray:9 17!important;opacity:.48!important;filter:drop-shadow(0 0 2px rgba(45,137,255,.3))!important;animation:kdtBgFlow 36s linear infinite!important}
#kdt-background-layer .kdt-bg-path.path-b{opacity:.36!important;animation-duration:44s!important}
#kdt-background-layer .kdt-bg-path.path-c{opacity:.26!important;animation-duration:52s!important}
#kdt-background-layer .kdt-bg-nodes{opacity:.34!important;animation:kdtBgPulse 5.5s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-glow{display:block!important;filter:blur(82px)!important}
#kdt-background-layer .kdt-bg-glow-a{opacity:.22!important;animation:kdtBgFloatA 28s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-glow-b{opacity:.18!important;animation:kdtBgFloatB 34s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-grid{opacity:.10!important;animation:kdtBgGrid 48s linear infinite!important}
html[data-kdt-bg="off"] #kdt-background-layer{opacity:0!important}
html[data-kdt-bg="network"] #kdt-background-layer .kdt-bg-network{opacity:.48!important}
#page-app .card,#page-app .kpi-card,#page-app [data-widget]>.card{
  background-color:#091525!important;
  background-image:linear-gradient(155deg,rgba(13,29,49,.985),rgba(7,15,27,.99))!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  border-color:rgba(91,133,190,.30)!important;
}


/* KDT 4.6 — couche d'ambiance : visible dans les espaces libres, jamais au-dessus des contrôles. */
#page-app .app-shell{position:relative!important;isolation:isolate!important;background:transparent!important}
#page-app #kdt-background-layer{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:0!important;display:block!important;visibility:visible!important;pointer-events:none!important;overflow:hidden!important;opacity:1!important}
#page-app .app-shell>.sidebar{position:fixed!important;z-index:200!important}
#page-app .app-shell>.main{position:relative!important;z-index:2!important;background:transparent!important}
#page-app .main>.content,#page-app .section{background:transparent!important}
#kdt-background-layer .kdt-bg-network{display:block!important;opacity:.58!important}
#kdt-background-layer .kdt-bg-path{stroke-width:1.7!important;stroke-dasharray:10 16!important;opacity:.58!important;animation:kdtBgFlow 34s linear infinite!important}
#kdt-background-layer .kdt-bg-path.path-b{opacity:.43!important;animation-duration:43s!important}
#kdt-background-layer .kdt-bg-path.path-c{opacity:.32!important;animation-duration:52s!important}
#kdt-background-layer .kdt-bg-glow-a{opacity:.27!important;animation:kdtBgFloatA 28s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-glow-b{opacity:.23!important;animation:kdtBgFloatB 34s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-grid{opacity:.12!important}
#page-app .section:not(.active){display:none!important}
#page-app .section.active{display:flex!important;flex-direction:column;min-width:0}
#page-app #section-dashboard.active{display:grid!important}
#page-app .card,#page-app .kpi-card,#page-app [data-widget]>.card{background-color:#091525!important;background-image:linear-gradient(155deg,rgba(13,29,49,.985),rgba(7,15,27,.99))!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-kdt-bg="off"] #kdt-background-layer{opacity:0!important}
html[data-kdt-bg="network"] #kdt-background-layer .kdt-bg-network{opacity:.58!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-a,html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-b{opacity:.42!important}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-grid{opacity:.2!important}


/* KDT 4.7 — fond animé restauré : contraste visible, couche sous le contenu. */
#page-app .app-shell{isolation:isolate!important;background:transparent!important}
#page-app #kdt-background-layer{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:1!important;display:block!important;visibility:visible!important;pointer-events:none!important;overflow:hidden!important;opacity:1!important}
#page-app .app-shell>.sidebar{position:fixed!important;z-index:200!important}
#page-app .app-shell>.main{position:relative!important;z-index:2!important;background:transparent!important}
#page-app .main>.content,#page-app .section{background:transparent!important}
#kdt-background-layer .kdt-bg-network{display:block!important;opacity:.72!important}
#kdt-background-layer .kdt-bg-path{stroke-width:1.9!important;stroke-dasharray:12 16!important;opacity:.72!important;filter:drop-shadow(0 0 3px rgba(45,137,255,.48))!important;animation:kdtBgFlow 30s linear infinite!important}
#kdt-background-layer .kdt-bg-path.path-b{opacity:.54!important;animation-duration:39s!important}
#kdt-background-layer .kdt-bg-path.path-c{opacity:.40!important;animation-duration:48s!important}
#kdt-background-layer .kdt-bg-nodes{opacity:.48!important;animation:kdtBgPulse 5s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-glow-a{opacity:.32!important;animation:kdtBgFloatA 26s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-glow-b{opacity:.28!important;animation:kdtBgFloatB 31s ease-in-out infinite alternate!important}
#kdt-background-layer .kdt-bg-grid{opacity:.14!important;animation:kdtBgGrid 44s linear infinite!important}
#page-app .card,#page-app .kpi-card,#page-app [data-widget]>.card,#page-app .sticky-kpi,#page-app .kdt-widget{background-color:#091525!important;background-image:linear-gradient(155deg,rgba(13,29,49,.985),rgba(7,15,27,.99))!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-kdt-bg="off"] #kdt-background-layer{opacity:0!important}
html[data-kdt-bg="network"] #kdt-background-layer .kdt-bg-network{opacity:.72!important}
html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-a,html[data-kdt-bg="aurora"] #kdt-background-layer .kdt-bg-glow-b{opacity:.48!important}
html[data-kdt-bg="grid"] #kdt-background-layer .kdt-bg-grid{opacity:.26!important}


/* KDT 4.8 — correction ciblée du conflit de priorité CSS identifié.
   Le dashboard avait un display:grid!important avec deux IDs, qui
   empêchait les règles génériques .section:not(.active) de le masquer. */
#page-app #section-dashboard:not(.active){
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
#page-app #section-dashboard.active{
  display:grid!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
#page-app .section:not(.active){
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
#page-app .section.active{
  visibility:visible!important;
  pointer-events:auto!important;
}

/* Fond animé : mouvement perceptible mais discret, sous les panneaux. */
#page-app #kdt-background-layer{
  z-index:1!important;
  opacity:1!important;
}
#kdt-background-layer .kdt-bg-path{
  animation:kdtBgFlow 18s linear infinite!important;
  stroke-dasharray:18 14!important;
  opacity:.82!important;
}
#kdt-background-layer .kdt-bg-path.path-b{
  animation-duration:24s!important;
  opacity:.62!important;
}
#kdt-background-layer .kdt-bg-path.path-c{
  animation-duration:31s!important;
  opacity:.48!important;
}
#kdt-background-layer .kdt-bg-nodes{
  animation:kdtBgPulse 3.8s ease-in-out infinite alternate!important;
  opacity:.62!important;
}
#kdt-background-layer .kdt-bg-glow-a{
  animation:kdtBgFloatA 18s ease-in-out infinite alternate!important;
  opacity:.38!important;
}
#kdt-background-layer .kdt-bg-glow-b{
  animation:kdtBgFloatB 23s ease-in-out infinite alternate!important;
  opacity:.32!important;
}
#kdt-background-layer .kdt-bg-grid{
  animation:kdtBgGrid 34s linear infinite!important;
  opacity:.18!important;
}


/* KDT 4.9 — ambiance visuelle trading : halos lents, sans courbes décoratives envahissantes.
   Le réseau SVG et ses arcs sont masqués ; les widgets restent opaques. */
#page-app #kdt-background-layer{
  overflow:hidden!important;
  pointer-events:none!important;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(20,94,190,.10), transparent 42%),
    radial-gradient(ellipse at 84% 82%, rgba(0,135,150,.055), transparent 38%)!important;
}
#kdt-background-layer .kdt-bg-network{
  opacity:0!important;
  visibility:hidden!important;
}
#kdt-background-layer .kdt-bg-path,
#kdt-background-layer .kdt-bg-nodes{
  animation:none!important;
  opacity:0!important;
}
#kdt-background-layer .kdt-bg-glow{
  filter:blur(86px)!important;
  will-change:transform,opacity;
}
#kdt-background-layer .kdt-bg-glow-a{
  width:48vw!important;height:48vw!important;
  min-width:360px!important;min-height:360px!important;
  left:2%!important;top:-28%!important;
  background:radial-gradient(circle,rgba(24,105,230,.22) 0%,rgba(24,105,230,.075) 34%,transparent 70%)!important;
  animation:kdtBgFloatA 38s ease-in-out infinite alternate!important;
  opacity:.72!important;
}
#kdt-background-layer .kdt-bg-glow-b{
  width:42vw!important;height:42vw!important;
  min-width:320px!important;min-height:320px!important;
  right:-12%!important;bottom:-30%!important;
  background:radial-gradient(circle,rgba(0,150,170,.14) 0%,rgba(0,150,170,.045) 38%,transparent 72%)!important;
  animation:kdtBgFloatB 46s ease-in-out infinite alternate!important;
  opacity:.62!important;
}
#kdt-background-layer .kdt-bg-grid{
  opacity:.075!important;
  background-size:96px 96px!important;
  animation:none!important;
}
@media(prefers-reduced-motion:reduce){
  #kdt-background-layer .kdt-bg-glow-a,
  #kdt-background-layer .kdt-bg-glow-b{animation:none!important}
}

/* KDT Seasonal Experience — subtle ambient overlays, content remains untouched */
.kdt-seasonal-panel{margin:22px 0 8px;padding:18px;border:1px solid var(--border2);border-radius:14px;background:linear-gradient(145deg,rgba(12,28,48,.94),rgba(7,16,29,.97))}
.kdt-seasonal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.kdt-seasonal-heading strong{display:block;font-size:13px;color:var(--text)}
.kdt-seasonal-heading small,.kdt-seasonal-note{display:block;color:var(--text3);font-size:10.5px;line-height:1.6;margin-top:4px}
.kdt-seasonal-chip{font-size:10px;padding:6px 10px;border-radius:20px;background:rgba(39,123,225,.14);color:#8fc4ff;border:1px solid rgba(72,147,242,.22)}
.kdt-seasonal-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.kdt-seasonal-controls label{display:grid;gap:6px;color:var(--text2);font-size:11px}
.kdt-seasonal-toggle{display:flex;align-items:center;gap:9px;color:var(--text2);font-size:11px;margin-top:13px}
.kdt-seasonal-toggle input{accent-color:#398ce8}
.kdt-seasonal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.kdt-seasonal-note{margin-top:12px}
#kdt-background-layer:after{content:"";position:absolute;inset:-15%;pointer-events:none;opacity:.32;transition:background 1.2s ease,opacity 1.2s ease;background:radial-gradient(ellipse at 16% 20%,rgba(40,116,220,.12),transparent 45%)}
html[data-kdt-season="winter"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 12%,rgba(118,177,255,.18),transparent 42%),radial-gradient(ellipse at 84% 80%,rgba(90,164,235,.09),transparent 38%)}
html[data-kdt-season="spring"] #kdt-background-layer:after{background:radial-gradient(ellipse at 16% 18%,rgba(62,190,164,.14),transparent 44%),radial-gradient(ellipse at 85% 82%,rgba(88,158,208,.10),transparent 40%)}
html[data-kdt-season="summer"] #kdt-background-layer:after{background:radial-gradient(ellipse at 22% 14%,rgba(235,177,83,.14),transparent 44%),radial-gradient(ellipse at 86% 82%,rgba(0,170,177,.10),transparent 40%)}
html[data-kdt-season="autumn"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 15%,rgba(201,119,59,.15),transparent 44%),radial-gradient(ellipse at 84% 84%,rgba(169,103,52,.10),transparent 40%)}
html[data-kdt-season="christmas"] #kdt-background-layer:after{background:radial-gradient(ellipse at 15% 12%,rgba(201,161,77,.19),transparent 40%),radial-gradient(ellipse at 85% 82%,rgba(28,128,103,.13),transparent 42%)}
html[data-kdt-season="advent"],html[data-kdt-season="lent"],html[data-kdt-season="holyweek"]{--kdt-season-accent:#9b83c9}
html[data-kdt-season="advent"] #kdt-background-layer:after,html[data-kdt-season="lent"] #kdt-background-layer:after,html[data-kdt-season="holyweek"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 15%,rgba(133,103,181,.18),transparent 43%)}
html[data-kdt-season="epiphany"] #kdt-background-layer:after,html[data-kdt-season="ascension"] #kdt-background-layer:after{background:radial-gradient(ellipse at 50% 8%,rgba(216,176,83,.19),transparent 44%)}
html[data-kdt-season="easter"] #kdt-background-layer:after{background:radial-gradient(ellipse at 20% 12%,rgba(224,220,195,.16),transparent 43%),radial-gradient(ellipse at 84% 82%,rgba(208,174,93,.10),transparent 40%)}
html[data-kdt-season="pentecost"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 12%,rgba(180,65,68,.17),transparent 43%),radial-gradient(ellipse at 84% 82%,rgba(205,157,72,.10),transparent 40%)}
html[data-kdt-season="assumption"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 12%,rgba(180,196,218,.16),transparent 43%)}
html[data-kdt-season="allsaints"] #kdt-background-layer:after{background:radial-gradient(ellipse at 18% 12%,rgba(138,130,158,.15),transparent 43%)}
html[data-kdt-season="default"] #kdt-background-layer:after{opacity:0}
html[data-kdt-season-intensity="soft"] #kdt-background-layer:after{opacity:.16}
html[data-kdt-season-intensity="balanced"] #kdt-background-layer:after{opacity:.34}
html[data-kdt-season-intensity="rich"] #kdt-background-layer:after{opacity:.55}
html[data-kdt-season-motion="off"] #kdt-background-layer:after{transition:none}
@media(max-width:700px){.kdt-seasonal-controls{grid-template-columns:1fr}.kdt-seasonal-panel{padding:14px}}
@media(prefers-reduced-motion:reduce){#kdt-background-layer:after{transition:none!important}}

/* KDT 5.1 — canvas décor réel, visible uniquement dans le fond */
#page-app #kdt-background-layer{position:fixed!important;inset:0!important;z-index:1!important;display:block!important;pointer-events:none!important}
#kdt-seasonal-canvas{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important;z-index:5!important;pointer-events:none!important;opacity:.88!important}
#kdt-background-layer:after{z-index:1!important}
#kdt-background-layer .kdt-bg-glow{z-index:0!important}
#kdt-background-layer #kdt-bg-custom-image{z-index:0!important}
#kdt-seasonal-panel .kdt-seasonal-actions button{cursor:pointer}

/* KDT 5.2 — centre festif et compteurs */
.kdt-festive-hub{display:grid;grid-template-columns:1fr;gap:10px;margin:0 0 16px;min-width:0}
.kdt-festive-feature{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 190px auto;align-items:center;gap:16px;min-height:142px;padding:18px 22px;overflow:hidden;border:1px solid rgba(118,161,225,.24);border-radius:16px;background:radial-gradient(ellipse at 83% 50%,rgba(80,125,205,.18),transparent 38%),linear-gradient(115deg,rgba(13,30,53,.97),rgba(9,20,37,.96));box-shadow:inset 0 1px rgba(255,255,255,.035),0 12px 30px rgba(0,0,0,.12)}
.kdt-festive-feature:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.035),transparent 70%);opacity:.8}
.kdt-festive-feature-copy{position:relative;z-index:1;min-width:0}.kdt-festive-eyebrow{font:700 9px var(--mono);letter-spacing:1.7px;color:#91baff;margin-bottom:8px}.kdt-festive-spark{color:#f4d58a;margin-right:5px}.kdt-festive-feature-title{font:700 clamp(19px,2.2vw,27px) var(--display);color:#f4f7ff;line-height:1.2}.kdt-festive-feature-desc{font-size:12px;color:#b6c5d9;margin-top:7px;max-width:540px;line-height:1.5}.kdt-festive-feature-date{font-size:10px;color:#8ea5c3;margin-top:9px}.kdt-festive-art{position:relative;z-index:1;display:flex;justify-content:center;align-items:center;height:112px}.kdt-festive-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,0,0,.2))}.kdt-festive-feature-count{position:relative;z-index:1;white-space:nowrap;padding:9px 12px;border:1px solid rgba(255,215,139,.24);border-radius:10px;background:rgba(255,207,112,.08);color:#f5d99a;font-size:11px;font-weight:700}
.kdt-festive-feature[data-feast="christmas"]{border-color:rgba(75,174,133,.32);background:radial-gradient(ellipse at 83% 50%,rgba(42,157,111,.2),transparent 38%),linear-gradient(115deg,rgba(10,43,42,.98),rgba(9,20,37,.96))}.kdt-festive-feature[data-feast="easter"]{border-color:rgba(229,190,126,.34);background:radial-gradient(ellipse at 83% 50%,rgba(234,190,121,.18),transparent 38%),linear-gradient(115deg,rgba(48,39,42,.97),rgba(16,25,40,.96))}.kdt-festive-feature[data-feast="pentecost"]{border-color:rgba(220,103,82,.35);background:radial-gradient(ellipse at 83% 50%,rgba(207,81,67,.19),transparent 38%),linear-gradient(115deg,rgba(53,28,35,.97),rgba(16,25,40,.96))}.kdt-festive-feature[data-feast="advent"],.kdt-festive-feature[data-feast="lent"],.kdt-festive-feature[data-feast="holyweek"]{border-color:rgba(169,140,213,.34);background:radial-gradient(ellipse at 83% 50%,rgba(145,108,190,.18),transparent 38%),linear-gradient(115deg,rgba(35,29,53,.97),rgba(16,25,40,.96))}
.kdt-festive-countdowns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kdt-countdown-card{display:flex;align-items:center;gap:12px;min-width:0;min-height:92px;padding:11px 15px;border:1px solid var(--border2);border-radius:13px;background:linear-gradient(125deg,rgba(17,34,55,.92),rgba(10,21,36,.94));overflow:hidden}.kdt-countdown-art{width:86px;height:66px;flex:0 0 86px}.kdt-countdown-art img{width:100%;height:100%;object-fit:contain}.kdt-countdown-info{min-width:0}.kdt-countdown-label{font:700 9px var(--mono);letter-spacing:1px;color:var(--text2)}.kdt-countdown-number{font:700 clamp(15px,1.7vw,21px) var(--display);color:#f5d99a;margin-top:5px;font-variant-numeric:tabular-nums;white-space:nowrap}.kdt-countdown-sub{font-size:10px;color:var(--text3);margin-top:4px}.kdt-countdown-newyear .kdt-countdown-number{color:#a9caff}.kdt-festive-upcoming{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.kdt-feast-pill{display:flex;align-items:center;gap:7px;min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:rgba(12,25,42,.72)}.kdt-feast-pill.is-next{border-color:rgba(120,166,235,.4);background:rgba(48,100,168,.12)}.kdt-feast-emoji{font-size:17px;flex:0 0 auto}.kdt-feast-name{font-size:10px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.kdt-feast-date{font:10px var(--mono);color:var(--text3);white-space:nowrap}
@media(max-width:760px){.kdt-festive-feature{grid-template-columns:minmax(0,1fr) 105px;gap:5px;padding:15px}.kdt-festive-art{height:88px}.kdt-festive-feature-count{grid-column:1/-1;justify-self:start}.kdt-festive-countdowns{grid-template-columns:1fr}.kdt-countdown-art{width:70px;flex-basis:70px}.kdt-festive-upcoming{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:390px){.kdt-festive-feature{grid-template-columns:minmax(0,1fr) 78px}.kdt-festive-feature-title{font-size:18px}.kdt-countdown-number{font-size:14px}.kdt-feast-pill{padding:8px 7px}.kdt-feast-date{font-size:9px}}
@media(prefers-reduced-motion:no-preference){.kdt-festive-spark{animation:kdtFestivePulse 2.8s ease-in-out infinite}@keyframes kdtFestivePulse{50%{opacity:.45;transform:scale(.86)}}}

/* KDT 5.2.1 — contraste permanent des widgets festifs, quel que soit le fond choisi */
#page-app #kdt-festive-hub{
  position:relative!important;z-index:8!important;isolation:isolate!important;
  color:#f4f7ff!important;text-shadow:none!important;
}
#page-app #kdt-festive-hub .kdt-festive-feature,
#page-app #kdt-festive-hub .kdt-countdown-card,
#page-app #kdt-festive-hub .kdt-feast-pill{
  background-color:#0b1729!important;
  background-image:linear-gradient(125deg,rgba(15,35,59,.985),rgba(7,17,31,.985))!important;
  border:1px solid rgba(142,183,239,.58)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.09)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="christmas"]{background-image:linear-gradient(115deg,#103c35,#091b2d)!important;border-color:#57bd91!important}
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="easter"]{background-image:linear-gradient(115deg,#493b32,#15253b)!important;border-color:#e4c17c!important}
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="pentecost"]{background-image:linear-gradient(115deg,#512b32,#17243a)!important;border-color:#e18b76!important}
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="advent"],
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="lent"],
#page-app #kdt-festive-hub .kdt-festive-feature[data-feast="holyweek"]{background-image:linear-gradient(115deg,#382d52,#14233a)!important;border-color:#b5a0e2!important}
#page-app #kdt-festive-hub .kdt-festive-eyebrow{color:#a9ceff!important}
#page-app #kdt-festive-hub .kdt-festive-feature-title{color:#fff!important;text-shadow:0 2px 12px rgba(0,0,0,.5)!important}
#page-app #kdt-festive-hub .kdt-festive-feature-desc{color:#e0e9f7!important}
#page-app #kdt-festive-hub .kdt-festive-feature-date{color:#c1d2e9!important}
#page-app #kdt-festive-hub .kdt-festive-feature-count{background:#3b301d!important;border-color:#c9a65c!important;color:#ffe5a6!important;box-shadow:0 2px 12px rgba(0,0,0,.28)!important}
#page-app #kdt-festive-hub .kdt-countdown-label{color:#e6efff!important}
#page-app #kdt-festive-hub .kdt-countdown-number{color:#ffe09a!important;text-shadow:0 1px 10px rgba(255,208,112,.2)!important}
#page-app #kdt-festive-hub .kdt-countdown-newyear .kdt-countdown-number{color:#bcd9ff!important;text-shadow:0 1px 10px rgba(120,175,255,.22)!important}
#page-app #kdt-festive-hub .kdt-countdown-sub{color:#c2d0e2!important}
#page-app #kdt-festive-hub .kdt-feast-pill.is-next{background-image:linear-gradient(120deg,#173b62,#102743)!important;border-color:#8abaff!important;box-shadow:0 0 0 1px rgba(138,186,255,.18),0 5px 16px rgba(0,0,0,.3)!important}
#page-app #kdt-festive-hub .kdt-feast-name{color:#f0f5ff!important}
#page-app #kdt-festive-hub .kdt-feast-date{color:#c6d9f4!important}
#page-app #kdt-festive-hub .kdt-countdown-art img,
#page-app #kdt-festive-hub .kdt-festive-art img{filter:drop-shadow(0 3px 12px rgba(0,0,0,.55))!important}


/* KDT 5.2.2 — bandeau des fêtes toujours visible en haut du dashboard */
#page-app #kdt-festive-hub{
  position:sticky!important;
  top:calc(var(--topbar-h,76px) + var(--spacebar-h,48px) + 82px + env(safe-area-inset-top,0px))!important;
  z-index:90!important;
  isolation:isolate;
  padding:9px!important;
  margin:0 0 14px!important;
  border:1px solid rgba(103,164,235,.48)!important;
  border-radius:16px!important;
  background:rgba(5,13,25,.97)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.42),0 0 0 1px rgba(115,170,235,.10)!important;
  backdrop-filter:blur(18px);
}
#page-app #kdt-festive-hub .kdt-festive-feature{margin:0!important}
#page-app #kdt-festive-hub .kdt-festive-countdowns{display:block!important}
#page-app #kdt-festive-hub .kdt-countdown-window-label{font:700 9px var(--mono);letter-spacing:1px;color:#b9d5ff;padding:4px 2px 7px}
#page-app #kdt-festive-hub .kdt-countdown-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
#page-app #kdt-festive-hub .kdt-countdown-card{min-height:76px;padding:7px 10px;background:linear-gradient(125deg,rgba(19,43,70,.98),rgba(8,22,39,.99))!important;border-color:rgba(124,177,239,.45)!important}
#page-app #kdt-festive-hub .kdt-countdown-art{width:62px;height:56px;flex-basis:62px}
#page-app #kdt-festive-hub .kdt-countdown-label{font-size:9px;color:#f0f5ff!important}
#page-app #kdt-festive-hub .kdt-countdown-number{font-size:clamp(14px,1.4vw,19px);color:#ffe3a2!important}
#page-app #kdt-festive-hub .kdt-countdown-sub{font-size:9px;color:#c9d9ee!important}
#page-app #kdt-festive-hub .kdt-festive-upcoming{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:780px){
 #page-app #kdt-festive-hub{top:calc(64px + var(--spacebar-h,46px) + 78px + env(safe-area-inset-top,0px))!important;padding:7px!important;gap:7px!important}
 #page-app #kdt-festive-hub .kdt-festive-upcoming{grid-template-columns:repeat(2,minmax(0,1fr))}
 #page-app #kdt-festive-hub .kdt-countdown-list{grid-template-columns:1fr}
}
@media(max-width:420px){#page-app #kdt-festive-hub .kdt-festive-feature{grid-template-columns:minmax(0,1fr) 70px!important}#page-app #kdt-festive-hub .kdt-festive-art{height:64px!important}}


/* KDT 5.2.3 — bandeau des fêtes global, sticky et compact */
#kdt-festive-hub{
  position:sticky!important;
  top:196px!important;
  z-index:42!important;
  width:100%!important;
  max-width:none!important;
  margin:10px 0 14px!important;
  padding:8px!important;
  border:1px solid rgba(95,157,235,.34)!important;
  border-radius:17px!important;
  background:rgba(5,13,25,.96)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.38),0 0 0 1px rgba(90,150,230,.06)!important;
  backdrop-filter:blur(18px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(135%)!important;
}
#kdt-festive-hub .kdt-festive-feature{
  min-height:104px!important;
  grid-template-columns:minmax(0,1fr) 130px auto!important;
  gap:12px!important;
  padding:13px 18px!important;
  border-radius:12px!important;
}
#kdt-festive-hub .kdt-festive-feature-title{font-size:clamp(18px,1.55vw,25px)!important;line-height:1.15!important}
#kdt-festive-hub .kdt-festive-feature-desc{font-size:11px!important;line-height:1.35!important}
#kdt-festive-hub .kdt-festive-feature-date{font-size:10px!important;margin-top:6px!important}
#kdt-festive-hub .kdt-festive-art{width:116px!important;height:82px!important}
#kdt-festive-hub .kdt-festive-art img{max-width:100%!important;max-height:100%!important}
#kdt-festive-hub .kdt-festive-countdowns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
#kdt-festive-hub .kdt-countdown-card{min-height:66px!important;padding:8px 12px!important;border-radius:10px!important}
#kdt-festive-hub .kdt-countdown-art{width:38px!important;height:38px!important;flex:0 0 38px!important}
#kdt-festive-hub .kdt-countdown-number{font-size:clamp(13px,1.1vw,17px)!important;line-height:1.2!important}
#kdt-festive-hub .kdt-festive-upcoming{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
#kdt-festive-hub .kdt-festive-upcoming>*{min-width:0!important}
@media(max-width:1100px){
 #kdt-festive-hub{top:166px!important}
 #kdt-festive-hub .kdt-festive-feature{grid-template-columns:minmax(0,1fr) 90px auto!important}
 #kdt-festive-hub .kdt-festive-art{width:82px!important}
}
@media(max-width:700px){
 #kdt-festive-hub{top:112px!important;margin:7px 0 10px!important;padding:6px!important}
 #kdt-festive-hub .kdt-festive-feature{grid-template-columns:minmax(0,1fr) auto!important;min-height:88px!important;padding:11px!important}
 #kdt-festive-hub .kdt-festive-art{display:none!important}
 #kdt-festive-hub .kdt-festive-countdowns{grid-template-columns:1fr!important}
 #kdt-festive-hub .kdt-festive-upcoming{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-height:760px) and (min-width:701px){
 #kdt-festive-hub{top:164px!important}
 #kdt-festive-hub .kdt-festive-feature{min-height:88px!important;padding:9px 14px!important}
 #kdt-festive-hub .kdt-countdown-card{min-height:56px!important}
}


/* KDT 5.2.4 — calendrier festif déplacé dans la barre d'en-tête, à côté de l'horloge */
#page-app #kdt-festive-hub{display:none!important}
#page-app .topbar{position:sticky!important;top:0!important;z-index:120!important}
#page-app .topbar-right{min-width:0!important;gap:8px!important}
#page-app .kdt-festive-topbar{
  display:flex!important;align-items:center!important;gap:7px!important;
  width:clamp(154px,17vw,228px)!important;min-width:154px!important;max-width:228px!important;
  height:34px!important;box-sizing:border-box!important;padding:4px 9px!important;
  overflow:hidden!important;white-space:nowrap!important;
  border:1px solid rgba(112,169,239,.55)!important;border-radius:8px!important;
  background:linear-gradient(110deg,#102744,#0a1729)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 8px rgba(0,0,0,.22)!important;
  color:#f4f7ff!important;flex:0 1 auto!important;cursor:default!important;
}
#page-app .kdt-festive-topbar .kdt-ft-emoji{font-size:17px!important;line-height:1!important;flex:0 0 auto!important}
#page-app .kdt-festive-topbar .kdt-ft-copy{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:1px!important;min-width:0!important;overflow:hidden!important;line-height:1.15!important}
#page-app .kdt-festive-topbar strong{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:10px!important;font-weight:750!important;color:#fff!important}
#page-app .kdt-festive-topbar small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;font:9px var(--mono)!important;color:#c5dcfa!important}
#page-app .kdt-festive-topbar[data-feast="christmas"]{border-color:#57bd91!important;background:linear-gradient(110deg,#103c35,#091b2d)!important}
#page-app .kdt-festive-topbar[data-feast="easter"]{border-color:#e4c17c!important;background:linear-gradient(110deg,#493b32,#15253b)!important}
#page-app .kdt-festive-topbar[data-feast="pentecost"]{border-color:#e18b76!important;background:linear-gradient(110deg,#512b32,#17243a)!important}
#page-app .kdt-festive-topbar[data-feast="advent"],#page-app .kdt-festive-topbar[data-feast="lent"],#page-app .kdt-festive-topbar[data-feast="holyweek"]{border-color:#b5a0e2!important;background:linear-gradient(110deg,#382d52,#14233a)!important}
@media(max-width:1050px){#page-app .kdt-festive-topbar{width:160px!important;min-width:132px!important}#page-app .kdt-festive-topbar small{font-size:8px!important}}
@media(max-width:760px){#page-app .kdt-festive-topbar{width:132px!important;min-width:112px!important;height:31px!important;padding:3px 6px!important}#page-app .kdt-festive-topbar .kdt-ft-emoji{font-size:15px!important}#page-app .kdt-festive-topbar strong{font-size:9px!important}#page-app .kdt-festive-topbar small{font-size:7.5px!important}}
@media(max-width:520px){#page-app .kdt-festive-topbar{width:112px!important;min-width:92px!important}#page-app .kdt-festive-topbar small{display:none!important}}


/* KDT 5.2.5 — bandeau festif pleine largeur dans l'espace libre sous la navigation */
#page-app #kdt-festive-hub{
  display:grid!important; position:relative!important; top:auto!important;
  width:100%!important; max-width:none!important; box-sizing:border-box!important;
  grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)!important;
  grid-template-areas:"feature countdown" "upcoming upcoming";
  align-items:stretch!important; gap:7px!important;
  margin:0 0 9px!important; padding:7px 9px!important;
  min-height:0!important; border:1px solid rgba(103,164,235,.52)!important;
  border-radius:12px!important; background:linear-gradient(110deg,rgba(7,18,34,.98),rgba(10,27,48,.98))!important;
  box-shadow:0 5px 18px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.045)!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
}
#page-app #kdt-festive-hub .kdt-festive-feature{
  grid-area:feature!important; display:grid!important;
  grid-template-columns:minmax(0,1fr) 74px auto!important; align-items:center!important;
  min-height:66px!important; padding:7px 12px!important; gap:8px!important;
  border-radius:9px!important;
}
#page-app #kdt-festive-hub .kdt-festive-eyebrow{font-size:8px!important;margin-bottom:2px!important}
#page-app #kdt-festive-hub .kdt-festive-feature-title{font-size:clamp(15px,1.15vw,20px)!important;line-height:1.1!important}
#page-app #kdt-festive-hub .kdt-festive-feature-desc{font-size:9px!important;line-height:1.2!important;margin-top:2px!important}
#page-app #kdt-festive-hub .kdt-festive-feature-date{font-size:8px!important;margin-top:3px!important}
#page-app #kdt-festive-hub .kdt-festive-art{width:68px!important;height:56px!important}
#page-app #kdt-festive-hub .kdt-festive-feature-count{font-size:9px!important;padding:6px 8px!important;white-space:nowrap!important}
#page-app #kdt-festive-hub .kdt-festive-countdowns{grid-area:countdown!important;display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;gap:3px!important}
#page-app #kdt-festive-hub .kdt-countdown-window-label{font-size:8px!important;padding:0 2px 2px!important}
#page-app #kdt-festive-hub .kdt-countdown-list{display:flex!important;flex-wrap:nowrap!important;min-width:0!important;gap:5px!important}
#page-app #kdt-festive-hub .kdt-countdown-card{display:flex!important;align-items:center!important;min-height:0!important;width:100%!important;padding:5px 8px!important;gap:7px!important;border-radius:8px!important}
#page-app #kdt-festive-hub .kdt-countdown-art{width:30px!important;height:30px!important;flex:0 0 30px!important}
#page-app #kdt-festive-hub .kdt-countdown-label{font-size:8px!important;line-height:1.1!important}
#page-app #kdt-festive-hub .kdt-countdown-number{font-size:clamp(12px,1vw,16px)!important;line-height:1.1!important}
#page-app #kdt-festive-hub .kdt-countdown-sub{font-size:7px!important;line-height:1.1!important}
#page-app #kdt-festive-hub .kdt-festive-upcoming{grid-area:upcoming!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
#page-app #kdt-festive-hub .kdt-feast-pill{min-height:22px!important;padding:3px 7px!important;border-radius:7px!important;gap:5px!important}
#page-app #kdt-festive-hub .kdt-feast-emoji{font-size:11px!important}
#page-app #kdt-festive-hub .kdt-feast-name,#page-app #kdt-festive-hub .kdt-feast-date{font-size:8px!important}
@media(max-width:900px){
 #page-app #kdt-festive-hub{grid-template-columns:1fr!important;grid-template-areas:"feature" "countdown" "upcoming"!important}
 #page-app #kdt-festive-hub .kdt-festive-upcoming{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
 #page-app #kdt-festive-hub .kdt-festive-feature{grid-template-columns:minmax(0,1fr) auto!important;min-height:58px!important}
 #page-app #kdt-festive-hub .kdt-festive-art{display:none!important}
 #page-app #kdt-festive-hub .kdt-festive-upcoming{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* KDT 5.2.6 — correction demandée : compteur élargi dans la barre d'heure, aucun bloc festif dans le dashboard */
#page-app #kdt-festive-hub{display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important}
#page-app .kdt-festive-topbar{
  display:flex!important;flex:0 1 340px!important;width:clamp(240px,25vw,360px)!important;
  min-width:220px!important;max-width:360px!important;height:34px!important;
  padding:4px 11px!important;gap:9px!important;
}
#page-app .kdt-festive-topbar .kdt-ft-copy{flex:1 1 auto!important}
#page-app .kdt-festive-topbar strong{font-size:10px!important}
#page-app .kdt-festive-topbar small{font-size:9px!important}
#page-app .topbar-right{flex-wrap:nowrap!important}
@media(max-width:1100px){#page-app .kdt-festive-topbar{flex-basis:250px!important;width:250px!important;min-width:190px!important}}
@media(max-width:760px){#page-app .kdt-festive-topbar{flex-basis:170px!important;width:170px!important;min-width:145px!important;height:31px!important}}
@media(max-width:520px){#page-app .kdt-festive-topbar{flex-basis:118px!important;width:118px!important;min-width:108px!important}#page-app .kdt-festive-topbar small{display:block!important;font-size:7px!important}}

/* KDT 5.2.7 — réduction réelle du vide sous la navigation, priorité mobile */
#page-app #kdt-festive-hub{
  display:none!important;
  position:absolute!important;
  width:0!important;height:0!important;min-height:0!important;
  margin:0!important;padding:0!important;border:0!important;
  overflow:hidden!important;visibility:hidden!important;pointer-events:none!important;
}
#page-app .content{
  padding-top:calc(var(--topbar-h) + var(--spacebar-h) + 8px + var(--safe-top, 0px))!important;
}
@media(max-width:780px){
  #page-app .content{
    padding-top:calc(var(--topbar-h) + var(--spacebar-h) + 4px + var(--safe-top, 0px))!important;
  }
  #page-app #kdt-sticky-kpi{margin-top:0!important;margin-bottom:10px!important}
}
@media(max-width:480px){
  #page-app .content{
    padding-top:calc(var(--topbar-h) + var(--spacebar-h) + 2px + var(--safe-top, 0px))!important;
  }
  #page-app #kdt-sticky-kpi{padding:7px 8px!important;gap:5px 0!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-tile{padding:2px 7px!important}
}

/* KDT 5.2.8 — espace haut resserré + bandeau Capital géré épinglé */
#page-app .content{
  padding-top:calc(var(--topbar-h) + var(--spacebar-h) - 14px + var(--safe-top, 0px))!important;
}
#page-app #kdt-sticky-kpi{
  position:sticky!important;
  top:calc(var(--topbar-h) + var(--spacebar-h) + var(--safe-top, 0px))!important;
  z-index:118!important;
  margin-top:0!important;
  background:linear-gradient(180deg,rgba(13,29,49,.985),rgba(7,19,34,.985))!important;
  box-shadow:0 8px 22px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(12px)!important;
  -webkit-backdrop-filter:blur(12px)!important;
}
@media(max-width:780px){
  #page-app .content{
    padding-top:calc(var(--topbar-h) + var(--spacebar-h) - 18px + var(--safe-top, 0px))!important;
  }
  #page-app #kdt-sticky-kpi{
    position:sticky!important;
    top:calc(var(--topbar-h) + var(--spacebar-h) + var(--safe-top, 0px))!important;
    padding:7px 9px!important;
    margin-bottom:8px!important;
  }
}
@media(max-width:480px){
  #page-app .content{
    padding-top:calc(var(--topbar-h) + var(--spacebar-h) - 22px + var(--safe-top, 0px))!important;
  }
  #page-app #kdt-sticky-kpi{
    position:sticky!important;
    top:calc(var(--topbar-h) + var(--spacebar-h) + var(--safe-top, 0px))!important;
    padding:6px 7px!important;
    gap:4px 0!important;
    border-radius:9px!important;
  }
  #page-app #kdt-sticky-kpi .sticky-kpi-tile{padding:2px 6px!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-val{font-size:13px!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-lbl{font-size:8px!important}
}

/* KDT 5.2.9 — le bandeau Capital géré remplace la barre d'espaces en sticky.
   La navigation Vue d'ensemble/Journal reste dans le flux et défile avec la page. */
#page-app .glisse-zone{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  width:100%!important;height:var(--spacebar-h,48px)!important;
  margin-top:var(--topbar-h,76px)!important;z-index:20!important;
  flex:0 0 var(--spacebar-h,48px)!important;
}
#page-app .glisse-zone .spacebar{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;
  height:100%!important;min-height:0!important;
}
#page-app .content{
  padding-top:0!important;
}
#page-app #kdt-sticky-kpi{
  position:sticky!important;
  top:calc(var(--topbar-h,76px) + env(safe-area-inset-top,0px))!important;
  z-index:130!important;
  margin-top:0!important;
  margin-bottom:12px!important;
  isolation:isolate!important;
  background:linear-gradient(180deg,rgba(13,29,49,.99),rgba(7,19,34,.99))!important;
  border:1px solid rgba(72,160,255,.34)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.34)!important;
}
@media(max-width:780px){
  #page-app .glisse-zone{margin-top:var(--topbar-h,58px)!important;height:var(--spacebar-h,46px)!important;flex-basis:var(--spacebar-h,46px)!important}
  #page-app .content{padding-top:0!important}
  #page-app #kdt-sticky-kpi{position:sticky!important;top:calc(var(--topbar-h,58px) + env(safe-area-inset-top,0px))!important;padding:7px 9px!important;margin-bottom:9px!important}
}
@media(max-width:480px){
  #page-app #kdt-sticky-kpi{position:sticky!important;top:calc(var(--topbar-h,58px) + env(safe-area-inset-top,0px))!important;padding:6px 7px!important;gap:4px 0!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-tile{padding:2px 6px!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-val{font-size:13px!important}
  #page-app #kdt-sticky-kpi .sticky-kpi-lbl{font-size:8px!important}
}


/* KDT 5.2.10 — suppression du vide résiduel entre navigation et contenu.
   La barre d'espaces suit directement la topbar ; aucune marge haute doublée. */
#page-app .glisse-zone{
  margin-top:0!important;
  height:var(--spacebar-h,48px)!important;
  flex-basis:var(--spacebar-h,48px)!important;
}
#page-app .content{
  margin-top:0!important;
  padding-top:0!important;
}
#page-app #kdt-sticky-kpi{margin-top:0!important}
@media(max-width:780px){
  #page-app .glisse-zone{margin-top:0!important;height:var(--spacebar-h,46px)!important;flex-basis:var(--spacebar-h,46px)!important}
  #page-app .content{margin-top:0!important;padding-top:0!important}
}


/* KDT 5.2.11 — stabilité emoji, opacité légère et compteurs alignés sur le fuseau choisi */
#page-app .kdt-festive-topbar{background:linear-gradient(110deg,rgba(16,39,68,.88),rgba(10,23,41,.88))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 2px 7px rgba(0,0,0,.16)!important}
#page-app .kdt-festive-topbar[data-feast="christmas"]{background:linear-gradient(110deg,rgba(16,60,53,.88),rgba(9,27,45,.88))!important}
#page-app .kdt-festive-topbar[data-feast="easter"]{background:linear-gradient(110deg,rgba(73,59,50,.88),rgba(21,37,59,.88))!important}
#page-app .kdt-festive-topbar[data-feast="pentecost"]{background:linear-gradient(110deg,rgba(81,43,50,.88),rgba(23,36,58,.88))!important}
#page-app .kdt-festive-topbar[data-feast="advent"],#page-app .kdt-festive-topbar[data-feast="lent"],#page-app .kdt-festive-topbar[data-feast="holyweek"]{background:linear-gradient(110deg,rgba(56,45,82,.88),rgba(20,35,58,.88))!important}
#page-app #kdt-festive-hub{background:linear-gradient(110deg,rgba(7,18,34,.90),rgba(10,27,48,.90))!important;box-shadow:0 5px 16px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.035)!important}
#page-app #kdt-festive-hub .kdt-festive-feature,#page-app #kdt-festive-hub .kdt-countdown-card,#page-app #kdt-festive-hub .kdt-feast-pill{background-color:rgba(12,27,47,.82)!important}

/* KDT 5.2.12 — emojis stables et widgets festifs plus transparents.
   On réduit uniquement l'opacité des fonds : le texte et les icônes restent nets. */
#page-app .kdt-festive-topbar,
#page-app .kdt-festive-topbar[data-feast="christmas"],
#page-app .kdt-festive-topbar[data-feast="easter"],
#page-app .kdt-festive-topbar[data-feast="pentecost"],
#page-app .kdt-festive-topbar[data-feast="advent"],
#page-app .kdt-festive-topbar[data-feast="lent"],
#page-app .kdt-festive-topbar[data-feast="holyweek"]{
  background:linear-gradient(110deg,rgba(16,39,68,.66),rgba(10,23,41,.66))!important;
}
#page-app #kdt-festive-hub{
  background:linear-gradient(110deg,rgba(7,18,34,.72),rgba(10,27,48,.72))!important;
}
#page-app #kdt-festive-hub .kdt-festive-feature,
#page-app #kdt-festive-hub .kdt-countdown-card,
#page-app #kdt-festive-hub .kdt-feast-pill{
  background-color:rgba(12,27,47,.58)!important;
}
