/* Cockpit, chantier page, roadmap alternatives and review. Builds on the tokens of app.css. */
:root {
  --ink-2: #4b556d;
  --surface-2: #f3f1f9;
  --info: #2f5fc4;
  --good-soft: #e4f5ee;
  --warn-soft: #fbf1df;
  --crit-soft: #fbe9ec;
  --info-soft: #e8effc;
  --ck-real: #7045a7;
  --ck-plan: #eb6834;
}

/* shared pieces */
.ck-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.ck-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ck-pill.is-good {
  background: var(--good-soft);
  color: var(--green);
}
.ck-pill.is-warn {
  background: var(--warn-soft);
  color: var(--amber);
}
.ck-pill.is-crit {
  background: var(--crit-soft);
  color: var(--red);
}
.ck-pill.is-info {
  background: var(--info-soft);
  color: var(--info);
}
.ck-pill.is-mute,
.ck-pill.is-none {
  background: var(--surface-2);
  color: var(--muted);
}
.ck-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ck-card h3 {
  font-size: 14px;
}
.ck-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.ck-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.ck-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--purple);
}
.ck-bar.is-crit i {
  background: var(--red);
}
.ck-bar.is-warn i {
  background: var(--amber);
}
.ck-bar.is-good i {
  background: var(--green);
}
.neg {
  color: var(--red);
}
.pos {
  color: var(--green);
}

/* navigation groups */
.nav-group {
  display: block;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  padding: 10px 12px 2px;
}
.nav-group:first-child {
  padding-top: 0;
}

/* cockpit */
.ck-head,
.ck-card-head,
.ck-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
}
.ck-head {
  margin-bottom: 18px;
}
.ck-head h1 + p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.ck-card-head {
  align-items: flex-start;
}
.ck-section {
  margin: 22px 0 10px;
  align-items: center;
}
.ck-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.ck-row.hero {
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
}
.ck-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ck-row.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.ck-ringbox {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ck-ring {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
}
.ck-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ck-ring circle {
  fill: none;
  stroke-width: 10;
}
.ck-ring .track {
  stroke: var(--surface-2);
}
.ck-ring .value {
  stroke: var(--muted);
  stroke-linecap: round;
}
.ck-ring.is-good .value {
  stroke: var(--green);
}
.ck-ring.is-warn .value {
  stroke: var(--amber);
}
.ck-ring.is-crit .value {
  stroke: var(--red);
}
.ck-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
}
.ck-factors {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ck-factors li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.ck-factors span {
  color: var(--ink-2);
}
.ck-factors b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ck-how {
  font-size: 12px;
  color: var(--muted);
}
.ck-how summary {
  cursor: pointer;
  color: var(--purple);
}
.ck-how p {
  margin-top: 6px;
  line-height: 1.55;
}
.ck-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-2);
}
.ck-legend i {
  display: inline-block;
  width: 18px;
  border-top: 2px solid var(--ck-real);
  vertical-align: middle;
  margin-right: 6px;
}
.ck-legend i.plan {
  border-top: 2px dashed var(--ck-plan);
}
.ck-curve {
  overflow-x: auto;
}
.ck-curve-in {
  position: relative;
  min-width: 520px;
}
.ck-curve svg {
  display: block;
  width: 100%;
  height: auto;
}
.ck-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.ck-tick {
  font-size: 11px;
  fill: var(--muted);
}
.ck-label {
  font-size: 12px;
  fill: var(--ink-2);
}
.ck-label.strong {
  font-weight: 650;
  fill: var(--ink);
}
.ck-label.neg {
  font-weight: 700;
  fill: var(--red);
}
.ck-label.pos {
  font-weight: 700;
  fill: var(--green);
}
.ck-plan {
  fill: none;
  stroke: var(--ck-plan);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  stroke-linecap: round;
}
.ck-real {
  fill: none;
  stroke: var(--ck-real);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ck-real.thin {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.ck-area {
  fill: var(--ck-real);
  opacity: 0.12;
}
.ck-gap {
  stroke: var(--red);
  stroke-width: 2;
}
.ck-dot {
  stroke: #fff;
  stroke-width: 2;
}
.ck-dot.plan {
  fill: var(--ck-plan);
}
.ck-dot.real {
  fill: var(--ck-real);
}
.ck-cross {
  stroke: var(--muted);
  stroke-width: 1;
}
.ck-target {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
.ck-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  transform: translate(-50%, -110%);
}
.ck-kpi svg {
  display: block;
  width: 100%;
  height: 56px;
}
.ck-kpi h3 .title-btn {
  font-size: 14px;
}
.ck-val {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ck-val strong {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ck-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ck-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ck-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.ck-list li:first-child {
  border-top: 0;
  padding-top: 0;
}
.ck-list li > div {
  min-width: 0;
  flex: 1;
}
.ck-list strong {
  display: block;
  font-weight: 600;
}
.ck-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.ck-list .btn,
.ck-list .ck-pill {
  flex: none;
}
.ck-calm {
  background: var(--good-soft);
  border-radius: 10px;
  padding: 14px 16px;
}
.ck-calm strong {
  color: var(--green);
}
.ck-meteo {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ck-meteo li {
  display: grid;
  grid-template-columns: minmax(70px, 120px) minmax(40px, 1fr) 44px auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.ck-meteo li:first-child {
  border-top: 0;
}
.ck-meteo strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.ck-pct {
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ck-frise {
  list-style: none;
  margin: 6px 60px 0;
  padding: 0;
  position: relative;
  height: 78px;
}
.ck-frise::before {
  content: '';
  position: absolute;
  left: -60px;
  right: -60px;
  top: 30px;
  border-top: 2px solid var(--border);
}
.ck-frise li {
  position: absolute;
  left: var(--at);
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-2);
  width: 120px;
}
.ck-frise li::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 25px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--purple);
  transform: rotate(45deg);
  outline: 2px solid #fff;
}
.ck-frise li.end::after {
  border-radius: 50%;
  transform: none;
  background: var(--info);
}
.ck-frise li.today {
  color: var(--red);
}
.ck-frise li.today::after {
  border-radius: 50%;
  transform: none;
  background: var(--red);
}
.ck-frise li > b,
.ck-frise-link {
  display: block;
  margin: 26px auto 0;
  font-weight: 600;
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.3;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ck-frise-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.ck-frise-link:hover {
  color: var(--purple);
}
.ck-empty {
  align-items: flex-start;
  padding: 28px;
}

/* chantier page */
.fc-crumb {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.fc-crumb .text-btn {
  font-size: 12.5px;
}
.fc-crumb b {
  color: var(--ink);
  font-weight: 600;
}
.fc-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.fc-head h1 {
  font-size: 28px;
}
.fc-head .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 8px;
}
.fc-head .work-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
}
.fc-more {
  position: relative;
}
.fc-more summary {
  display: inline-block;
  list-style: none;
  cursor: pointer;
}
.fc-more summary::-webkit-details-marker {
  display: none;
}
.fc-more > div {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 5;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 30px -18px rgba(25, 34, 61, 0.5);
}
.fc-more > div button {
  background: none;
  border: 0;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  font-weight: 550;
  color: var(--ink);
}
.fc-more > div button:hover {
  background: var(--surface-2);
}
.fc-more > div button.danger {
  color: var(--red);
}
.fc-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 14px;
}
.fc-strip > div {
  padding: 12px 16px;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.fc-strip > div:first-child {
  border-left: 0;
}
.fc-strip small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.fc-strip strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.fc-strip .ck-bar {
  margin-top: 6px;
}
.fc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 16px;
}
.fc-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 9px 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
}
.fc-tabs button[aria-selected='true'] {
  color: var(--purple-dark);
  border-color: var(--purple);
}
.fc-tabs em {
  font-style: normal;
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0 6px;
  margin-left: 4px;
}
.fc-alert {
  background: var(--crit-soft);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.fc-alert strong {
  color: var(--red);
}
.fc-alert p {
  color: var(--ink-2);
  font-size: 13px;
}
.fc-scope {
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 80ch;
  margin-bottom: 14px;
}
.fc-cols {
  align-items: start;
}
.fc-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.fc-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.fc-panel > h3 {
  margin-bottom: 10px;
}

/* roadmap: dense Gantt rows and alternative views */
.rm-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.rm-switch button {
  background: none;
  border: 0;
  border-left: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.rm-switch button:first-child {
  border-left: 0;
}
.rm-switch button[aria-pressed='true'] {
  background: var(--lavender);
  color: var(--purple-dark);
}
/* Dense Gantt on desktop: same marks, tighter vertical rhythm. Touch layouts keep their 44px targets. */
@media (min-width: 761px) and (pointer: fine) {
  section.jg,
  section.jg .jg-chart {
    --jg-row-height: 46px;
  }
  section.jg .jg-row:not(.jg-ruler) .jg-name {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  section.jg .jg-title small {
    margin-top: 1px;
  }
  section.jg .jg-expand {
    min-height: 28px;
  }
  section.jg .jg-row-status {
    top: 3px;
  }
  section.jg .jg-bar {
    top: 18px;
    height: 16px;
  }
  section.jg .jg-point {
    top: 10px;
  }
  section.jg .jg-undated {
    top: 18px;
  }
  section.jg .jg-initial,
  section.jg .jg-initial-point {
    top: 38px;
  }
}
.kb {
  display: grid;
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.kb-col {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.kb-col h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.kb-col h3 span {
  color: var(--muted);
  font-weight: 600;
}
.kb-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
}
.kb-card:hover {
  border-color: var(--purple);
}
.kb-card strong {
  font-weight: 600;
  line-height: 1.35;
}
.kb-card small {
  color: var(--muted);
  font-size: 12px;
}
.kb-card footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.kb-none {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 2px;
}
.ag-month {
  margin-bottom: 14px;
}
.ag-month h3 {
  text-transform: capitalize;
  margin-bottom: 4px;
}
.ag-day {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  width: 64px;
  flex: none !important;
}

/* review */
body.revue-view main#main {
  background: var(--ink);
}
body.revue-view .project-bar {
  display: none;
}
.rv {
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rv-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #c9cfdf;
}
.rv-top h1 {
  color: #fff;
  font-size: 22px;
}
.rv-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rv-steps button {
  border: 0;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv-steps button[aria-current='step'] {
  background: #fff;
  color: var(--ink);
}
.rv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
}
.rv-card {
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.rv-card h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1.15;
}
.rv-card h3 + p {
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.55;
}
.rv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rv-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.rv-facts div {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.rv-facts small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.rv-facts strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.rv-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rv-log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rv-log li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.rv-log li:first-child {
  border-top: 0;
}
.rv-log small {
  display: block;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .ck-row.hero,
  .ck-row.three,
  .ck-row.two,
  .rv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .fc-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .fc-head .work-toolbar {
    justify-content: flex-start;
  }
  .fc-more > div {
    right: auto;
    left: 0;
  }
  .fc-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fc-strip > div:nth-child(3) {
    border-left: 0;
  }
  .fc-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
  .rv-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .ck-frise {
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .ck-frise::before {
    display: none;
  }
  .ck-frise li {
    position: static;
    transform: none;
    width: auto;
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
  .ck-frise li::after {
    display: none;
  }
  .ck-frise li > b,
  .ck-frise-link {
    margin: 0;
    max-width: none;
    white-space: normal;
    text-align: left;
  }
}
@media print {
  body.revue-view main#main {
    background: #fff;
  }
  .rv {
    color: var(--ink);
  }
  .rv-steps,
  .rv-card form {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .nav-group {
    display: none;
  }
}

@media (max-width: 520px) {
  .ck-card,
  .rv-card {
    padding: 14px;
  }
  .ck-meteo li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .ck-meteo .ck-bar {
    grid-column: 1 / -1;
    order: 2;
  }
  .ck-list li {
    flex-wrap: wrap;
  }
}
.ck-head .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

/* Deadline frieze: second label row for markers that sit close together. */
.ck-frise {
  height: 100px;
}
.ck-frise li.low > span {
  visibility: hidden;
}
.ck-frise li.low > b,
.ck-frise li.low .ck-frise-link {
  margin-top: 48px;
}
.ck-meteo li {
  grid-template-columns: minmax(70px, 120px) minmax(40px, 1fr) 56px auto;
}
@media (max-width: 1000px) {
  .ck-frise {
    height: auto;
  }
  .ck-frise li.low > span {
    display: none;
  }
  .ck-frise li.low > b,
  .ck-frise li.low .ck-frise-link {
    margin-top: 0;
  }
}
@media (max-width: 520px) {
  .ck-meteo li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

/* Unified cockpit: filters, section links, key figures, sectors, delays and load. */
:root {
  --st-done: #228873;
  --st-active: #4e7acb;
  --st-planned: #b9c5da;
  --st-blocked: #c28b35;
  --st-late: #d15b69;
}
.bi-screen > .bi-filters {
  margin-bottom: 12px;
}
.ck-anchors {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.ck-anchors button {
  background: none;
  border: 0;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.ck-anchors button:hover {
  color: var(--purple-dark);
}
.ck-row.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ck-row.two.even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bi-screen > .ck-card {
  margin-bottom: 14px;
}
.ck-tile {
  gap: 4px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.ck-tile:hover {
  border-color: var(--purple);
}
.ck-tile small,
.ck-tile span {
  color: var(--muted);
  font-size: 12px;
}
.ck-tile strong {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ck-tile.is-good strong {
  color: var(--green);
}
.ck-tile.is-crit strong {
  color: var(--red);
}
.ck-tile.is-info strong {
  color: var(--info);
}
.ck-tile.is-warn strong {
  color: var(--amber);
}
.st-done {
  background: var(--st-done);
}
.st-active {
  background: var(--st-active);
}
.st-planned {
  background: var(--st-planned);
}
.st-blocked {
  background: var(--st-blocked);
}
.st-late {
  background: var(--st-late);
}
.ck-legend i.sq {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 3px;
}
.ck-sect {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ck-sect li {
  display: grid;
  grid-template-columns: minmax(70px, 130px) minmax(0, 1fr) 34px 124px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.ck-sect li:first-child {
  border-top: 0;
}
.ck-sect .title-btn {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.ck-stack {
  display: flex;
  gap: 2px;
  height: 22px;
  min-width: 22px;
}
.ck-stack i {
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  color: #fff;
  border-radius: 4px;
  min-width: 14px;
}
.ck-stack i.st-planned {
  color: var(--ink);
}
.ck-hbar {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ck-hbar li {
  display: grid;
  grid-template-columns: minmax(70px, 120px) minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.ck-hbar li > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-hbar b {
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ck-htrack {
  height: 14px;
  border-radius: 4px;
  background: var(--surface-2);
  display: flex;
  gap: 2px;
  overflow: hidden;
}
.ck-htrack.bare {
  background: none;
}
.ck-htrack i {
  display: block;
  height: 100%;
  border-radius: 4px;
}
.ck-mini svg {
  display: block;
  width: 100%;
  height: auto;
}
.ck-late-area {
  fill: var(--st-late);
  opacity: 0.14;
}
.ck-late-line {
  fill: none;
  stroke: var(--st-late);
  stroke-width: 2;
  stroke-linejoin: round;
}
.ck-late-dot {
  fill: var(--st-late);
  stroke: #fff;
  stroke-width: 1.5;
}
.ck-details {
  margin-top: 8px;
}
@media (max-width: 1000px) {
  .ck-row.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ck-row.two.even {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 620px) {
  .ck-sect li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .ck-sect .ck-stack-track {
    grid-column: 1 / -1;
    order: 2;
  }
}

.ck-mini svg {
  max-height: 190px;
}

/* Cockpit complements: landing sentence and data gaps. */
.ck-landing {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.ck-landing strong {
  color: var(--ink);
  margin-right: 6px;
}
.ck-landing b {
  color: var(--ink);
}
.ck-gap-group {
  border-top: 1px solid var(--border);
  padding: 9px 0;
}
.ck-gap-group:first-of-type {
  border-top: 0;
}
.ck-gap-group summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
}
.ck-gap-group summary b {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.ck-gap-group .ck-sub {
  margin: 6px 0;
}

/* Score explanation (screen) */
.ck-score {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  color: var(--ink-2);
}
.ck-score td {
  padding: 5px 6px 5px 0;
  border-top: 1px solid var(--border);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.ck-score td:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}
.ck-score small {
  display: block;
  color: var(--muted);
}

/* Printed cockpit: hidden on screen, fluid on paper. The user picks paper size and orientation
   in the print dialog; boxes reflow and never split across pages. */
.ck-print {
  display: none;
}
@page cockpit {
  size: auto;
  margin: 9mm;
}
@media print {
  body.report-view .project-bar,
  body.report-view .bi-dashboard {
    display: none !important;
  }
  body.report-view .ck-print {
    display: block;
    page: cockpit;
    color: #19223d;
    font:
      8.5pt/1.4 'Segoe UI',
      Arial,
      sans-serif;
    font-variant-numeric: tabular-nums;
  }
  .ck-print h1,
  .ck-print h2,
  .ck-print p,
  .ck-print ul,
  .ck-print ol {
    margin: 0;
    padding: 0;
  }
  .ck-print ul,
  .ck-print ol {
    list-style: none;
  }
  .ckp-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6mm;
    border-bottom: 1.5pt solid #19223d;
    padding-bottom: 2mm;
    margin-bottom: 3mm;
  }
  .ckp-top b {
    color: #7045a7;
    letter-spacing: 1.2pt;
    font-size: 7.5pt;
  }
  .ckp-top h1 {
    font-size: 17pt;
    letter-spacing: -0.3pt;
    line-height: 1.1;
  }
  .ckp-top p {
    text-align: right;
    color: #4b556d;
    font-size: 7.5pt;
  }
  .ckp-keys {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30mm, 1fr));
    gap: 2mm;
    margin-bottom: 3mm;
  }
  .ckp-score {
    grid-column: 1 / -1;
    display: flex;
    gap: 5mm;
    align-items: center;
    background: #f4f3f9;
    border-radius: 2mm;
    padding: 2.5mm 4mm;
    break-inside: avoid;
  }
  .ckp-num {
    text-align: center;
    flex: none;
    min-width: 24mm;
  }
  .ckp-num strong {
    font-size: 26pt;
    line-height: 1;
  }
  .ckp-num small {
    color: #778097;
    font-size: 8pt;
  }
  .ckp-num em {
    display: block;
    font-style: normal;
    font-weight: 650;
    font-size: 8pt;
  }
  .ckp-num.is-crit {
    color: #be4557;
  }
  .ckp-num.is-warn {
    color: #a46a16;
  }
  .ckp-num.is-good {
    color: #178562;
  }
  .ckp-score > div:last-child {
    flex: 1;
    min-width: 0;
  }
  .ckp-score table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
  }
  .ckp-score td {
    padding: 0.6mm 2mm 0.6mm 0;
    vertical-align: baseline;
  }
  .ckp-score td small {
    color: #778097;
    margin-left: 2mm;
  }
  .ckp-score td:not(:first-child) {
    text-align: right;
    white-space: nowrap;
    font-weight: 650;
  }
  .ckp-score p {
    margin-top: 1mm;
    font-size: 7.5pt;
    color: #4b556d;
  }
  .ckp-score p b {
    color: #19223d;
  }
  .ckp-key {
    border: 0.5pt solid #dfe2ec;
    border-radius: 2mm;
    padding: 2mm 3mm;
    break-inside: avoid;
  }
  .ckp-key small {
    display: block;
    color: #778097;
    font-size: 7.5pt;
  }
  .ckp-key strong {
    display: block;
    font-size: 18pt;
    line-height: 1.1;
    letter-spacing: -0.4pt;
  }
  .ckp-key span {
    color: #4b556d;
    font-size: 7.5pt;
  }
  .ckp-key.is-good strong {
    color: #178562;
  }
  .ckp-key.is-crit strong {
    color: #be4557;
  }
  .ckp-key.is-info strong {
    color: #2f5fc4;
  }
  .ckp-key.is-warn strong {
    color: #a46a16;
  }
  .ckp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(85mm, 1fr));
    gap: 3mm;
  }
  .ckp-box {
    border: 0.5pt solid #dfe2ec;
    border-radius: 2mm;
    padding: 2.5mm 3.5mm;
    min-width: 0;
    break-inside: avoid;
  }
  .ckp-box.wide {
    grid-column: 1 / -1;
  }
  .ckp-box h2 {
    font-size: 9.5pt;
    margin-bottom: 1.5mm;
  }
  .ckp-hd {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 3mm;
    flex-wrap: wrap;
  }
  .ckp-hd > span {
    color: #778097;
    font-size: 7.5pt;
  }
  .ck-print .ck-legend {
    font-size: 7pt;
    gap: 2.5mm;
  }
  .ck-print svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62mm;
  }
  .ck-print .ck-landing {
    font-size: 7.5pt;
    padding: 1.5mm 2.5mm;
    margin-top: 1.5mm;
  }
  .ckp-sect,
  .ckp-table {
    width: 100%;
    border-collapse: collapse;
  }
  .ckp-sect td {
    padding: 1mm 2mm 1mm 0;
    border-top: 0.5pt solid #e6e8f0;
    white-space: nowrap;
  }
  .ckp-sect td:nth-child(2) {
    width: 100%;
  }
  .ckp-sect td:nth-child(3) {
    color: #778097;
    text-align: right;
  }
  .ckp-sect td:last-child {
    font-weight: 650;
    color: #be4557;
  }
  .ck-print .ck-stack {
    height: 4.2mm;
  }
  .ck-print .ck-stack i {
    font-size: 7pt;
  }
  .ckp-table th {
    text-align: left;
    font-weight: 600;
    color: #778097;
    font-size: 7.5pt;
    padding: 0 2mm 1mm 0;
    border-bottom: 0.5pt solid #dfe2ec;
  }
  .ckp-table td {
    padding: 1.2mm 2mm 1.2mm 0;
    border-bottom: 0.5pt solid #e6e8f0;
    vertical-align: top;
  }
  .ckp-table td.r {
    color: #be4557;
    font-weight: 650;
    white-space: nowrap;
  }
  .ck-print .ck-hbar li {
    font-size: 8pt;
    padding: 0.8mm 0;
    grid-template-columns: minmax(20mm, 34mm) minmax(0, 1fr) 8mm;
  }
  .ck-print .ck-htrack {
    height: 3mm;
  }
  .ckp-frise {
    position: relative;
    height: 22mm;
    margin: 1mm 18mm 0 !important;
  }
  .ckp-frise::before {
    content: '';
    position: absolute;
    left: -18mm;
    right: -18mm;
    top: 7mm;
    border-top: 1pt solid #dfe2ec;
  }
  .ckp-frise li {
    position: absolute;
    left: var(--at);
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    width: 36mm;
    font-size: 7.5pt;
    color: #4b556d;
  }
  .ckp-frise li::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 5.8mm;
    width: 2.6mm;
    height: 2.6mm;
    margin-left: -1.3mm;
    background: #2f5fc4;
    border-radius: 50%;
    outline: 1pt solid #fff;
  }
  .ckp-frise li.milestone::after {
    border-radius: 0;
    transform: rotate(45deg);
    background: #7045a7;
  }
  .ckp-frise li.today {
    color: #be4557;
  }
  .ckp-frise li.today::after {
    background: #be4557;
  }
  .ckp-frise li b {
    display: block;
    margin-top: 6.5mm;
    font-weight: 600;
    color: #19223d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ckp-frise li.low > span {
    visibility: hidden;
  }
  .ckp-frise li.low b {
    margin-top: 11mm;
  }
  .ckp-due {
    columns: 2;
    column-gap: 6mm;
    font-size: 8pt;
    margin-top: 1mm !important;
  }
  .ckp-due li {
    display: flex;
    gap: 2mm;
    padding: 0.6mm 0;
    break-inside: avoid;
  }
  .ckp-due span {
    width: 14mm;
    flex: none;
    color: #778097;
  }
  .ck-print footer {
    margin-top: 3mm;
    border-top: 0.5pt solid #dfe2ec;
    padding-top: 1.5mm;
    color: #778097;
    font-size: 7pt;
  }
}

@media print {
  /* two columns on any sheet wide enough, one on narrow paper; five key figures, or two per row */
  .ckp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ckp-keys {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .ckp-score td small {
    display: inline;
  }
  .ck-print svg {
    max-height: 52mm;
  }
}
@media print and (max-width: 150mm) {
  .ckp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ckp-keys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ckp-score {
    flex-direction: column;
    align-items: flex-start;
  }
  .ckp-due {
    columns: 1;
  }
}

/* Life cycle: phase band on the chantier page, phase blocks in the cockpit. */
:root {
  --st-phase: #7045a7;
}
.st-phase {
  background: var(--st-phase);
}
.fc-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.fc-step {
  padding: 14px 16px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.fc-step:first-child {
  border-left: 0;
}
.fc-step .n {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.fc-step .n i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}
.fc-step.done .n i {
  background: var(--green);
  color: #fff;
}
.fc-step.now {
  background: var(--lavender);
}
.fc-step.now .n i {
  background: var(--purple);
  color: #fff;
}
.fc-step small {
  color: var(--muted);
  font-size: 11.5px;
}
.fc-step > b {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.fc-step .state {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
}
.fc-step.done .state {
  color: var(--green);
}
.fc-step.now .state {
  color: var(--purple-dark);
}
.fc-step .state.late {
  color: var(--red);
}
.fc-step .text-btn {
  align-self: flex-start;
  font-size: 12px;
}
.fc-calc {
  margin-bottom: 14px;
}
.fc-big {
  font-size: 34px;
  letter-spacing: -1.2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fc-big small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 3px;
}
.fc-prog {
  display: flex;
  gap: 2px;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-2);
}
.fc-prog i {
  display: block;
  height: 100%;
  background: var(--purple);
}
.fc-prog i.d {
  background: var(--green);
}
.fc-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--ink-2);
}
.fc-parts b {
  color: var(--ink);
}
.fc-gate {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.fc-gate p {
  color: var(--ink-2);
  font-size: 13px;
  flex: 1;
  min-width: 200px;
}
.ck-adopt {
  background: var(--lavender);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ck-adopt > div {
  flex: 1;
  min-width: 240px;
}
.ck-adopt p {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 2px;
}
.ck-funnel li,
.ck-dur li {
  grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) minmax(70px, auto);
}
.ck-funnel b,
.ck-dur b {
  font-size: 12px;
  white-space: nowrap;
}
.ck-htrack.tall {
  height: 22px;
  border-radius: 6px;
}
.ck-htrack.tall i {
  display: grid;
  align-items: center;
  padding-left: 8px;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  border-radius: 6px;
}
.ck-htrack.mark {
  position: relative;
  overflow: visible;
  height: 10px;
}
.ck-htrack.mark em {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: 2px;
  background: var(--ink);
}
.ck-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ck-facts > div {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.ck-facts small,
.ck-facts span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.ck-facts strong {
  font-size: 20px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.ck-table {
  width: 100%;
}
.ck-table .ck-bar {
  margin-top: 5px;
  height: 6px;
}
@media (max-width: 1000px) {
  .fc-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .fc-step {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .fc-step:first-child {
    border-top: 0;
  }
}

/* Printed cockpit, second design: two sheets, four large indicators, no score. */
@media print {
  body.report-view .ck-print {
    font:
      9pt/1.4 'Segoe UI',
      Arial,
      sans-serif;
  }
  .ckp-page {
    display: flex;
    flex-direction: column;
    gap: 4.5mm;
    break-after: page;
  }
  .ckp-page:last-child {
    break-after: auto;
  }
  .ckp-top {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .ckp-top small {
    display: block;
    font-size: 7.5pt;
    letter-spacing: 1.4pt;
    text-transform: uppercase;
    color: #8a93a8;
    font-weight: 650;
  }
  .ckp-top h1 {
    font-size: 22pt;
    letter-spacing: -0.6pt;
  }
  .ckp-top p {
    font-size: 8.5pt;
    max-width: 60%;
  }
  .ck-print h2 {
    font-size: 7.5pt;
    letter-spacing: 1pt;
    text-transform: uppercase;
    color: #8a93a8;
    font-weight: 650;
    margin: 0;
  }
  .ckp-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4mm;
  }
  .ckp-kpi {
    background: #f6f5fb;
    border-radius: 4mm;
    padding: 4.5mm 5mm;
    display: flex;
    flex-direction: column;
    gap: 2mm;
    min-width: 0;
    break-inside: avoid;
  }
  .ckp-body {
    display: flex;
    align-items: center;
    gap: 4mm;
    min-height: 19mm;
  }
  .ckp-body strong {
    font-size: 32pt;
    font-weight: 700;
    letter-spacing: -1.2pt;
    line-height: 1;
    color: #141b33;
  }
  .ckp-body strong small {
    font-size: 13pt;
    font-weight: 600;
    color: #8a93a8;
    margin-left: 1mm;
    letter-spacing: 0;
  }
  .ckp-body strong.ckp-date {
    font-size: 24pt;
    letter-spacing: -0.8pt;
  }
  .ckp-kpi.crit .ckp-body strong {
    color: #c8475b;
  }
  .ckp-kpi p {
    color: #4b556d;
    font-size: 8.5pt;
  }
  .ckp-kpi p b {
    color: #141b33;
  }
  .ckp-trend {
    color: #8a93a8 !important;
    font-size: 8pt !important;
  }
  .ckp-trend b {
    color: #c8475b !important;
  }
  .ckp-trend b.up {
    color: #178562 !important;
  }
  .ckp-donut {
    width: 19mm;
    height: 19mm;
    flex: none;
    transform: rotate(-90deg);
    max-height: none !important;
  }
  .ckp-donut circle {
    fill: none;
    stroke-width: 9;
  }
  .ckp-donut .track {
    stroke: #e3e1ee;
  }
  .ckp-donut .value {
    stroke-linecap: round;
    stroke: #7045a7;
  }
  .ckp-donut .value.crit {
    stroke: #c8475b;
  }
  .ckp-bullet {
    position: relative;
    height: 2.6mm;
    border-radius: 1.3mm;
    background: #e3e1ee;
    margin: 1mm 0;
  }
  .ckp-bullet i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 1.3mm;
    background: #7045a7;
  }
  .ckp-bullet em {
    position: absolute;
    top: -1.2mm;
    bottom: -1.2mm;
    width: 0.8mm;
    border-radius: 0.4mm;
    background: #eb6834;
  }
  .ckp-grid {
    gap: 6mm;
  }
  .ckp-grid.main {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
  .ckp-grid.cols {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
  .ckp-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ckp-box {
    border: 0;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 2mm;
  }
  .ckp-hd > span {
    font-size: 8pt;
  }
  .ck-print svg {
    max-height: 70mm;
  }
  .ckp-sect td {
    padding: 2mm 3mm 2mm 0;
    font-size: 9pt;
  }
  .ckp-sect td:first-child {
    font-weight: 600;
  }
  .ckp-sect td:nth-child(3) {
    color: #141b33;
    font-weight: 650;
  }
  .ckp-sect td.ok {
    color: #178562;
  }
  .ckp-sect td.wait {
    color: #8a93a8;
    font-weight: 400;
  }
  .ckp-bar {
    height: 2.2mm;
    border-radius: 1.1mm;
    background: #e9e7f2;
    overflow: hidden;
  }
  .ckp-bar i {
    display: block;
    height: 100%;
    border-radius: 1.1mm;
    background: #7045a7;
  }
  .ckp-bar i.full {
    background: #178562;
  }
  .ckp-note {
    color: #8a93a8;
    font-size: 8pt;
  }
  .ckp-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 3mm 10mm;
    border-top: 0.5pt solid #e6e8f0;
    padding-top: 3.5mm;
  }
  .ckp-strip div {
    display: flex;
    align-items: baseline;
    gap: 2.5mm;
  }
  .ckp-strip b {
    font-size: 16pt;
    letter-spacing: -0.4pt;
  }
  .ckp-strip span {
    color: #4b556d;
    font-size: 8.5pt;
  }
  .ck-print footer {
    display: flex;
    justify-content: space-between;
    gap: 6mm;
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
    font-size: 7pt;
  }
  .ckp-table {
    font-size: 8.5pt;
  }
  .ckp-table th.r,
  .ckp-table td.r,
  .ckp-table td.n {
    text-align: right;
  }
  .ckp-table td.n {
    font-weight: 650;
  }
  .ckp-table td small {
    display: block;
    color: #8a93a8;
    font-size: 7.5pt;
  }
  .ckp-due.one {
    columns: 1;
  }
}
@media print and (max-width: 220mm) {
  .ckp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ckp-grid.main,
  .ckp-grid.cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .ckp-top p {
    max-width: 50%;
  }
}
@media print and (max-width: 150mm) {
  .ckp-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .ck-print svg.ckp-donut {
    width: 19mm;
    height: 19mm;
  }
  .ckp-grid.pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ckp-page {
    break-inside: avoid;
  }
}

@media print {
  .ckp-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media print and (max-width: 150mm) {
  .ckp-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A reported chantier is marked as such instead of being counted late. */
.badge.reported {
  background: #f5f0ff;
  color: #7551b6;
}

/* Six key figures: finished chantiers and overall progress are two separate numbers. */
.ck-row.tiles {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1250px) {
  .ck-row.tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .ck-row.tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print {
  .ckp-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media print and (max-width: 220mm) {
  .ckp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print and (max-width: 150mm) {
  .ckp-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  /* compact one-line rows so the synthesis sheet stays on one page */
  .ckp-table td {
    padding: 1mm 2mm 1mm 0;
  }
  .ckp-table.tight {
    font-size: 8pt;
  }
  .ckp-table td.late {
    color: #c8475b;
    font-weight: 650;
  }
  .ckp-frise {
    height: 19mm;
  }
}

@media print {
  /* Synthesis sheet: a strict 2 x 2 grid of blocks built the same way. */
  .ckp-quad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6mm 9mm;
    align-items: start;
  }
  .ckp-blk {
    --tone: #1b1f3a;
    border-top: 0.6mm solid var(--tone);
    padding-top: 2mm;
    min-width: 0;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .ckp-blk.late {
    --tone: #c8475b;
  }
  .ckp-blk.report {
    --tone: #c77a12;
  }
  .ckp-blk.run {
    --tone: #6f45a8;
  }
  .ckp-blk.next {
    --tone: #2f62c4;
  }
  .ckp-bh {
    display: flex;
    align-items: baseline;
    gap: 2.5mm;
    margin-bottom: 1.5mm;
  }
  .ckp-bh strong {
    font-size: 18pt;
    line-height: 1;
    font-weight: 700;
    color: var(--tone);
  }
  .ck-print .ckp-bh h2 {
    margin: 0;
    font-size: 8pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1b1f3a;
  }
  .ckp-bh span {
    margin-left: auto;
    color: #9a9db0;
    font-size: 7.5pt;
  }
  .ck-print .ckp-list {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8.5pt;
    font-variant-numeric: tabular-nums;
  }
  .ck-print .ckp-list th {
    text-align: left;
    font-size: 7pt;
    font-weight: 600;
    color: #9a9db0;
    background: none;
    padding: 0 2mm 1mm 0;
    border-bottom: 0.2mm solid #e4e3ec;
    white-space: nowrap;
  }
  .ck-print .ckp-list td {
    padding: 0.9mm 2mm 0.9mm 0;
    border-bottom: 0.2mm solid #e4e3ec;
    vertical-align: middle;
    white-space: nowrap;
    color: #1b1f3a;
  }
  .ck-print .ckp-list th.r,
  .ck-print .ckp-list td.r {
    text-align: right;
    padding-right: 0;
  }
  .ckp-list td.t b,
  .ckp-list td.t small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ckp-list td.t b {
    font-weight: 650;
  }
  .ckp-list td.t small {
    color: #9a9db0;
    font-size: 7pt;
  }
  .ckp-list .c-d {
    width: 17mm;
  }
  .ckp-list .c-n {
    width: 23mm;
  }
  .ckp-list .c-e {
    width: 15mm;
  }
  .ckp-list .c-p {
    width: 31mm;
  }
  .ck-print .ckp-list td.old {
    color: #5d6279;
  }
  .ck-print .ckp-list td.bad {
    color: #c8475b;
    font-weight: 650;
  }
  .ckp-list td.val {
    font-weight: 700;
  }
  .ck-print .ckp-blk.late td.val {
    color: #c8475b;
  }
  .ckp-list em {
    color: #9a9db0;
    font-size: 7.5pt;
  }
  .ckp-prog {
    display: inline-flex;
    align-items: center;
    gap: 2mm;
  }
  .ckp-prog i {
    display: block;
    width: 16mm;
    height: 1.3mm;
    border-radius: 1mm;
    background: #e6e4ee;
    overflow: hidden;
  }
  .ckp-prog u {
    display: block;
    height: 100%;
    background: var(--tone);
    border-radius: 1mm;
  }
  .ckp-prog b {
    min-width: 8mm;
    text-align: right;
    font-weight: 700;
  }
  .ckp-more {
    margin: 1.2mm 0 0;
    color: #9a9db0;
    font-size: 7.5pt;
  }
}
@media print and (max-width: 220mm) {
  .ckp-quad {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media print {
  .ck-print .ckp-list td,
  .ck-print .ckp-list th {
    height: auto;
    line-height: 1.25;
  }
  .ck-print .ckp-list td.t b,
  .ck-print .ckp-list td.t small {
    margin: 0;
    padding: 0;
    line-height: 1.25;
  }
  .ck-print .ckp-list td {
    padding-top: 0.7mm;
    padding-bottom: 0.7mm;
  }
}
