/* ==========================================================================
   Chronos — sidebar modulaire (widgets). Tout est limité à `.sw` (l'aside).
   ========================================================================== */

.sidebar.sw {
    --sw-line: rgba(255, 255, 255, 0.09);
    --sw-mut: #9aa1ad;
    --sw-faint: #6b7280;
    --sw-tx: #e6e9ef;
    --sw-ac: #7aa7ff;
    --sw-ok: #34d399;
    --sw-warn: #fbbf24;
    --sw-err: #f87171;
    --sw-card: rgba(255, 255, 255, 0.045);
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    flex: none;
    min-height: 0;
    padding: 12px;
    gap: 10px;
    overflow: visible;
    font-size: 14px;
}
/* fond réglable (voir « Style des sidebars » en mode édition) ; par défaut : celui de la maquette */
aside.sidebar.sw {
    background-color: rgba(var(--sw-tint-rgb, 20, 18, 20), var(--sw-bg-a, 0.7));
    -webkit-backdrop-filter: blur(var(--sw-blur, 12px));
    backdrop-filter: blur(var(--sw-blur, 12px));
}
.sw button { font-family: inherit; }
.sw [hidden] { display: none !important; }
.sw * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.sw .sw-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 2px; container-type: inline-size; scrollbar-width: none; }
.sw .sw-scroll::-webkit-scrollbar { display: none; }
.sw .sw-zones { display: flex; flex-direction: column; min-height: 100%; gap: 10px; }
.sw .sw-fill { flex: 1; min-height: 6px; }

/* ---------- zones et grille ---------------------------------------------- */

.sw .sw-zone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-content: start; min-height: 0; }
.sw .sw-zone > * { min-width: 0; grid-column: span 2; }
.sw .sw-zone > .half { grid-column: span 1; }
@container (max-width: 262px) { .sw .sw-zone > .half { grid-column: span 2; } }
.sw .sw-zl { display: none; align-items: center; gap: 6px; margin: 0 0 -2px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sw-faint); }
.sw.edit .sw-zl { display: flex; }
.sw.edit .sw-zone { min-height: 74px; padding: 8px; border: 2px dashed rgba(122, 167, 255, 0.28); border-radius: 14px; }
.sw.edit .sw-zone:empty::before { content: "Déposez un widget ici"; grid-column: span 2; display: grid; place-items: center; min-height: 56px; font-size: 12.5px; color: var(--sw-faint); }

/* ---------- widget (carte) ------------------------------------------------- */

.sw .w { position: relative; background: rgba(var(--sw-card-rgb, 255, 255, 255), var(--sw-card-a, 0.05)); -webkit-backdrop-filter: blur(var(--sw-card-blur, 0px)); backdrop-filter: blur(var(--sw-card-blur, 0px)); border: 1px solid var(--sw-line); border-radius: 14px; transition: border-color 0.12s; }
.sw .w:hover { border-color: rgba(255, 255, 255, 0.15); }
.sw .w.dragging, .sw .cw.dragging { opacity: 0.35; }
.sw .w > .wb { padding: 12px; }
.sw .twt { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sw-mut); }
.sw .twt i { font-size: 14px; color: var(--sw-ac); }
.sw .fbadge { margin-left: auto; padding: 0 6px; font-size: 9.5px; line-height: 15px; letter-spacing: 0.04em; color: #0b1220; background: var(--sw-warn); border-radius: 99px; }
.sw:not(.edit) .w.bare, .sw:not(.edit) .cw.bare { background: none; border-color: transparent; box-shadow: none; }

.sw .ib { display: grid; place-items: center; width: 24px; height: 24px; font-size: 15px; color: var(--sw-faint); background: none; border: 0; border-radius: 7px; cursor: pointer; }
.sw .ib:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.sw .ib:disabled { opacity: 0.25; cursor: default; }
.sw .ib.sz { width: auto; min-width: 24px; padding: 0 6px; font-size: 12px; font-weight: 800; color: var(--sw-tx); }
.sw .grip { display: grid; place-items: center; width: 22px; height: 22px; color: var(--sw-faint); cursor: grab; border-radius: 6px; }
.sw .grip:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.sw .grip:active { cursor: grabbing; }

/* contrôles du mode édition */
.sw .tc { position: absolute; top: 6px; right: 6px; z-index: 5; display: none; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: calc(100% - 12px); padding: 2px; background: rgba(15, 16, 20, 0.92); border: 1px solid var(--sw-line); border-radius: 9px; }
.sw.edit .tc { display: flex; }
.sw .tc .ib { width: 22px; height: 22px; font-size: 13px; }
.sw .tc .ib.sz { width: auto; }
.sw .tc .ib.on { color: #0b1220; background: var(--sw-ac); }
.sw.edit .w { border-style: dashed; border-color: rgba(122, 167, 255, 0.4); animation: swWiggle 0.35s ease-in-out infinite alternate; }
.sw.edit .w.dragging { animation: none; }
.sw.edit .w > .wb { padding-top: 38px; }
.sw.edit .w.half > .wb { padding-top: 62px; }
@keyframes swWiggle { from { transform: rotate(-0.25deg); } to { transform: rotate(0.25deg); } }

/* ---------- résumé dépliable ----------------------------------------------- */

.sw .cw { overflow: hidden; background: rgba(var(--sw-card-rgb, 255, 255, 255), var(--sw-card-a, 0.05)); -webkit-backdrop-filter: blur(var(--sw-card-blur, 0px)); backdrop-filter: blur(var(--sw-card-blur, 0px)); border: 1px solid var(--sw-line); border-radius: 13px; }
.sw .cw.open { background: rgba(122, 167, 255, 0.04); border-color: rgba(122, 167, 255, 0.3); }
.sw .cwh { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 6px 8px 6px 10px; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.sw .cwh:hover { background: rgba(255, 255, 255, 0.04); }
.sw .cwh > i.ic { font-size: 17px; color: var(--sw-ac); }
.sw .cwh .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sw .cwh .tt b { font-size: 13px; color: #fff; }
.sw .cwh .tt small { overflow: hidden; font-size: 11.5px; color: var(--sw-mut); text-overflow: ellipsis; white-space: nowrap; }
.sw .cwh .tt small.hl { color: #fca5a5; }
.sw .cwb { display: none; padding: 2px 12px 12px; }
.sw .cw.open .cwb { display: block; }
.sw .chev { transition: transform 0.15s; }
.sw .cw.open .chev { transform: rotate(180deg); }
.sw .cw.half .chev { display: none; }

/* ---------- navigation ---------------------------------------------------- */

.sw .main-nav { border: 0 !important; margin: 0 !important; padding: 0 !important; }
.sw #main-nav-container ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sw #main-nav-container ul > li { max-height: none; overflow: visible; }
.sw .nav-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; font-weight: 500; color: var(--sw-mut); border-left: 0; border-radius: 10px; cursor: pointer; }
.sw .nav-link i { font-size: 17px; color: inherit; }
.sw .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.sw .nav-link.active { font-weight: 700; color: #fff; background: linear-gradient(90deg, rgba(122, 167, 255, 0.22), rgba(122, 167, 255, 0.06)); box-shadow: inset 3px 0 0 var(--sw-ac); border-left: 0; }
.sw .nav-link.active i { color: var(--sw-ac); }
.sw .nav-compact #main-nav-container ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sw .nav-compact .nav-link { justify-content: center; padding: 0; height: 34px; }
.sw .nav-compact .nl-t { display: none; }

/* ---------- recherche ------------------------------------------------------ */

.sw .srch, .sw .sidebar-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; color: var(--sw-mut); text-align: left; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--sw-line); border-radius: 11px; cursor: pointer; }
.sw .srch:hover, .sw .sidebar-search:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.sw .srch span, .sw .sidebar-search span:not(.kbd-group) { flex: 1; }
.sw kbd { height: 18px; min-width: 18px; padding: 0 4px; font: 10px/18px system-ui; text-align: center; color: var(--sw-mut); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--sw-line); border-radius: 5px; }

/* ---------- calendrier ----------------------------------------------------- */

.sw .calendar-section { background: transparent; }
.sw #calendar-container { padding: 0; font-size: 12.5px; }
.sw #calendar-container h4 { font-size: 0.92rem; font-weight: 700; color: #fff; }
.sw #calendar-container #prevMonth, .sw #calendar-container #nextMonth { width: 24px; height: 24px; padding: 0; line-height: 1; font-size: 13px; color: var(--sw-mut); background: rgba(255, 255, 255, 0.06); border-radius: 7px; }
.sw #calendar-container #prevMonth:hover, .sw #calendar-container #nextMonth:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.sw .calmini { display: flex; align-items: center; gap: 10px; }
.sw .calmini b { display: grid; place-items: center; width: 42px; height: 42px; font-size: 22px; color: #0b1220; background: var(--sw-ac); border-radius: 12px; }
.sw .calmini small { font-size: 12px; line-height: 1.3; color: var(--sw-mut); }

/* ---------- contenus des widgets ------------------------------------------- */

.sw .ug, .sw #urgent-tasks-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sw #urgent-tasks-list .urgent-notification { width: 100%; padding: 8px 10px; cursor: pointer; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.28); border-left-width: 3px; border-radius: 10px; }
.sw #urgent-tasks-list .urgent-empty { padding: 4px 2px; font-size: 12.5px; color: var(--sw-mut); }
.sw .empty { display: block; min-height: 0; margin: 0; padding: 6px 2px; font-size: 12.5px; text-align: left; color: var(--sw-mut); background: none; border: 0; }
.sw .mt { display: flex; flex-direction: column; gap: 6px; }
.sw .mi { display: flex; align-items: center; gap: 10px; padding: 7px 9px; cursor: pointer; background: rgba(192, 132, 252, 0.08); border-left: 3px solid #c084fc; border-radius: 9px; }
.sw .mi b { font-size: 12.5px; color: #e2c7ff; font-variant-numeric: tabular-nums; }
.sw .mi span { flex: 1; overflow: hidden; font-size: 13px; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.sw .pg { display: flex; align-items: center; gap: 14px; }
.sw .pg .rg { --p: 75; position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--sw-ok) calc(var(--p) * 1%), rgba(255, 255, 255, 0.09) 0); }
.sw .pg .rg::after { content: attr(data-t); position: absolute; inset: 7px; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; background: #191a1f; border-radius: 50%; }
.sw .pg b { display: block; font-size: 15px; color: #fff; }
.sw .pg small { color: var(--sw-mut); }
.sw .pg.half { flex-direction: column; gap: 4px; text-align: center; }
.sw .nt { width: 100%; height: 92px; padding: 8px 10px; font-size: 13px; color: var(--sw-tx); resize: none; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--sw-line); border-radius: 10px; outline: none; }
.sw .nt:focus { border-color: var(--sw-ac); }
.sw .lk { display: flex; flex-direction: column; gap: 7px; }
.sw .lk > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 3px 4px; font-size: 13px; color: #fff; cursor: pointer; border-radius: 7px; }
.sw .lk > div:hover { background: rgba(255, 255, 255, 0.06); }
.sw .lk .bar { grid-column: 1 / -1; height: 5px; overflow: hidden; background: rgba(255, 255, 255, 0.09); border-radius: 99px; }
.sw .lk .bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.sw .tmr { display: flex; align-items: center; gap: 12px; }
.sw .tmr .tm { font: 700 28px/1 ui-monospace, Consolas, monospace; letter-spacing: -0.02em; color: #fff; }
.sw .tmr button { display: grid; place-items: center; width: 34px; height: 34px; font-size: 18px; color: #0b1220; background: var(--sw-ac); border: 0; border-radius: 50%; cursor: pointer; }
.sw .tmr.half { flex-direction: column; gap: 8px; }
.sw .tmr.half .tm { font-size: 24px; }
.sw .clk b { display: block; font: 700 34px/1 ui-monospace, Consolas, monospace; letter-spacing: -0.02em; color: #fff; }
.sw .clk small { font-size: 12.5px; color: var(--sw-mut); }
.sw .clk.half b { font-size: 26px; }
.sw .scg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sw .scg button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 10px; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left; color: var(--sw-tx); cursor: pointer; background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-radius: 11px; }
.sw .scg button:hover { background: color-mix(in srgb, var(--c) 20%, transparent); }
.sw .scg i { font-size: 18px; color: var(--c); }
.sw .qa { display: flex; gap: 6px; }
.sw .qa input, .sw .sce-in { min-width: 0; height: 36px; padding: 0 10px; color: var(--sw-tx); background: rgba(0, 0, 0, 0.28); border: 1px solid var(--sw-line); border-radius: 11px; outline: none; }
.sw .qa input { flex: 1; }
.sw .qa input:focus, .sw .sce-in:focus { border-color: var(--sw-ac); }
.sw .qa button { width: 36px; height: 36px; font-size: 16px; color: #0b1220; cursor: pointer; background: var(--sw-ac); border: 0; border-radius: 11px; }
.sw .cdw, .sw .nmw, .sw .odw { display: flex; align-items: center; gap: 12px; }
.sw .cdw > b, .sw .nmw > b { font-size: 34px; line-height: 1; color: #fff; white-space: nowrap; }
.sw .nmw > b { font-size: 30px; }
.sw .cdw > b small, .sw .nmw > b small { font-size: 14px; color: var(--sw-mut); }
.sw .cdw span, .sw .nmw span { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; color: #fff; }
.sw .cdw small, .sw .nmw small, .sw .odw small { font-size: 12px; color: var(--sw-mut); }
.sw .cdw.half { flex-direction: column; align-items: flex-start; gap: 4px; }
.sw .cdw.half span { display: -webkit-box; overflow: hidden; font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sw .odw > b { font-size: 34px; line-height: 1; color: var(--sw-err); }
.sw .odw span { font-weight: 600; color: #fecaca; }
.sw .odw small { display: block; }
.sw .odw.half { flex-direction: column; align-items: flex-start; gap: 2px; }
.sw .ipl { display: flex; flex-direction: column; gap: 2px; }
.sw .ip { display: flex; align-items: center; gap: 9px; padding: 6px; font-size: 13px; text-align: left; color: var(--sw-tx); cursor: pointer; background: none; border: 0; border-radius: 8px; }
.sw .ip:hover { background: rgba(255, 255, 255, 0.07); }
.sw .ip i { font-size: 17px; color: var(--sw-faint); }
.sw .ip:hover i { color: var(--sw-ok); }
.sw .ip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw .ip .ck { display: grid; place-items: center; padding: 0; color: inherit; cursor: pointer; background: none; border: 0; }
.sw .ip:hover { background: rgba(255, 255, 255, 0.07); }
.sw .ip span { cursor: pointer; }
.sw .ip .ib { opacity: 0; }
.sw .ip:hover .ib { opacity: 1; }
.sw .ip.done { text-decoration: line-through; opacity: 0.45; }
.sw .ip.done i { color: var(--sw-ok); }
.sw .rcl { display: flex; flex-direction: column; gap: 6px; }
.sw .rcl > div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.sw .rcl span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw .rcl small { font-size: 11.5px; color: var(--sw-faint); white-space: nowrap; }
.sw .rcl .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.sw .rcl i:not(.dot) { flex: none; font-size: 16px; }
.sw .wkt { display: flex; align-items: baseline; gap: 8px; }
.sw .wkt b { font-size: 28px; line-height: 1; color: #fff; }
.sw .wkt small { flex: 1; color: var(--sw-mut); }
.sw .wkt .ok { font-size: 12.5px; font-weight: 700; color: var(--sw-ok); }
.sw .wkt .ko { font-size: 12.5px; font-weight: 700; color: var(--sw-err); }
.sw .bars { display: flex; align-items: flex-end; gap: 5px; height: 46px; margin-top: 8px; }
.sw .bars span { flex: 1; background: linear-gradient(var(--sw-ac), rgba(122, 167, 255, 0.35)); border-radius: 4px 4px 2px 2px; }
.sw .bl { display: flex; gap: 5px; margin-top: 3px; }
.sw .bl i { flex: 1; font-size: 10px; font-style: normal; text-align: center; color: var(--sw-faint); }
.sw .pol .pv { display: flex; align-items: center; gap: 10px; }
.sw .pol .pv > i { font-size: 26px; color: var(--sw-ok); }
.sw .pol b { display: block; font-size: 14px; color: #fff; }
.sw .pol small { font-size: 12px; color: var(--sw-mut); }
.sw .hs { font-size: 13px; font-weight: 600; line-height: 1.35; color: #fff; }
.sw .srch.btn { height: 32px; margin-top: 8px; }

/* ---------- éditeurs intégrés aux widgets ---------------------------------- */

.sw .sc-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 28px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--sw-faint); cursor: pointer; background: none; border: 1px dashed rgba(255, 255, 255, 0.14); border-radius: 9px; }
.sw .sc-link:hover { color: #fff; border-color: var(--sw-ac); }
.sw .sce h6 { margin: 10px 0 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sw-faint); }
.sw .sce-list { display: flex; flex-direction: column; gap: 3px; }
.sw .sce-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 8px; font-size: 12.5px; color: #fff; background: rgba(255, 255, 255, 0.05); border-radius: 9px; }
.sw .sce-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw .sce-cat { display: flex; flex-wrap: wrap; gap: 5px; }
.sw .sce-in { width: 100%; height: 32px; margin-bottom: 5px; border-radius: 9px; }
.sw .sce-ics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sw .sce-ics button { display: grid; place-items: center; width: 30px; height: 30px; font-size: 16px; color: var(--sw-mut); cursor: pointer; background: rgba(255, 255, 255, 0.05); border: 1px solid transparent; border-radius: 8px; }
.sw .sce-ics button:hover { color: #fff; }
.sw .sce-ics button.on { color: #fff; background: rgba(122, 167, 255, 0.2); border-color: var(--sw-ac); }
.sw .sce-cols { display: flex; gap: 6px; margin-top: 6px; }
.sw .sce-cols button { width: 22px; height: 22px; cursor: pointer; border: 2px solid transparent; border-radius: 50%; }
.sw .sce-cols button.on { border-color: #fff; }
.sw .sce-act { display: flex; gap: 6px; margin-top: 10px; }
.sw .sce-b { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; height: 32px; font-size: 12.5px; font-weight: 600; color: var(--sw-tx); cursor: pointer; background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 9px; }
.sw .sce-b:hover { background: rgba(255, 255, 255, 0.14); }
.sw .sce-b.pri { color: #0b1220; background: var(--sw-ac); }
.sw .chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; font-size: 12.5px; color: var(--sw-tx); cursor: pointer; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--sw-line); border-radius: 99px; }
.sw .chip:hover { color: #fff; border-color: var(--sw-ac); }
.sw .chip i { color: var(--sw-ac); }
.sw .pickrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 12.5px; color: #fff; cursor: pointer; border-radius: 8px; }
.sw .pickrow:hover { background: rgba(255, 255, 255, 0.06); }
.sw .pickrow input { accent-color: var(--sw-ac); }

/* ---------- mode édition : aide + palette ---------------------------------- */

.sw .tipbox { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; font-size: 12px; color: var(--sw-mut); background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.25); border-radius: 11px; }
.sw .tipbox i { flex: none; font-size: 16px; color: var(--sw-warn); }
.sw .tipbox b { color: #fff; }
.sw .pal { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 13px; }
.sw .pal h5 { width: 100%; margin: 0; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sw-faint); }

/* ---------- pied : bouton de mode édition (comme la V4) --------------------- */

.sw .sw-foot { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.sw .sw-fb { display: grid; place-items: center; flex: none; width: 34px; height: 34px; font-size: 16px; color: var(--sw-mut); cursor: pointer; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--sw-line); border-radius: 11px; transition: color 0.12s, background-color 0.12s; }
.sw .sw-fb:hover { color: #fff; }
.sw .sw-fb.on { color: #0b1220; background: var(--sw-ac); border-color: var(--sw-ac); }

/* ---------- redimensionnement ------------------------------------------------ */

.sw .sw-rsz { position: absolute; top: 0; bottom: 0; right: -4px; z-index: 40; width: 9px; cursor: col-resize; touch-action: none; }
.sw .sw-rsz::after { content: ""; position: absolute; top: 50%; left: 3px; width: 3px; height: 44px; margin-top: -22px; background: transparent; border-radius: 3px; transition: background-color 0.12s, height 0.12s; }
.sw .sw-rsz:hover::after, .sw .sw-rsz:focus-visible::after, .sw .sw-rsz.on::after { height: 64px; margin-top: -32px; background: var(--sw-ac); }
.sw .sw-rsz:focus-visible { outline: none; }
.sw .sw-tip { position: absolute; top: 12px; right: -58px; z-index: 45; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #0b1220; white-space: nowrap; pointer-events: none; background: var(--sw-ac); border-radius: 8px; }
body.sw-resizing, body.sw-resizing * { cursor: col-resize !important; user-select: none !important; }

/* ---------- toast local --------------------------------------------------------- */
.sw-toast { position: fixed; left: 50%; bottom: 20px; z-index: 10080; padding: 8px 14px; font-size: 13px; color: #fff; pointer-events: none; background: #2b3040; border: 1px solid #444c5c; border-radius: 10px; transform: translateX(-50%); }

/* ---------- bouton d'édition à gauche ------------------------------------- */
.sw .sw-foot { justify-content: flex-start; }

/* ---------- panneau de droite (accueil) ----------------------------------- */
.sidebar.sw.sw-right { border-right: 0; border-left: 1px solid var(--border-color-medium); animation: swSlideIn 0.18s ease; }
.sidebar.sw.sw-right[hidden] { display: none; }
@keyframes swSlideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.sw .sw-rsz-l { left: -4px; right: auto; }
.sw .sw-tip-l { left: -64px; right: auto; }
.sw-right .sw-rhead { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 2px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sw-faint); }
.sw-right .sw-rhead i { color: var(--sw-ac); margin-right: 4px; }
.sw-right .sw-zl { margin-top: 0; }
.home .home-toolbar #right-panel-btn.on { color: #0b1220 !important; background: var(--h-accent, #7aa7ff) !important; border-color: transparent !important; }

/* ---------- éditeur de style (mode édition) --------------------------------- */
.sw .sty { padding: 10px 12px 12px; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 13px; }
.sw .sty h5 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--sw-faint); }
.sw .sty h5 i { color: var(--sw-ac); font-size: 14px; }
.sw .sty-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.sw .sty-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--sw-tx); }
.sw .sty-row output { min-width: 44px; text-align: right; font-size: 11.5px; color: var(--sw-mut); font-variant-numeric: tabular-nums; }
.sw .sty-row input[type="range"] { grid-column: 1 / -1; width: 100%; height: 18px; margin: 0; accent-color: var(--sw-ac); background: none; }
.sw .sty-row input[type="color"] { grid-column: 1 / -1; width: 100%; height: 28px; padding: 2px; cursor: pointer; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--sw-line); border-radius: 8px; }

/* ---------- style individuel d'un widget ------------------------------------ */
.sw .wsty { margin: 0 0 10px; padding: 8px 10px 10px; background: rgba(0, 0, 0, 0.25); border-style: solid; border-color: rgba(122, 167, 255, 0.35); }
.sw .wsty .chip { height: 24px; padding: 0 8px; font-size: 11.5px; }
.sw .sty-note { margin: 8px 0 0; font-size: 11.5px; color: var(--sw-warn); }

/* ---------- widget Policies (activation / exécution) ---------- */
.sw .seg { display: flex; padding: 2px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--sw-line); border-radius: 10px; }
.sw .seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; padding: 0 6px; font-size: 11.5px; font-weight: 600; color: var(--sw-mut); cursor: pointer; background: none; border: 0; border-radius: 8px; white-space: nowrap; }
.sw .seg button:hover { color: #fff; }
.sw .seg button.on { color: #0b1220; background: var(--sw-ac); }
.sw .plist { display: flex; flex-direction: column; gap: 2px; }
.sw .seg + .plist { margin-top: 8px; }
.sw .prow { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 2px 4px 2px 8px; border-radius: 9px; }
.sw .prow:hover { background: rgba(255, 255, 255, 0.05); }
.sw .prow.off .pname { color: var(--sw-faint); }
.sw .pname { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.sw .prun { color: var(--sw-ok); font-size: 16px; }
.sw .prun:hover:not(:disabled) { color: #fff; background: rgba(52, 211, 153, 0.25); }
.sw .psw { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.sw .psw input { position: absolute; width: 0; height: 0; opacity: 0; }
.sw .ptrack { position: relative; width: 34px; height: 19px; background: rgba(255, 255, 255, 0.16); border-radius: 99px; transition: background-color 0.15s; }
.sw .ptrack::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform 0.15s; }
.sw .psw input:checked + .ptrack { background: var(--sw-ok); }
.sw .psw input:checked + .ptrack::after { transform: translateX(15px); }
.sw .psw input:focus-visible + .ptrack { outline: 2px solid var(--sw-ac); outline-offset: 2px; }
