:root{--bg:var(--tp-background);--ink:var(--tp-ink);--muted:var(--tp-muted);--line:var(--tp-border);--blue:var(--tp-primary);--blueDark:var(--tp-navy);--green:var(--tp-success);--orange:var(--tp-warning);--red:var(--tp-danger);--shadow:var(--tp-shadow)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:linear-gradient(180deg,var(--tp-surface-alt),var(--tp-surface-alt));font:var(--tp-size-body)/var(--tp-leading) var(--tp-font);color:var(--ink)}
button,input,textarea,select{font:inherit;color:inherit}
button,a,input,textarea,select,summary{-webkit-tap-highlight-color:transparent}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;border:1px solid var(--tp-border-strong);background:var(--tp-surface);color:var(--tp-text);border-radius:var(--tp-radius-control);padding:9px 12px;font-size:12px;font-weight:var(--tp-weight-bold);min-height:40px;text-decoration:none}
button:hover,.button:hover{background:var(--tp-surface-alt)}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:var(--tp-focus);outline-offset:var(--tp-focus-offset)}
.primary{background:var(--blue);border-color:var(--blue);color:white}
.primary:hover{background:var(--tp-primary-hover)}
.soft{background:var(--tp-primary-soft);color:var(--tp-primary);border-color:var(--tp-primary-border)}
.text-button{border:0;background:transparent;padding:5px 7px;min-height:32px;color:var(--tp-primary)}
.text-button:hover{background:var(--tp-primary-soft)}
h1,h2,h3,p{margin:0}
h1{font-size:23px;letter-spacing:-.8px;line-height:1.25}
h2{font-size:var(--tp-size-title);letter-spacing:-.7px;margin-bottom:5px}
h3{font-size:15px}
small{font-size:11px}
.caption{font-size:12px;line-height:1.5;color:var(--muted)}
.wrap{max-width:1440px;padding:14px 22px;margin:auto}
header{position:sticky;top:0;z-index:20;background:var(--tp-surface);border-bottom:1px solid var(--line);box-shadow:var(--tp-shadow)}
.top{display:flex;align-items:center;justify-content:space-between;gap:20px}
.subtitle{font-size:12px;color:var(--muted);margin-top:5px}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.simulation-cta{background:var(--tp-warning-soft);color:var(--tp-warning);border-color:var(--tp-warning-border)}
.simulation-cta:hover{background:var(--tp-warning-soft)}
.simulation-state{display:inline-flex;align-items:center;gap:4px}
.simulation-pill{font-size:11px;color:var(--tp-warning);background:var(--tp-warning-soft);border:1px solid var(--tp-warning-border);border-radius:var(--tp-radius-pill);padding:5px 9px;white-space:nowrap}
.simulation-state button{font-size:11px;color:var(--tp-warning)}
.tabs{display:flex;gap:7px;padding-top:0;padding-bottom:12px}
.tabs button{font-size:12px;color:var(--tp-text);min-height:38px;padding:8px 14px}
.tabs button[aria-pressed=true]{background:var(--tp-navy);border-color:var(--tp-navy);color:white}
main{max-width:1440px;margin:auto;padding:18px 22px}
.period-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px;font-size:12px}
.period-bar label{display:flex;align-items:center;gap:10px}
.period-bar select{padding:8px 10px;border:1px solid var(--tp-border-strong);border-radius:8px;background:var(--tp-surface);font-size:12px;min-height:38px}
.period-bar #saved{font-size:11px;color:var(--tp-success)}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.reference-line{display:flex;flex-wrap:wrap;align-items:center;gap:9px 25px;font-size:11px;color:var(--tp-muted);background:var(--tp-surface);border:1px solid var(--line);border-radius:10px;padding:11px 15px;margin-bottom:14px}
.reference-line b{color:var(--tp-navy);font-size:13px;margin-right:5px}
.reference-line #scoreTitle{margin-left:auto;color:var(--tp-primary);font-weight:var(--tp-weight-bold)}
.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.card,.kpi{background:var(--tp-surface);border:1px solid var(--tp-border);border-radius:var(--tp-radius-card);box-shadow:var(--shadow);padding:17px;min-width:0}
.kpi{position:relative;overflow:hidden;padding:17px 15px 14px 19px}
.kpi:before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--tp-border)}
.kpi.good:before{background:var(--tp-success)}
.kpi.warn:before{background:var(--tp-warning)}
.kpi.bad:before{background:var(--tp-danger)}
.kpi-label{font-size:12px;font-weight:var(--tp-weight-bold);color:var(--tp-text);min-height:35px}
.kpi-value{font-size:var(--tp-size-kpi);font-weight:var(--tp-weight-number);letter-spacing:-.8px;line-height:1.25;white-space:nowrap;margin-top:6px;color:var(--tp-ink)}
.kpi-value small{font-size:12px;letter-spacing:0}
.target{font-size:11px;color:var(--tp-muted);margin-top:7px;line-height:1.6}
.target b{color:var(--tp-navy)}
.attainment{font-size:18px;font-weight:var(--tp-weight-number);margin-top:12px}
.attainment small{font-size:10px;font-weight:var(--tp-weight-normal);color:var(--tp-muted)}
.progress{height:5px;background:var(--tp-surface-alt);border-radius:8px;overflow:hidden;margin:7px 0}
.progress span{display:block;height:100%;background:currentColor;border-radius:8px}
.kpi-foot{font-size:10px;min-height:28px;margin-top:7px}
.good{color:var(--green)}
.warn{color:var(--orange)}
.bad{color:var(--red)}
.neutral{color:var(--tp-muted)}
.legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px 17px;font-size:10px;margin:12px 0 19px}
.decision-line{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.decision-box{padding:15px;border-radius:11px;border:1px solid var(--tp-border);background:var(--tp-surface);min-width:0;border-top:3px solid var(--tp-border)}
.decision-box.bad{background:var(--tp-danger-soft);border-color:var(--tp-danger-border);border-top-color:var(--tp-danger)}
.decision-box.good{background:var(--tp-success-soft);border-color:var(--tp-success-border);border-top-color:var(--tp-success)}
.decision-box.action{background:var(--tp-primary-soft);border-color:var(--tp-primary-border);border-top-color:var(--tp-primary);color:var(--tp-primary)}
.decision-box.warn{background:var(--tp-warning-soft);border-color:var(--tp-warning-border);border-top-color:var(--tp-warning)}
.decision-box strong{font-size:12px;display:block;margin-bottom:6px}
.decision-box p{font-size:12px;color:var(--tp-text);line-height:1.5}
.charts-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:16px}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.tag{background:var(--tp-primary-soft);color:var(--tp-primary);border:1px solid var(--tp-border);border-radius:var(--tp-radius-pill);padding:4px 9px;font-size:10px;white-space:nowrap}
#chart svg{width:100%;max-height:285px;display:block}
#chartCaption{font-size:10px}
.team-summary-row{display:grid;grid-template-columns:minmax(100px,1fr) 85px 120px;gap:12px;align-items:center;border-bottom:1px solid var(--tp-border);padding:9px 0;font-size:12px}
.team-summary-row:last-child{border:0}
.team-summary-row b{font-size:12px}
.team-summary-row small{display:block;font-size:10px;color:var(--tp-muted)}
.table-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px;font-size:12px;color:var(--tp-muted)}
.table-wrap{overflow:auto;overscroll-behavior-x:contain}
table{border-collapse:collapse;width:100%;font-size:12px}
thead{background:var(--tp-primary-soft)}
th{color:var(--tp-text);font-size:11px;text-align:left;font-weight:var(--tp-weight-bold);border-bottom:1px solid var(--line);padding:11px 9px;vertical-align:middle}
th small{display:block;font-size:9px;font-weight:var(--tp-weight-normal);margin-top:4px}
td{border-bottom:1px solid var(--tp-border);padding:9px;vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
.weekly-table{table-layout:fixed;min-width:980px}
.weekly-table th:nth-child(1){width:93px}
.weekly-table th:nth-child(2){width:112px}
.weekly-table th:last-child{width:128px}
.weekly-table input{width:100%;min-width:0;text-align:right;font-size:13px;font-weight:var(--tp-weight-medium);background:var(--tp-surface)}
.row-week{flex-direction:column;align-items:flex-start;color:var(--tp-navy);padding:4px 6px;border:0;background:transparent;min-height:36px;text-align:left;font-size:13px}
.row-week small{font-size:9px;font-weight:var(--tp-weight-normal);color:var(--tp-muted)}
.row-week:hover{background:var(--tp-input-hover)}
.selected-week{background:var(--tp-primary-soft)}
.selected-week .row-week{color:var(--tp-primary)}
.cell-target{display:block;font-size:9px;color:var(--tp-muted);margin-top:4px;text-align:right;white-space:nowrap}
.weekly-target{font-weight:var(--tp-weight-bold);color:var(--tp-navy);font-size:13px}
.weekly-target small{display:block;font-size:9px;font-weight:var(--tp-weight-normal);color:var(--tp-muted);margin-top:3px}
.rate{font-size:15px;font-weight:var(--tp-weight-number)}
.rate small{display:block;font-size:9px;font-weight:var(--tp-weight-normal);margin-top:3px;line-height:1.4}
.table-note{font-size:11px;color:var(--tp-muted);margin-top:13px;line-height:1.6}
.secondary{margin-top:16px}
.secondary summary,.backup summary{cursor:pointer;font-size:12px;font-weight:var(--tp-weight-medium);min-height:23px}
.extra-table{min-width:700px;margin-top:14px}
.extra-table th:first-child{width:95px}
.extra-table th:nth-child(2),.extra-table th:nth-child(3){width:150px}
.extra-table textarea{min-height:38px;resize:vertical;font-size:12px}
.extra-table input{width:100%;text-align:right}
.extra-table .row-week{font-size:12px}
.team-table{min-width:960px;table-layout:fixed}
.team-table th:first-child{width:25%}
.team-table th:nth-child(2){width:17%}
.team-table th:nth-child(3){width:14%}
.team-table th:nth-child(4){width:15%}
.team-table th:nth-child(5){width:29%}
.team-table td{padding:13px 10px}
.person-name{font-size:13px;font-weight:var(--tp-weight-bold)}
.person-indicator{display:block;color:var(--tp-muted);font-size:11px;line-height:1.4;margin-top:4px}
.person-goal{font-size:15px;font-weight:var(--tp-weight-bold)}
.person-goal small{font-size:10px;display:block;font-weight:var(--tp-weight-normal);color:var(--tp-muted);margin-top:3px}
.input-unit{position:relative;display:flex;align-items:center;min-width:0}
.input-unit input{width:100%;min-width:0;padding-right:30px;text-align:right;font-size:16px;font-weight:var(--tp-weight-bold)}
.input-unit>span{position:absolute;right:9px;font-size:11px;color:var(--tp-muted);pointer-events:none}
.person-rate{font-size:17px;font-weight:var(--tp-weight-number)}
.person-rate small{display:block;font-size:10px;font-weight:var(--tp-weight-medium);margin-top:3px}
.person-rate .progress{max-width:115px}
.skill-summary{font-size:13px;font-weight:var(--tp-weight-bold)}
.skill-summary small{font-size:10px;display:block;font-weight:var(--tp-weight-normal);margin-top:3px;color:var(--tp-muted)}
.skills-toggle{margin-top:5px;font-size:10px;min-height:28px;padding:4px 0}
.skill-details>td{padding:18px;background:var(--tp-primary-soft)}
.skill-layout{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.skill-layout h3{font-size:14px;margin-bottom:7px}
.skill-layout label{display:block;font-size:12px;font-weight:var(--tp-weight-medium);margin:12px 0}
.skill-layout textarea{width:100%;min-height:65px;margin-top:6px;font-size:12px;resize:vertical}
.skill-layout select{width:100%;margin-top:5px;font-size:12px}
.skill-scale{font-size:11px;color:var(--tp-muted);margin:5px 0 13px}
.support{background:white;border:1px solid var(--tp-border);border-radius:var(--tp-radius-control);padding:13px;font-size:12px;line-height:1.6}
.history{min-width:0;font-size:10px;margin-top:12px}
.history th,.history td{padding:7px;font-size:10px}
.history tbody tr:nth-child(even){background:var(--tp-surface)}
.salon{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:15px 0}
.salon strong{font-size:var(--tp-size-title)}
.salon strong small{font-size:12px;color:var(--tp-muted)}
.salon>div>span,.salon>div>small{display:block;font-size:11px;color:var(--tp-muted)}
.salon-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:16px}
.salon-fields label{font-size:12px;font-weight:var(--tp-weight-medium)}
.salon-fields input{width:100%;margin-top:5px}
input,select,textarea{border:1px solid var(--tp-border-strong);border-radius:var(--tp-radius-control);background:var(--tp-surface);color:var(--tp-ink);padding:9px;min-height:38px}
input::placeholder,textarea::placeholder{font-weight:var(--tp-weight-normal);color:var(--tp-placeholder);font-size:11px}
input[aria-invalid=true],textarea[aria-invalid=true],select[aria-invalid=true]{border-color:var(--tp-danger);background:var(--tp-danger-soft)}
.backup{margin-top:22px;padding:14px 2px;border-top:1px solid var(--line)}
.backup>div{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.backup p{width:100%}
footer{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding:15px 0 0;margin-top:15px;font-size:10px;color:var(--tp-muted)}
.error{background:var(--tp-danger-soft);border:1px solid var(--tp-danger-border);border-radius:var(--tp-radius-control);color:var(--tp-danger);padding:12px;font-size:12px;margin-bottom:18px}
.skip{position:absolute;top:-80px;left:10px;background:white;z-index:99;padding:10px}
.skip:focus{top:8px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:1200px){.top{align-items:flex-start;flex-direction:column;gap:15px}
.toolbar{justify-content:flex-start}
.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
.kpi-label{min-height:0}
.kpi-foot{min-height:0}
}
@media(max-width:800px){.wrap,main{padding-left:14px;padding-right:14px}
h1{font-size:21px}
.toolbar{gap:6px}
.toolbar button,.toolbar .button{font-size:11px;padding:8px}
.tabs{gap:6px;overflow:auto}
.tabs button{padding:8px 12px;white-space:nowrap;font-size:11px}
.period-bar{flex-wrap:wrap;gap:8px}
.period-bar #saved{font-size:10px}
.period-bar select{font-size:11px;max-width:200px}
h2{font-size:24px}
.section-heading{gap:12px;align-items:flex-start}
.section-heading>.primary{font-size:11px;flex-shrink:0}
.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.kpi{padding:13px 13px 13px 17px}
.kpi-value{font-size:27px}
.target{font-size:10px}
.reference-line{gap:7px 17px}
.reference-line #scoreTitle{margin-left:0;flex-basis:100%}
.decision-line,.charts-grid{grid-template-columns:1fr}
.decision-box{padding:13px}
.card{padding:14px}
.legend{justify-content:flex-start;font-size:9px;gap:5px 12px}
.table-head{align-items:flex-start;flex-direction:column;gap:8px}
.table-note{font-size:10px}
.team-summary-row{grid-template-columns:1fr 70px 115px;gap:8px;font-size:11px}
.skill-layout{grid-template-columns:1fr}
.salon-fields{grid-template-columns:1fr}
.salon{gap:10px}
.salon strong{font-size:23px}
footer{flex-direction:column;gap:5px}
}
@media print{@page{size:A4 landscape;margin:10mm}
body{background:var(--tp-surface);font-size:10px}
header{position:static;box-shadow:none;background:var(--tp-surface);border:0}
.top{padding:0;display:flex;flex-direction:row}
.tabs,.toolbar>button,.toolbar>a,.simulation-state>button,.period-bar label,.backup,.text-button,.section-heading>button{display:none!important}
.simulation-state{display:inline-flex!important}
.simulation-state[hidden]{display:none!important}
.simulation-pill{font-size:9px}
.toolbar{display:flex!important}
.wrap,main{max-width:none;padding:0}
h1{font-size:20px}
.subtitle{font-size:10px}
.period-bar{margin:10px 0 12px}
.section-heading{margin:10px 0}
.section-heading h2{font-size:20px}
.kpis{grid-template-columns:repeat(6,1fr);gap:8px}
.kpi{padding:12px}
.kpi-label{font-size:10px}
.kpi-value{font-size:22px}
.attainment{font-size:16px}
.target{font-size:9px}
.kpi-foot{font-size:9px}
.legend{margin:9px 0 12px}
.decision-line{gap:8px;margin:12px 0}
.decision-box{padding:10px}
.decision-box p{font-size:10px}
.charts-grid{grid-template-columns:1.15fr 1fr;gap:12px}
.card{box-shadow:none;padding:12px;break-inside:avoid}
.team-summary-row{padding:7px 0;font-size:10px}
#chart svg{max-height:245px}
.reference-line{padding:8px 12px}
.weekly-table,.team-table,.extra-table{min-width:0}
.weekly-table th{font-size:9px}
.weekly-table td{padding:7px}
.weekly-table input,.input-unit input,.extra-table input{border:0;background:transparent;padding:0;min-height:20px;font-size:11px}
input::placeholder{color:transparent}
.row-week{display:flex!important;min-height:20px;font-size:11px}
.weekly-target,.rate{font-size:11px}
.team-table td{padding:8px}
.team-table th,.person-indicator{font-size:10px}
.person-name,.person-rate,.skill-summary{font-size:12px}
.skills-toggle{display:none!important}
.secondary{display:none}
footer{margin-top:12px}
.simulation-pill,.kpi,.decision-box,.progress,.selected-week{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}


/* Affordances communes : les champs et actions modifiables sont bleus. */
.interaction-legend { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 14px; font-size:var(--tp-size-label); }
.editable-key { display:inline-flex; align-items:center; gap:7px; color:var(--tp-navy); background:var(--tp-primary-soft); border:1px solid var(--tp-primary-border); border-radius:var(--tp-radius-control); padding:7px 10px; font-weight:var(--tp-weight-medium); }
.readonly-key { color:var(--tp-muted); font-size:var(--tp-size-caption); }
input[data-kind], textarea[data-kind], select[data-kind], #week { border:1.5px solid var(--tp-control-border); background:var(--tp-input-fill); color:var(--tp-navy); border-radius:var(--tp-radius-control); transition:background .12s, border-color .12s; }
input[data-kind]:hover, textarea[data-kind]:hover, select[data-kind]:hover, #week:hover { background:var(--tp-input-hover); border-color:var(--tp-primary); }
input[data-kind]:focus, textarea[data-kind]:focus, select[data-kind]:focus { background:var(--tp-surface); border-color:var(--tp-primary); outline:var(--tp-focus); outline-offset:2px; }
input[data-kind][aria-invalid=true], textarea[data-kind][aria-invalid=true], select[data-kind][aria-invalid=true] { border-color:var(--tp-danger); background:var(--tp-danger-soft); }
.row-week { background:var(--tp-primary-soft); border:1px solid var(--tp-primary-border); border-radius:var(--tp-radius-control); padding:6px 9px; min-width:66px; }
.row-week:hover { background:var(--tp-input-hover); border-color:var(--tp-primary); }
.selected-week .row-week { background:var(--tp-navy); border-color:var(--tp-navy); color:var(--tp-on-primary); }
.selected-week .row-week small { color:var(--tp-on-primary); }
.weekly-table input { min-height:var(--tp-control-height); }
.skills-toggle { display:flex; justify-content:flex-start; width:100%; gap:9px; min-height:56px; margin-top:9px; padding:10px 11px; border:1px solid var(--tp-primary-border); border-radius:var(--tp-radius-control); background:var(--tp-primary-soft); color:var(--tp-navy); text-align:left; box-shadow:var(--tp-shadow-action); }
.skills-toggle:hover { background:var(--tp-input-hover); border-color:var(--tp-primary); }
.skills-toggle strong { display:block; font-size:var(--tp-size-label); font-weight:var(--tp-weight-bold); }
.skills-toggle small { display:block; color:var(--tp-muted); font-size:var(--tp-size-caption); font-weight:var(--tp-weight-normal); margin-top:2px; }
.action-icon { display:inline-grid; place-items:center; flex-shrink:0; width:23px; height:23px; border-radius:var(--tp-radius-sm); background:var(--tp-primary); color:var(--tp-on-primary); font-size:17px; }
.disclosure-chevron { margin-left:auto; font-size:16px; }
.skills-toggle[aria-expanded=true] { background:var(--tp-navy); border-color:var(--tp-navy); color:var(--tp-on-primary); box-shadow:none; }
.skills-toggle[aria-expanded=true] small { color:var(--tp-on-primary); }
.skills-toggle[aria-expanded=true] .action-icon { background:var(--tp-on-primary); color:var(--tp-navy); }
.skills-toggle[aria-expanded=true] .disclosure-chevron { transform:rotate(180deg); }
.skill-details>td { border-top:3px solid var(--tp-primary); padding:var(--tp-space-5); }
.skill-layout h3 { color:var(--tp-navy); }
.accompaniment-note { margin-top:var(--tp-space-4); }
.detail-actions { display:flex; justify-content:flex-end; padding-top:var(--tp-space-4); margin-top:var(--tp-space-4); border-top:1px solid var(--tp-border); }
.secondary summary, .backup summary { display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; padding:12px 14px; border:1px solid var(--tp-primary-border); border-radius:var(--tp-radius-control); color:var(--tp-navy); background:var(--tp-primary-soft); font-size:var(--tp-size-label); }
.secondary summary::-webkit-details-marker, .backup summary::-webkit-details-marker { display:none; }
.secondary summary:hover, .backup summary:hover { border-color:var(--tp-primary); background:var(--tp-input-hover); }
.secondary[open] summary, .backup[open] summary { border-color:var(--tp-primary); }
.summary-arrow { flex-shrink:0; font-size:16px; }
details[open] .summary-arrow { transform:rotate(180deg); }
.tabs button { border-color:var(--tp-border-strong); }
.tabs button:hover { border-color:var(--tp-primary); color:var(--tp-primary-hover); }
.tabs button[aria-pressed=true]:hover { color:var(--tp-on-primary); }
@media(max-width:800px) { .skills-toggle { padding:9px; } .interaction-legend { gap:8px; } }
@media print {
  header { border-bottom:3px solid var(--tp-primary); padding-bottom:12px; }
  h1, h2, h3, .card-head h3, .weekly-target, .person-goal { color:var(--tp-navy); }
  thead { background:var(--tp-primary-soft); }
  th { color:var(--tp-navy); border-bottom:2px solid var(--tp-primary); }
  .card, .kpi, .decision-box { border-radius:var(--tp-radius-control); }
  .interaction-legend, .detail-actions { display:none !important; }
  input[data-kind], textarea[data-kind], select[data-kind] { border:0; background:transparent; box-shadow:none; outline:0; }
  .row-week, .selected-week .row-week { border:0; background:transparent; color:var(--tp-navy); padding:0; }
  .selected-week .row-week small { color:var(--tp-muted); }
}

.table-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
@media print{.table-actions button,.table-actions a{display:none!important}}

.extra-table td:last-child{width:auto}
.extra-table textarea{display:block;width:100%;box-sizing:border-box}

.extra-table th:nth-child(2),.extra-table th:nth-child(3),.extra-table th:nth-child(4){width:130px}
.extra-table th:nth-child(5){width:120px}
.extra-table .computed .rate small{display:block;color:var(--tp-ink-muted,#5b6675);font-weight:400}

.weekly-table{min-width:1120px}
.weekly-table th:nth-child(6),.weekly-table th:nth-child(7){width:150px}
.pair{display:flex;align-items:center;gap:4px}
.pair>span{color:var(--tp-muted);font-size:13px}
.pair input{min-width:0}
.calc{font-weight:700;font-size:11px}
.calc.good{color:var(--tp-success,#1e7b4a)}.calc.warn{color:var(--tp-warning,#8a5a00)}.calc.bad{color:var(--tp-danger,#b42318)}
.person-pair{gap:8px;align-items:flex-end}
.person-pair label{display:flex;flex-direction:column;gap:3px;font-size:10px;color:var(--tp-muted);flex:1;min-width:0}
.person-pair input{width:100%;text-align:right;font-weight:700}

/* Grille de saisie hebdomadaire : colonnes fixes, une hauteur de champ, une ligne de repère par cellule. */
@media screen{
.weekly-table,.extra-table{font-variant-numeric:tabular-nums}
.weekly-table{table-layout:fixed;min-width:1040px}
.weekly-table th{vertical-align:bottom}
.weekly-table th:nth-child(1){width:82px}
.weekly-table th:nth-child(2),.weekly-table th:nth-child(3){width:128px}
.weekly-table th:nth-child(4){width:96px}
.weekly-table th:nth-child(5),.weekly-table th:nth-child(6){width:168px}
.weekly-table th:nth-child(7){width:112px}
.weekly-table th:nth-child(8){width:118px}
.weekly-table th:not(:first-child){text-align:right}
.weekly-table td{vertical-align:top;padding:12px 8px}
.weekly-table input{height:40px;min-height:40px;padding:0 10px;font-size:14px;font-weight:600;text-align:right}
.weekly-table .pair{display:grid;grid-template-columns:1fr 12px 1fr;align-items:center;gap:0}
.weekly-table .pair>span{text-align:center}
.weekly-table .cell-target{display:flex;justify-content:flex-end;gap:6px;height:16px;margin-top:6px;font-size:11px;line-height:16px}
.weekly-table .calc{font-size:12px}
.weekly-table .row-week{height:40px;min-height:40px;width:100%;padding:0 8px;justify-content:center}
.weekly-table td:last-child{text-align:right}
.weekly-table .rate{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;height:40px;font-size:17px}
.weekly-table .rate small{margin-top:6px;font-size:11px;line-height:16px}
.extra-table td{vertical-align:middle;padding:10px 8px}
.extra-table input{height:40px;min-height:40px;padding:0 10px;font-size:14px;font-weight:600}
.extra-table th:nth-child(1){width:82px}
.extra-table .row-week{height:40px;width:100%;justify-content:center}
.extra-table textarea{min-height:40px;padding:9px 10px;font-size:13px}
.extra-table .computed{text-align:right}
.extra-table .computed .rate{display:inline-flex;flex-direction:column;align-items:flex-end;font-size:17px}
}
@media screen{
.weekly-table .rate{display:block;height:auto;line-height:40px;text-align:right}
.weekly-table .rate small{display:block;line-height:16px;margin-top:6px}
input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input[type=number]{-moz-appearance:textfield;appearance:textfield}
}
@media screen{.extra-table th:nth-child(n+2):nth-child(-n+5){text-align:right}.extra-table th{vertical-align:bottom}}

.tip{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;min-height:0;padding:0;margin-left:4px;border:1px solid var(--tp-primary-border);border-radius:50%;background:var(--tp-surface);color:var(--tp-primary);font-size:10px;font-weight:700;line-height:1;cursor:help;vertical-align:middle;box-shadow:none}
.tip:hover,.tip:focus-visible{background:var(--tp-primary);color:var(--tp-on-primary);border-color:var(--tp-primary)}
.tip-box{position:fixed;z-index:1000;padding:10px 12px;border-radius:8px;background:var(--tp-navy,#102a5c);color:#fff;font-size:12px;font-weight:400;line-height:1.5;text-align:left;box-shadow:0 8px 24px rgba(16,42,92,.25);pointer-events:none}
@media print{.tip,.tip-box{display:none!important}}

/* Visite guidée */
.guide-button{border:1px solid var(--tp-primary-border);background:var(--tp-primary-soft);color:var(--tp-navy);font-weight:600}
.guide-button.pulse{animation:guidePulse 1.8s ease-out 3}
@keyframes guidePulse{0%{box-shadow:0 0 0 0 rgba(11,92,173,.45)}100%{box-shadow:0 0 0 12px rgba(11,92,173,0)}}
.guide-layer{position:fixed;inset:0;z-index:2000}
.guide-spot{position:fixed;border-radius:10px;box-shadow:0 0 0 9999px rgba(16,26,48,.55);outline:3px solid #fff;transition:all .2s ease;pointer-events:none}
.guide-pop{position:fixed;background:#fff;color:var(--tp-ink,#1a2330);border-radius:12px;padding:18px 18px 14px;box-shadow:0 18px 50px rgba(16,26,48,.35)}
.guide-pop.center{left:50%!important;top:50%!important;transform:translate(-50%,-50%);width:min(380px,calc(100vw - 24px))}
.guide-pop::before{content:"";position:absolute;left:calc(var(--arrow-x,50%) - 9px);width:18px;height:18px;background:#fff;transform:rotate(45deg)}
.guide-pop[data-arrow=top]::before{top:-9px}
.guide-pop[data-arrow=bottom]::before{bottom:-9px}
.guide-pop[data-arrow=none]::before,.guide-pop.center::before{display:none}
.guide-count{display:block;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--tp-primary)}
.guide-pop h3{margin:6px 0 6px;font-size:17px}
.guide-pop p{margin:0 0 14px;font-size:14px;line-height:1.55;color:var(--tp-text,#334)}
.guide-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.guide-actions span{display:flex;gap:8px}
.guide-actions button:disabled{opacity:.4;cursor:default}
@media print{.guide-button,.guide-layer{display:none!important}}
.guide-actions button{white-space:nowrap;padding:8px 12px;min-height:0}

/* Que faire maintenant ? */
.next-step{display:grid;grid-template-columns:auto 1fr 220px auto;align-items:center;gap:16px;margin:0 0 14px;padding:14px 16px;border:1px solid var(--tp-primary-border);border-radius:12px;background:var(--tp-primary-soft)}
.next-step:empty{display:none}
.next-step.done{background:#eaf6ef;border-color:#b9dfc8;grid-template-columns:auto 1fr 220px}
.next-icon{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--tp-primary);color:#fff;font-weight:700;font-size:18px}
.next-step.done .next-icon{background:var(--tp-success)}
.next-text b{display:block;color:var(--tp-navy);font-size:15px}
.next-text span{display:block;color:var(--tp-muted);font-size:13px;margin-top:2px}
.fill{position:relative;height:10px;border-radius:99px;background:#dfe7f1;overflow:visible}
.fill>span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--tp-primary),#4f9be6);transition:width .4s}
.next-step.done .fill>span{background:var(--tp-success)}
.fill small{position:absolute;right:0;top:14px;font-size:11px;color:var(--tp-muted)}
.flash{animation:flash 1.6s ease}
@keyframes flash{0%,60%{box-shadow:0 0 0 4px rgba(11,92,173,.35)}100%{box-shadow:none}}

/* Phrase sous les indicateurs */
.kpi-hint{margin-top:10px;padding-top:9px;border-top:1px dashed var(--tp-border);font-size:12px;line-height:1.45;color:var(--tp-text)}

/* Progression */
.progress-card{margin:14px 0}
.level{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;margin:10px 0 16px}
.level-badge{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-size:24px;font-weight:800;color:#fff;background:radial-gradient(circle at 30% 30%,#4f9be6,var(--tp-primary));box-shadow:0 0 0 4px #fff,0 0 0 6px var(--tp-primary-border)}
.level-text b{color:var(--tp-navy);font-size:15px}
.xp{height:12px;border-radius:99px;background:#e4ebf3;margin:7px 0 5px;overflow:hidden}
.xp span{display:block;height:100%;background:linear-gradient(90deg,#f0a43a,#e0702a);border-radius:99px;transition:width .5s}
.level-text small{font-size:12px;color:var(--tp-muted)}
.streak{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:10px;background:#f2f4f7;color:var(--tp-muted)}
.streak b{font-size:24px;line-height:1}
.streak small{font-size:11px;line-height:1.25}
.streak.on{background:#fff1e3;color:#a14a07}
.streak.on b::before{content:"▲ ";font-size:14px}
.badges{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.badge{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:10px;border:1px dashed var(--tp-border);border-radius:10px;opacity:.75}
.badge .medal{grid-row:span 2;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:800;background:#e9edf2;color:#8a94a3}
.badge b{font-size:13px;color:var(--tp-text)}
.badge small{font-size:11px;color:var(--tp-muted);line-height:1.3}
.badge.on{opacity:1;border-style:solid;border-color:#f0c58a;background:#fffaf2}
.badge.on .medal{background:radial-gradient(circle at 30% 30%,#ffd27a,#e08a1e);color:#fff;box-shadow:0 2px 6px rgba(224,138,30,.35)}
.badge.on small{color:#a14a07;font-weight:600}
.chip-streak{display:inline-block;margin-top:5px;padding:2px 8px;border-radius:99px;background:#fff1e3;color:#a14a07;font-size:11px;font-weight:700;white-space:nowrap}

/* Semaine en cours mise en avant */
.compact tbody tr:not(.is-focus){display:none}

/* Toast de réussite */
.toast{position:fixed;right:20px;bottom:20px;z-index:3000;width:min(340px,calc(100vw - 40px));padding:14px 16px;border-radius:12px;background:var(--tp-navy,#102a5c);color:#fff;box-shadow:0 14px 40px rgba(16,26,48,.35);animation:toastIn .35s ease;overflow:hidden}
.toast b{display:block;font-size:15px}.toast span{font-size:13px;opacity:.9}
.toast.out{animation:toastOut .5s ease forwards}
@keyframes toastIn{from{transform:translateY(20px);opacity:0}}
@keyframes toastOut{to{transform:translateY(20px);opacity:0}}
.confetti{position:absolute;inset:0;pointer-events:none}
.confetti i{position:absolute;top:-8px;left:calc(var(--i) * 7%);width:6px;height:10px;border-radius:2px;background:hsl(calc(var(--i) * 40),85%,60%);animation:fall 1.6s ease-in calc(var(--i) * 40ms) forwards}
@keyframes fall{to{transform:translateY(110px) rotate(300deg);opacity:0}}
@media (prefers-reduced-motion:reduce){.toast,.confetti i,.guide-button.pulse,.flash{animation:none!important}}

/* Lexique */
.lexicon{border:0;border-radius:14px;padding:0;width:min(640px,calc(100vw - 32px));max-height:80vh;box-shadow:0 20px 60px rgba(16,26,48,.4)}
.lexicon::backdrop{background:rgba(16,26,48,.5)}
.lexicon-head{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:#fff;border-bottom:1px solid var(--tp-border)}
.lexicon-head h2{margin:0;font-size:18px}
.lexicon dl{margin:0;padding:8px 20px 20px;display:grid;grid-template-columns:170px 1fr;gap:10px 16px}
.lexicon dt{font-weight:700;color:var(--tp-navy)}
.lexicon dd{margin:0;color:var(--tp-text);line-height:1.5}

/* Mobile : chaque semaine devient une fiche */
@media (max-width:800px){
.next-step,.next-step.done{grid-template-columns:auto 1fr}
.next-step .fill,.next-step button{grid-column:1/-1}
.badges{grid-template-columns:repeat(2,minmax(0,1fr))}
.level{grid-template-columns:auto 1fr}.streak{grid-column:1/-1}
.lexicon dl{grid-template-columns:1fr}
.weekly-table,.extra-table,.team-table{min-width:0!important;table-layout:auto!important}
.weekly-table thead,.extra-table thead,.team-table thead{display:none}
.weekly-table tbody tr,.extra-table tbody tr,.team-table tbody tr:not(.skill-details){display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin:0 0 12px;padding:12px;border:1px solid var(--tp-border);border-radius:12px;background:#fff}
.weekly-table td,.extra-table td,.team-table td{display:block;border:0;padding:0!important;text-align:left!important}
.weekly-table td::before,.extra-table td::before,.team-table td::before{content:attr(data-label);display:block;margin-bottom:4px;font-size:11px;font-weight:600;color:var(--tp-muted)}
.weekly-table td:first-child,.extra-table td:first-child,.team-table td:first-child,.extra-table td:last-child{grid-column:1/-1}
.weekly-table td:first-child::before,.extra-table td:first-child::before,.team-table td:first-child::before{display:none}
.weekly-table .cell-target{justify-content:flex-start}
.weekly-table .rate{align-items:flex-start;text-align:left}
.table-wrap{overflow:visible}
}
@media print{.next-step,.progress-card,.toast,#toggleWeeks,#lexiconButton,.chip-streak{display:none!important}.compact tbody tr{display:table-row!important}}
