/* Admin refonte (29/10/2026) : volets Prix Tesla, Véhicules, Textes de chargement, Réglages du calcul, Méthode de calcul.
   Valeurs de la maquette (design_handoff_admin) : cartes blanches bordure #E2DBD1 rayon 13, titres de carte 11 px / 700 en capitales. */

/* ---------- Prix Tesla (4f) ---------- */
.ka-tcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; flex: 0 0 auto; }
.ka-tcard { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid #E2DBD1; border-radius: 13px; min-width: 0; }
.ka-tcard-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #6F675E; text-transform: uppercase; white-space: nowrap; }
.ka-tcard-v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ka-tcard-v b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: #221E1A; }
.ka-tcard-v span { font-size: 12.5px; font-weight: 700; color: #6F675E; }
.ka-tcard-v span.ka-bad { color: #C1272D; }
.ka-tsteps { gap: 14px; }
.ka-tstep { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: #221E1A; }
.ka-tstep > i { width: 26px; height: 26px; border-radius: 50%; background: #0B5C6B; color: #fff; font: 800 13px Archivo, sans-serif; font-style: normal; display: grid; place-items: center; flex: 0 0 auto; }
.ka-tbm { display: inline-flex; padding: 3px 9px; border: 1px solid #E2DBD1; border-radius: 7px; font-weight: 700; color: #221E1A; text-decoration: none; background: #fff; cursor: grab; }
.ka-tesla-result { padding: 10px 14px; border-radius: 10px; background: #E5F1F3; color: #0B5C6B; font-size: 13.5px; font-weight: 600; }
.ka-tesla-result.bad { background: #FBE3E6; color: #C1272D; }
.ka-tesla-result[hidden] { display: none; }
#tesla-history tr { cursor: pointer; }
.ka-num { text-align: right; }
.ka-tesla-msg { display: block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4E4740; }
.ka-tesla-full { white-space: pre-wrap; word-break: break-word; }

/* ---------- Pastilles de filtre (maquette : 34 px, rayon 9 ; filtre actif = orange avec une croix) ---------- */
.kc-chip, .kc-sel { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid #E2DBD1; border-radius: 9px; background: #fff; font: 600 13px Archivo, sans-serif; color: #3A342E; cursor: pointer; white-space: nowrap; box-sizing: border-box; }
.kc-chip svg { width: 12px; height: 12px; }
.kc-chip.on, .kc-sel.on { border-color: #F3C98B; background-color: #FDF3E1; color: #8A5A07; }
.kc-sel { padding-right: 6px; }

/* ---------- Véhicules (4g) ---------- */
.kc-note { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 4px; border-radius: 50%; background: #EAE5DD; color: #6F675E; font-size: 10px; font-weight: 700; vertical-align: middle; cursor: help; }
.kc-src { white-space: nowrap; color: #0B7387; font-weight: 700; cursor: pointer; }
.kc-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.kc-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kc-dot.g { color: #1F8A4C; } .kc-dot.o { color: #B7700A; }
[data-ka-pane="vehicles"] tbody tr { cursor: pointer; }
.kc-blk { display: flex; flex-direction: column; gap: 13px; padding-top: 14px; border-top: 1px solid #EDE8E1; }
.kc-blk:first-child { border-top: 0; padding-top: 0; }
.kc-blk h4 { margin: 0; font-size: 14px; font-weight: 800; color: #221E1A; }
.kc-err { padding: 9px 12px; border-radius: 9px; background: #FBE3E6; color: #C1272D; font-size: 13px; font-weight: 600; }
.kc-err[hidden] { display: none; }
[data-ka-pane="vehicles"] table { table-layout: fixed; width: 100%; }
[data-ka-pane="vehicles"] th:nth-child(2), [data-ka-pane="vehicles"] th:nth-child(3), [data-ka-pane="vehicles"] th:nth-child(6) { width: 58px; }
[data-ka-pane="vehicles"] th:nth-child(4) { width: 70px; }
[data-ka-pane="vehicles"] th:nth-child(5), [data-ka-pane="vehicles"] th:nth-child(7) { width: 68px; }
[data-ka-pane="vehicles"] th:nth-child(8), [data-ka-pane="vehicles"] th:nth-child(9) { width: 84px; }
[data-ka-pane="vehicles"] th:nth-child(10) { width: 74px; }
[data-ka-pane="vehicles"] th:nth-child(11) { width: 100px; }
[data-ka-pane="vehicles"] th:nth-child(12) { width: 70px; }
[data-ka-pane="vehicles"] td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-ka-pane="vehicles"] table { min-width: 1020px; }
[data-ka-pane="vehicles"] .table-wrap { overflow-x: auto; }

/* ---------- Textes de chargement (5a) ---------- */
.kc-tips { table-layout: fixed; width: 100%; }
.kc-tips td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-grip { color: #A39A90; font-size: 15px; cursor: grab; text-align: center; padding-left: 8px; padding-right: 0; letter-spacing: -2px; }
.kc-badge { display: inline-flex; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #fff; background: #0B5C6B; border-radius: 6px; padding: 3px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.kc-tiptext span { color: #221E1A; }
.kc-opts { display: flex; gap: 6px; flex-wrap: nowrap; }
.kc-edit { color: #0B7387; font-weight: 700; text-decoration: none; }
.kc-edit:hover { text-decoration: underline; }
.kc-tips tbody tr { cursor: pointer; }
.kc-tips tr.kc-over td { box-shadow: inset 0 2px 0 #E01B5D; }
.kc-tips tr.kc-dragging { opacity: .45; }
.kc-checks { display: flex; flex-direction: column; gap: 7px; }
.kc-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #221E1A; cursor: pointer; }
.kc-check input { width: 16px; height: 16px; accent-color: #0B5C6B; margin: 0; flex: 0 0 auto; }
.ka-pf .kc-check input { height: 16px; width: 16px; padding: 0; }
.kc-trs { display: flex; flex-direction: column; gap: 6px; }
.kc-trmore { display: flex; flex-direction: column; gap: 6px; }
.kc-trmore[hidden], .kc-more[hidden] { display: none; }
.kc-tr { display: grid; grid-template-columns: 28px 92px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12.5px; padding: 6px 8px; border: 1px solid #E2DBD1; border-radius: 8px; }
.kc-tr b { color: #0B5C6B; }
.ka-pf .kc-tr input { height: 28px; padding: 0 8px; font-size: 12.5px; border-radius: 6px; }
.kc-more { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: 700 12.5px Archivo, sans-serif; color: #0B7387; cursor: pointer; }

/* ---------- Réglages du calcul (5c) ---------- */
.kc-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: start; }
.kc-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kc-cardtxt { font-size: 13px; color: #6F675E; line-height: 1.5; }
.kc-frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #F1ECE5; font-size: 14px; }
.kc-frow label { color: #221E1A; }
.kc-frow input[type=number] { width: 90px; text-align: right; font-weight: 700; }
.kc-prow { width: 100%; border-collapse: collapse; }
.kc-prow td { font-size: 13.5px; padding: 7px 0; border-top: 1px solid #F1ECE5; }
.kc-prow td:last-child { text-align: right; }
.kc-status { font-size: 12.5px; color: #6F675E; }
[data-ka-pane="settings"] [hidden] { display: none !important; }
@media (max-width: 1100px) { .kc-calc { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Méthode de calcul (6a) : sommaire fixe à gauche (230 px), texte à droite (760 px max) ---------- */
[data-ka-pane="method"].on { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: 28px; align-items: start; }
.kc-mtoc { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 56px - 44px); overflow-y: auto; padding-bottom: 8px; }
.kc-mtoc-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #6F675E; padding: 4px 10px 8px; }
.kc-mtoc a { display: block; font-size: 13.5px; line-height: 1.3; padding: 6px 10px; border-radius: 8px; color: #3A342E; text-decoration: none; }
.kc-mtoc a:hover { background: #F8F6F2; }
.kc-mtoc a.on { background: #E5F1F3; color: #0B5C6B; font-weight: 700; }
.method { max-width: 760px; }
.method .toc { display: none; }
.kc-mcrumb { font-size: 12.5px; color: #8A8178; margin-bottom: 6px; }
.method h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px 0; }
.method h3 { font-size: 19px; font-weight: 800; }
.method p, .method li { font-size: 14.5px; line-height: 1.65; color: #3A342E; }
.method .lead { color: #6F675E; }
.method h3 { scroll-margin-top: 4px; }
@media (max-width: 1000px) {
  [data-ka-pane="method"].on { grid-template-columns: minmax(0, 1fr); }
  .kc-mtoc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
}
