/* Korda V113 (V114 : voir 146) — administration : mise en blocs, cartes compactes, remplissage des chiffres clés au survol, cartes déplaçables.
   Limité à l'administration (#view-espace.sa). Retirer ce fichier et js/145-admin-blocs.js ramène la V112 (hors cartes, qui sont dans 143). */
html body #view-espace.sa:not(#k1):not(#k2){--kr-bloc:#F7F7F7;--kr-kt:#FFFFFF;--kr-c1:#14756C;--kr-c2:#0F2A3D;--kr-c3:#BF4F1A;--kr-c4:#A8321C}
html[data-theme="dark"] body #view-espace.sa:not(#k1):not(#k2){--kr-bloc:#1B2C37;--kr-kt:#0E1922;--kr-c1:#6FC9BB;--kr-c2:#8FB6D0;--kr-c3:#E0703A;--kr-c4:#E58C78}

/* 1. Page grise (charte : #F7F7F7), grand panneau blanc, blocs gris clair à l'intérieur : trois nuances, plus de « tout blanc » */
html body:has(#view-espace.sa.active){background:#F7F7F7!important}
html[data-theme="dark"] body:has(#view-espace.sa.active){background:#0E1922!important}
html body #view-espace.sa:not(#k1):not(#k2) .esp-main{background:var(--kr-card);border:1px solid var(--kr-line);border-radius:12px;box-shadow:var(--kr-sh-float);padding:28px;min-width:0}
html[data-theme="dark"] body #view-espace.sa:not(#k1):not(#k2) .esp-main{box-shadow:none}
html body #view-espace.sa:not(#k1):not(#k2) .esp-main :is(.sa-card,.sa-kpi,.esp-card,.esp-stat,.hsa-card,.sa-listcard,.kd-card){background:var(--kr-bloc)!important;border-color:transparent!important;box-shadow:none!important}
html body #view-espace.sa:not(#k1):not(#k2) .esp-main :is(.sa-card,.sa-kpi,.esp-card,.esp-stat) :is(.sa-card,.sa-kpi,.esp-card,.esp-stat){background:var(--kr-card)!important}
@media (max-width:760px){html body #view-espace.sa:not(#k1):not(#k2) .esp-main{padding:16px;border-radius:12px}}

/* 2. Cartes de publication compactes */
html body #view-espace.sa:not(#k1):not(#k2) .kr-grille-cartes{grid-template-columns:repeat(auto-fill,minmax(232px,1fr))!important;gap:12px!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border-radius:12px;background:var(--kr-card)!important;border:1px solid var(--kr-line)!important;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc:hover{transform:translateY(-2px);box-shadow:var(--kr-sh-float)!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc:focus-visible{outline:2px solid var(--kr-act);outline-offset:2px}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-h{display:flex;gap:10px;min-width:0}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-ph{position:relative;flex:none;width:56px;height:56px;border-radius:8px;background:var(--kr-bloc);display:grid;place-items:center;color:var(--kr-mute);overflow:hidden}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-t{min-width:0;display:flex;flex-direction:column;gap:2px}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-b{display:flex;gap:6px;flex-wrap:wrap}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc .kr-badge{position:static;display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;background:var(--kr-bloc);color:var(--kr-ink);font-size:11px;line-height:16px;font-weight:600;box-shadow:none}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc .kr-badge-off{background:var(--kr-err-bg);color:var(--kr-err)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc h4{margin:0;font-size:14px;line-height:20px;font-weight:600;color:var(--kr-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc p{margin:0;font-size:12px;line-height:16px;color:var(--kr-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-f{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-f b{font-size:13px;line-height:18px;font-weight:700;color:var(--kr-ink);font-variant-numeric:tabular-nums;white-space:nowrap}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc-w{display:inline-flex;align-items:center;gap:6px;min-width:0}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc .kr-av{width:22px;height:22px;font-size:10px}
html body #view-espace.sa:not(#k1):not(#k2) .kr-mc .kr-who{font-size:12px;line-height:16px;color:var(--kr-mute);max-width:84px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* cercles d'annonceur : vraie photo par-dessus l'initiale, logo Korda */
html body #view-espace.sa:not(#k1):not(#k2) .kr-av{position:relative;overflow:hidden}
html body #view-espace.sa:not(#k1):not(#k2) .kr-av img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html body #view-espace.sa:not(#k1):not(#k2) .kr-av-k svg{width:64%;height:64%;display:block}

/* 3. Chiffres clés : un coin de couleur qui remplit la carte au survol (une couleur de la charte par carte) */
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpis>.kr-kpi{--kc:var(--kr-c1);position:relative;overflow:hidden;isolation:isolate;transition:color .3s ease}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpis>.kr-kpi:nth-child(2){--kc:var(--kr-c2)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpis>.kr-kpi:nth-child(3){--kc:var(--kr-c3)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpis>.kr-kpi:nth-child(4){--kc:var(--kr-c4)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--kc);clip-path:circle(74px at 0 0);transition:clip-path .55s cubic-bezier(.2,.7,.2,1);pointer-events:none;display:block!important;top:0!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;height:auto!important;border-radius:0!important;opacity:1!important;transform:none!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi:is(:hover,:focus-visible,:active,.kr-on)::before{clip-path:circle(160% at 0 0)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi .sa-ico{background:transparent!important;border:0!important;color:var(--kr-kt)!important;box-shadow:none!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi:is(:hover,:focus-visible,:active,.kr-on) :is(.sa-kl,.sa-v,.sa-ks,.sa-evo,.sa-chip,.kr-kpi-v,.sa-load,p,span,b){color:var(--kr-kt)!important;border-color:transparent}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi:is(:hover,:focus-visible,:active,.kr-on) :is(.sa-evo,.sa-chip){background:rgba(255,255,255,.18)!important}
html[data-theme="dark"] body #view-espace.sa:not(#k1):not(#k2) .kr-kpi:is(:hover,:focus-visible,:active,.kr-on) :is(.sa-evo,.sa-chip){background:rgba(14,25,34,.14)!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi .sa-kl,html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi .sa-v,html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi .sa-ks{transition:color .3s ease}

/* 4. Cartes déplaçables */
html body #view-espace.sa:not(#k1):not(#k2) [data-kr-dnd]>[data-kr-item]{touch-action:manipulation}
html body #view-espace.sa:not(#k1):not(#k2) .kr-glisse-src{opacity:.35}
html body #view-espace.sa:not(#k1):not(#k2) .kr-glisse-sur{outline:2px dashed var(--kr-act);outline-offset:-2px}
html body #view-espace.sa:not(#k1):not(#k2).kr-glisse-on,html body #view-espace.sa:not(#k1):not(#k2).kr-glisse-on *{user-select:none!important;-webkit-user-select:none!important;cursor:grabbing!important}
html body #view-espace.sa:not(#k1):not(#k2) .kr-fantome{position:fixed;z-index:9999;pointer-events:none;margin:0;opacity:.94;transform:scale(1.03);box-shadow:0 8px 28px rgba(0,0,0,.28);transition:none}
html body #view-espace.sa:not(#k1):not(#k2) .kr-reinit{margin:10px 0 0;font-size:13px;color:var(--kr-mute)}
html body #view-espace.sa:not(#k1):not(#k2) .kr-annonce{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){
 html body #view-espace.sa:not(#k1):not(#k2) .kr-kpi::before,html body #view-espace.sa:not(#k1):not(#k2) .kr-mc{transition:none!important}
 html body #view-espace.sa:not(#k1):not(#k2) .kr-mc:hover{transform:none}
}
