/* Kartence × Opella — système visuel 2026 */
:root{
  --opella-green:#042b0b;
  --opella-green-90:#263f26;
  --opella-green-80:#3d553e;
  --opella-green-70:#546a54;
  --opella-green-60:#6d7f6e;
  --opella-green-50:#859486;
  --opella-green-40:#9eaa9e;
  --opella-green-30:#b6bfb7;
  --opella-green-20:#ced5ce;
  --opella-green-10:#e7eae7;
  --opella-warm-white:#f7efe6;
  --opella-pink:#ff78d2;
  --opella-pink-soft:#ffe4f5;
  --bg:#f7efe6;
  --surface:#fffdf9;
  --surface-2:#faf5ef;
  --surface-soft:#f0f2ee;
  --text:#102414;
  --muted:#667168;
  --line:#dce2dc;
  --border:#dce2dc;
  --dark:#042b0b;
  --violet:#ff78d2;
  --shadow:0 14px 36px rgba(4,43,11,.07);
  --shadow-strong:0 24px 70px rgba(4,43,11,.18);
  --radius-sm:10px;
  --radius-md:15px;
  --radius-lg:22px;
  --focus:0 0 0 3px rgba(255,120,210,.32);
}

html{font-size:16px}
body{background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;text-rendering:optimizeLegibility}
button,input,select,textarea{font-size:13px}
button{transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:0;box-shadow:var(--focus);border-color:var(--opella-pink)!important}
button:disabled{cursor:not-allowed;opacity:.5;transform:none!important}

.sidebar{width:264px;padding:24px 17px 18px;background:var(--opella-green);color:var(--opella-green-20)}
.shell{margin-left:264px}
.brand{height:46px;font-size:22px;letter-spacing:-.35px}
.brand-mark{width:38px;height:38px;border-radius:0;background:transparent;color:inherit;font-size:0;box-shadow:none}
.brand-mark img{display:block;width:100%;height:100%;object-fit:contain}
.workspace-switch{margin:19px 0 21px;min-height:55px;padding:10px 12px;border-color:rgba(231,234,231,.18);border-radius:14px;background:rgba(255,255,255,.07)}
.workspace-switch:hover{background:rgba(255,255,255,.11)}
.workspace-avatar{width:34px;height:34px;border-radius:10px;background:var(--opella-pink);color:var(--opella-green);font-size:12px}
.workspace-switch small{color:var(--opella-green-40);font-size:10px}
.workspace-switch strong{font-size:13px}
.nav{gap:5px}
.nav-label{margin:18px 12px 8px;color:var(--opella-green-50);font-size:10px;letter-spacing:1.4px}
.nav-item{min-height:44px;padding:0 12px;border-radius:11px;color:var(--opella-green-30);font-size:13px}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-item.active{background:var(--opella-warm-white);color:var(--opella-green);box-shadow:0 7px 22px rgba(0,0,0,.13)}
.nav-item.active [data-icon]{color:var(--opella-green)}
.nav-badge{min-width:24px;padding:3px 7px;background:var(--opella-pink);color:var(--opella-green);font-size:10px;text-align:center}
.sidebar-insight{padding:16px;border-color:rgba(231,234,231,.15);background:rgba(255,255,255,.06)}
.sidebar-insight strong{font-size:13px}.sidebar-insight p,.sidebar-insight button{font-size:11px}
.user-card strong{font-size:12px}.user-card small{font-size:10px}.user-card button{width:36px;height:36px}

.topbar{height:74px;padding:0 clamp(20px,3vw,40px);border-color:var(--line);background:rgba(255,253,249,.9)}
.top-title span{font-size:10px}.top-title strong{font-size:14px}
.global-search input{width:min(330px,28vw);height:42px;padding-left:40px;border-radius:12px;background:var(--surface);font-size:13px}
.global-search kbd{font-size:10px}.icon-btn{width:42px;height:42px;border-radius:12px}
.main-content{max-width:1560px;padding:clamp(22px,3vw,42px)}
.page-heading{margin-bottom:26px;align-items:center;gap:20px}
.date-label,.eyebrow{color:var(--opella-green-60);font-size:11px;letter-spacing:1.35px}
.page-heading h1,.compact-heading h1{margin:6px 0;font-size:clamp(27px,2.3vw,36px);line-height:1.12;letter-spacing:-1.2px}
.page-heading p{max-width:720px;color:var(--muted);font-size:14px;line-height:1.55}
.heading-actions{max-width:100%;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px}
.matrix-heading-actions{align-items:flex-end}
.matrix-view-picker{min-width:180px;display:grid;gap:4px;color:var(--muted);font-size:10px;font-weight:700}
.matrix-view-picker select{width:100%;height:42px;padding:0 34px 0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);font-size:12px}
.matrix-tools-menu{position:relative}
.matrix-tools-menu summary{min-width:156px;justify-content:space-between;list-style:none}
.matrix-tools-menu summary::-webkit-details-marker{display:none}
.matrix-tools-menu[open] summary{border-color:var(--opella-pink);box-shadow:var(--focus)}
.matrix-tools-menu>div{position:absolute;z-index:40;top:calc(100% + 8px);right:0;width:310px;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-strong)}
.matrix-tools-menu>div button{width:100%;padding:11px 12px;border:0;border-radius:10px;background:transparent;text-align:left}
.matrix-tools-menu>div button:hover{background:var(--surface-2)}
.matrix-tools-menu strong,.matrix-tools-menu small{display:block}
.matrix-tools-menu strong{font-size:12px}.matrix-tools-menu small{margin-top:3px;color:var(--muted);font-size:10px}
.button{min-height:42px;height:auto;padding:10px 16px;border-radius:11px;font-size:13px}
.button.dark{background:var(--opella-green);border-color:var(--opella-green)}
.button.dark:hover{background:var(--opella-green-90)}
.button.ghost{background:var(--surface)}
.button:hover{box-shadow:0 7px 18px rgba(4,43,11,.1)}

.panel,.person-card,.skill-card,.kpi-card,.plan-card{border-color:var(--line);border-radius:var(--radius-md);background:var(--surface);box-shadow:0 2px 0 rgba(4,43,11,.015)}
.panel:hover,.person-card:hover,.skill-card:hover{border-color:var(--opella-green-20)}
.panel-head h2,.recommendations h2{font-size:17px}
.kpi-grid{gap:15px}.kpi-card{min-height:148px;padding:21px}
.kpi-card>span{font-size:12px}.kpi-card>strong{font-size:30px}.kpi-card>small{font-size:11px}
.kpi-icon{width:38px;height:38px;border-radius:11px}
.violet{background:var(--opella-pink-soft);color:#8e145f}
.green{background:var(--opella-green-10);color:var(--opella-green)}
.orange{background:#fff0df;color:#9a501e}.blue{background:#e8f2ee;color:#285c47}
.readiness-panel,.priorities-panel,.activity-panel{padding:23px}
.coverage-list strong,.priority-list strong,.activity-list strong{font-size:13px}
.coverage-list small,.priority-list small,.activity-list small{font-size:11px}
.coverage-list>div{grid-template-columns:125px 1fr 42px}
.priority-list button{min-height:66px}.priority-rank{font-size:12px}

.toolbar{min-height:72px;padding:12px 18px;align-items:center;flex-wrap:wrap}
.toolbar-actions{display:flex;flex:1;justify-content:flex-end;flex-wrap:wrap}
.segmented button{min-height:34px;padding:6px 13px;font-size:12px}
.input-search input,.toolbar select{height:40px;font-size:12px}
.input-search input{width:220px}
.matrix-legend{min-height:48px;padding:9px 18px;flex-wrap:wrap;font-size:11px}
.matrix-table{min-width:1100px}
.table-scroll{max-height:calc(100vh - 285px);overflow:auto;scrollbar-color:var(--opella-green-40) transparent}
.matrix-table thead th{position:sticky;top:0;z-index:5;height:78px;background:var(--surface);box-shadow:0 1px 0 var(--line)}
.matrix-table thead th.sticky{z-index:7}
.matrix-table th{padding:8px 13px;font-size:11px}
.matrix-table th small{font-size:10px}
.matrix-table td{height:72px;padding:8px 13px}
.person-col{min-width:248px}
.person-cell strong{font-size:13px}.person-cell small{font-size:11px}
.level{width:29px;height:29px;border-radius:8px;font-size:11px}
.target-note{margin-top:5px;font-size:10px}
.score-value{font-size:12px}.table-foot{min-height:58px;font-size:11px}
.l0{background:#f4f5f2}.l1{background:#ffe7e1;color:#9f412f}.l2{background:#fff0cf;color:#895b12}.l3{background:#e3efea;color:#245f47}.l4{background:var(--opella-green);color:#fff}

.people-grid{grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:15px}
.person-card,.skill-card{padding:20px}
.avatar.large{width:48px;height:48px}
.availability{height:auto;padding:5px 9px;font-size:10px}
.person-card h3,.skill-card h3{font-size:16px}
.person-card>p,.skill-card p{font-size:12px}
.profile-score strong{font-size:15px}.profile-score small,.skill-metrics small{font-size:10px}
.talent-tags span{padding:6px 8px;font-size:10px}
.card-action{min-height:42px;font-size:12px}
.skills-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:15px}
.skill-summary{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));overflow:hidden}
.skill-summary>div{min-height:72px;padding:16px 20px}
.skill-summary strong{font-size:23px}.skill-summary span{font-size:11px}
.skill-summary>div+div{border-left:1px solid var(--line)}
.category-label,.criticality{font-size:10px}
.skill-metrics strong{font-size:14px}
.skill-validators strong,.skill-validators span{font-size:12px}
.skill-documents{font-size:12px}
.entity-actions{gap:7px}
.entity-actions button{min-height:34px;font-size:11px}
.skill-version{font-size:11px}
.skills-list .skill-version{grid-column:1/-1;grid-row:2;margin:0}
.skills-list .skill-documents{grid-row:3}
.skills-list .entity-actions{grid-row:4}

.plans-stats>div{min-height:78px}.plans-stats strong{font-size:21px}.plans-stats small{font-size:11px}
.plan-card{padding:18px}.plan-main strong{font-size:13px}.plan-main small,.due,.plan-main p{font-size:11px}
.recommendations strong{font-size:12px}.recommendations small{font-size:10px}
.empty{padding:32px;font-size:13px}

.training-toolbar label,.training-archive-filters label{font-size:12px}
.training-toolbar input,.training-toolbar select,.training-archive-filters input,.training-archive-filters select{height:42px;font-size:13px}
.training-list th{font-size:11px}.training-list td>strong{font-size:13px}.training-list td>small{font-size:11px}
.training-archive-summary{grid-template-columns:repeat(5,1fr)}
.training-archive-summary span,.archive-record-head p,.archive-trace small,.archive-participants p{font-size:11px}
.archive-record-head small{font-size:10px}.archive-record-actions button,.archive-record-actions span{font-size:11px}
.training-compact-card>span:nth-child(2)>strong{font-size:13px}
.training-compact-card>span:nth-child(2)>small,.training-mini-trace{font-size:11px}

dialog{width:min(720px,calc(100% - 32px));max-height:min(88vh,900px);border-radius:var(--radius-lg);box-shadow:var(--shadow-strong);overflow:auto}
dialog::backdrop{background:rgba(4,43,11,.5);backdrop-filter:blur(6px)}
.dialog-head{position:sticky;z-index:3;top:0;padding:22px 24px;background:var(--surface)}
.dialog-icon{width:42px;height:42px;border-radius:12px;background:var(--opella-pink-soft);color:#8e145f}
.dialog-head h2{font-size:20px}.dialog-head p{font-size:12px}
.dialog-head>.close-dialog{width:40px;height:40px;border-radius:10px;font-size:24px}
.dialog-head>.close-dialog:hover{background:var(--surface-2);color:var(--text)}
.form-grid{padding:24px;gap:18px}
.form-grid label,.level-criteria-fields label{font-size:12px}
.form-grid label small{color:var(--muted);font-weight:500}
.form-grid input,.form-grid select,.form-grid textarea{margin-top:7px;border-radius:10px;font-size:13px}
.form-grid input,.form-grid select{height:44px}
.form-grid textarea{min-height:94px;line-height:1.5}
.dialog-actions{position:sticky;z-index:3;bottom:0;padding:16px 24px;background:var(--surface);flex-wrap:wrap}
.dialog-actions .close-dialog{width:auto;height:auto;font-size:13px;white-space:nowrap;overflow:visible}
.dialog-actions .button{flex:0 0 auto;max-width:100%;white-space:normal;text-align:center;justify-content:center}
.quick-check-list legend,.participant-section>strong{font-size:13px}

.toast{left:50%;right:auto;top:50%;bottom:auto;max-width:min(480px,calc(100% - 32px));padding:15px 20px;border-radius:13px;background:var(--opella-green);font-size:13px;text-align:center;box-shadow:var(--shadow-strong);transform:translate(-50%,-44%) scale(.97)}
.toast.show{transform:translate(-50%,-50%) scale(1)}
.undo-notice{left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%)!important}
.action-group h2{font-size:15px}.action-group strong{font-size:12px}.action-group small,.action-group button>b{font-size:10px}
.action-type{width:34px;height:34px;font-size:12px}

.csv-preview-rows th,.csv-preview-rows td{border-color:var(--line);font-size:11px}
.csv-preview-rows th{font-size:10px}
.auth-field-help{display:block;margin-top:5px;color:var(--muted);font-size:10px;font-weight:500}
.appearance-card{grid-column:1/-1}
.theme-color-grid{display:grid;grid-template-columns:repeat(5,minmax(100px,1fr));gap:10px}
.theme-color-grid label{font-size:11px;font-weight:700}
.theme-color-grid input[type=color]{width:100%;height:48px;margin-top:6px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer}
.theme-preview{margin-top:14px;padding:18px;border-radius:14px;background:var(--preview-background);color:var(--preview-text);display:flex;align-items:center;gap:14px}
.theme-preview>span{width:46px;height:46px;border-radius:12px;background:var(--preview-accent);color:var(--preview-primary);display:grid;place-items:center;font-weight:800}
.theme-preview>div{flex:1;padding:14px;border-radius:11px;background:var(--preview-surface);display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 12px}
.theme-preview strong,.theme-preview small{display:block}.theme-preview small{color:color-mix(in srgb,var(--preview-text) 65%,transparent)}
.theme-preview button{grid-column:2;grid-row:1/3;padding:9px 12px;border:0;border-radius:8px;background:var(--preview-primary);color:var(--preview-surface);font-size:11px;font-weight:800}
.theme-contrast{margin:9px 0 0;font-size:11px;font-weight:700}.theme-contrast.valid{color:#26755b}.theme-contrast.invalid{color:#a3422f}
.theme-actions{margin-top:16px;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}

.auth-gate{background:var(--opella-warm-white)}
.auth-visual{background:linear-gradient(145deg,#032408 0%,#064012 72%,#0b521b 100%)}
.auth-visual::before{border-color:rgba(255,120,210,.28);box-shadow:0 0 0 70px rgba(255,120,210,.10),0 0 0 140px rgba(255,120,210,.055)}
.auth-copy .eyebrow,.auth-visual .eyebrow{color:var(--opella-pink)}
.auth-submit{min-height:52px;border-radius:13px;background:#042b0b;font-size:14px}
.auth-submit:hover{background:#075317}
.auth-form input:focus{border-color:var(--opella-pink);box-shadow:var(--focus)}
.auth-form a,.auth-request-link{color:var(--opella-green)}
.auth-loading-spinner{border-color:var(--opella-green-10);border-top-color:var(--opella-pink)}
.donut{background:conic-gradient(var(--opella-green) calc(var(--value)*1%),var(--opella-green-10) 0)}
.bar i,.mini-progress i{background:var(--opella-green)}
.plan-progress i{background:var(--opella-pink)}
.mobile-menu{background:var(--opella-green);color:#fff}

body.dark{
  --bg:#08150b;
  --surface:#102416;
  --surface-2:#152d1b;
  --surface-soft:#18331f;
  --text:#f7efe6;
  --muted:#b6bfb7;
  --line:#29452f;
  --dark:#ff78d2;
}
body.dark .button.dark{color:var(--opella-green)}
body.dark .topbar{background:rgba(16,36,22,.9)}
body.dark .skill-validators{background:#18331f}
body.dark .l4{background:var(--opella-pink);color:var(--opella-green)}

@media(max-width:1180px){
  .sidebar{width:232px}.shell{margin-left:232px}
  .main-content{padding:26px 22px}
  .page-heading{align-items:flex-start;flex-direction:column}
  .heading-actions{width:100%;justify-content:flex-start}
  .matrix-view-picker{flex:1 1 190px}
  .dashboard-grid,.plans-layout{grid-template-columns:1fr}
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .training-archive-summary{grid-template-columns:repeat(3,1fr)}
}

@media(max-width:820px){
  .sidebar{width:min(300px,86vw)}
  .shell{margin-left:0}
  .topbar{padding:0 16px}
  .global-search{display:none}
  .main-content{padding:22px 15px}
  .page-heading h1,.compact-heading h1{font-size:28px}
  .heading-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .heading-actions .button{justify-content:center}
  .matrix-tools-menu summary{width:100%}
  .toolbar{align-items:stretch;flex-direction:column}
  .toolbar-actions{justify-content:flex-start}
  .toolbar-actions>*{flex:1 1 180px}
  .input-search input{width:100%}
  .activity-list{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .form-grid .full{grid-column:auto}
  .theme-color-grid{grid-template-columns:repeat(3,1fr)}
}

@media(max-width:600px){
  body{font-size:14px}
  .main-content{padding:18px 12px}
  .top-title span{display:none}
  .page-heading{margin-bottom:20px}
  .page-heading h1,.compact-heading h1{font-size:25px}
  .page-heading p{font-size:13px}
  .heading-actions{display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}
  .heading-actions .button{flex:0 0 auto}
  .matrix-view-picker{min-width:190px;flex:0 0 190px}
  .matrix-tools-menu{flex:0 0 auto}
  .matrix-tools-menu>div{position:fixed;left:12px;right:12px;top:auto;bottom:16px;width:auto}
  .kpi-grid,.plans-stats{grid-template-columns:1fr}
  .kpi-card{min-height:124px}
  .skill-summary,.training-archive-summary{grid-template-columns:1fr 1fr}
  .skill-summary>div:nth-child(odd),.training-archive-summary>div:nth-child(odd){border-left:0}
  .people-grid,.skills-grid{grid-template-columns:1fr}
  .segmented{max-width:100%;overflow:auto}
  dialog{width:calc(100% - 18px);max-height:94vh;border-radius:16px}
  .dialog-head,.form-grid,.dialog-actions{padding:17px}
  .dialog-actions .button{flex:1;justify-content:center}
  .theme-color-grid{grid-template-columns:1fr 1fr}
  .theme-preview>div{grid-template-columns:1fr}
  .theme-preview button{grid-column:1;grid-row:auto}
  .theme-actions .button{width:100%;justify-content:center}
  .matrix-table{min-width:980px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
