﻿:root {
  --blue: #0a3eb1;
  --blue-dark: #062b82;
  --yellow: #f5b700;
  --yellow-soft: #fff8df;
  --green: #2f9e44;
  --green-soft: #eefaf1;
  --ink: #17213a;
  --muted: #636b78;
  --line: #e3e8f2;
  --bg: #fffdf7;
  --white: #fff;
  --shadow: 0 18px 44px rgba(10, 62, 177, .08);
  font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 16% 0, #fff 0, #fff 36%, var(--yellow-soft) 100%);
  color: var(--ink);
  line-height: 1.5;
}
button, input, select { font: inherit; }
.kp-tunnel { min-height: 100vh; }

.kp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(10,62,177,.06);
  backdrop-filter: blur(10px);
}
.kp-header__inner {
  max-width: 1240px;
  margin: auto;
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 28px;
}
.kp-logo { grid-column: 2; }
.kp-logo img { display: block; height: 45px; width: auto; }
.kp-header__tools {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.kp-language-select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 14px;
  font-weight: 850;
}
.kp-help { position: relative; }
.kp-help summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-weight: 900;
}
.kp-help summary::-webkit-details-marker { display: none; }
.kp-help summary span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow-soft);
  color: var(--blue);
  border: 1px solid #ffe08a;
}
.kp-help__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(300px, 88vw);
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.kp-help__panel a { color: var(--blue); font-weight: 900; text-decoration: none; }
.kp-help__panel small { color: var(--muted); }

.kp-progress { max-width: 1040px; margin: 0 auto; padding: 28px 24px 10px; }
.kp-steps { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; list-style: none; }
.kp-step { position: relative; text-align: center; color: #788090; font-weight: 850; }
.kp-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 58%;
  right: -42%;
  height: 3px;
  background: #d5dbe6;
}
.kp-step span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border: 2px solid #cfd6e2;
  border-radius: 50%;
  background: #fff;
}
.kp-step.is-done { color: var(--green); }
.kp-step.is-done span { border-color: var(--green); background: var(--green); color: #fff; }
.kp-step.is-done:not(:last-child)::after { background: var(--green); }
.kp-step--active { color: var(--blue); }
.kp-step--active span { border-color: var(--blue); background: #fff; color: var(--blue); box-shadow: 0 0 0 5px rgba(10,62,177,.08); }
.kp-step--active:not(:last-child)::after { background: linear-gradient(90deg, var(--blue), #d5dbe6); }

.kp-intro { text-align: center; max-width: 850px; margin: 0 auto; padding: 16px 24px 20px; }
.kp-intro h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin: 0 0 10px; }
.kp-intro p { margin: 0 auto; color: var(--muted); font-size: 19px; }
.kp-time {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #ffe08a;
  background: var(--yellow-soft);
  color: var(--blue);
  font-weight: 900;
}

.kp-flow { max-width: 1240px; margin: auto; padding: 0 28px 36px; }
.kp-screen { display: none; }
.kp-screen.is-active { display: block; }
.kp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.kp-panel, .kp-trust article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.kp-panel { padding: 28px; }
.kp-panel h2 { margin: 0 0 8px; font-size: clamp(26px, 3.5vw, 38px); line-height: 1.12; }
.kp-muted { color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.kp-fields { display: grid; gap: 16px; }
.kp-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kp-fields .wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 900; }
label small { color: var(--muted); font-weight: 750; }
input {
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  background: #fff;
}
input:focus, select:focus {
  outline: 4px solid rgba(10,62,177,.14);
  border-color: var(--blue);
}
.kp-error { color: #c52222; font-weight: 900; }
.kp-trust { display: grid; gap: 16px; }
.kp-trust article { padding: 20px; border-color: #d8efd9; background: linear-gradient(180deg, #fff, var(--green-soft)); }
.kp-trust strong { display: block; margin-bottom: 4px; font-size: 18px; }
.kp-trust span { color: var(--muted); }

.kp-status-grid, .kp-formula-grid, .kp-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kp-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.kp-choice, .kp-formula, .kp-examples button {
  position: relative;
  min-height: 116px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(24,31,42,.05);
}
.kp-formula {
  overflow: hidden;
  min-height: 245px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,223,.72)),
    radial-gradient(circle at 88% 0, rgba(245,183,0,.20), transparent 34%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.kp-formula:hover {
  transform: translateY(-2px);
  border-color: rgba(10,62,177,.34);
  box-shadow: 0 18px 38px rgba(10,62,177,.11);
}
.kp-formula--selected {
  background:
    linear-gradient(135deg, #fff 0%, #eefaf1 54%, #fff8df 100%),
    radial-gradient(circle at 88% 0, rgba(47,158,68,.22), transparent 36%);
}
.kp-formula--selected .kp-formula__icon {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.kp-examples button { min-height: auto; }
.kp-choice strong, .kp-formula strong, .kp-examples strong { display: block; font-size: 20px; }
.kp-choice span, .kp-formula small, .kp-examples span { display: block; color: var(--muted); font-weight: 750; }
.kp-choice--selected, .kp-formula--selected, .kp-formula-tabs button.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47,158,68,.15), 0 16px 34px rgba(24,31,42,.08);
}
.kp-choice--selected::after, .kp-formula--selected::after {
  content: "\2713";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 950;
}
.kp-range { margin-top: 20px; }
.kp-range input { height: auto; padding: 0; accent-color: var(--blue); }
.kp-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 16px 0 20px;
  padding: 18px;
  border-radius: 10px;
  background: var(--yellow-soft);
  border: 1px solid #ffe08a;
}
.kp-amount strong { font-size: 28px; color: var(--blue); }
.kp-formula__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff8df, #eefaf1);
  color: var(--blue);
  border: 1px solid rgba(245,183,0,.45);
  margin-bottom: 12px;
}
.kp-formula__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kp-formula em { display: block; margin-top: 12px; font-style: normal; color: var(--blue); font-weight: 900; }
.kp-formula__badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eefaf1;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
}
.kp-note { margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 8px; background: #f4f8ff; color: var(--muted); font-weight: 750; }

.kp-projection-editor {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) 1.2fr;
  gap: 16px;
  align-items: end;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}
.kp-projection-editor input { height: auto; padding: 0; accent-color: var(--blue); }
.kp-formula-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kp-formula-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 950;
  cursor: pointer;
}
.kp-summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); margin-bottom: 18px; }
.kp-summary-strip div { background: #fff; padding: 18px; }
.kp-summary-strip span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.kp-summary-strip strong { font-size: 20px; }
.kp-chart {
  position: relative;
  height: 280px;
  margin: 20px 0;
  padding: 18px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg,#fff,#fbfcff);
}
.kp-chart__axis {
  position: absolute;
  inset: 18px 18px 62px;
  background: repeating-linear-gradient(to top, transparent 0 48px, #eef2f8 49px 50px);
  border-bottom: 2px solid #d8deea;
}
.kp-chart__bars {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
}
.kp-chart__item { height: 100%; display: grid; grid-template-rows: auto 1fr auto auto; align-items: end; text-align: center; gap: 8px; }
.kp-chart__value { font-weight: 950; color: var(--blue); font-size: 14px; }
.kp-chart__bar { width: min(84px, 70%); min-height: 22px; margin: 0 auto; border-radius: 10px 10px 4px 4px; background: var(--blue); box-shadow: 0 12px 24px rgba(10,62,177,.18); transition: height .2s ease; }
.kp-chart__bar.scenario-careful { background: #79b7ff; }
.kp-chart__bar.scenario-normal { background: var(--blue); }
.kp-chart__bar.scenario-good { background: var(--green); }
.kp-chart__item strong { font-size: 14px; }
.kp-chart__item span { color: var(--muted); font-weight: 850; font-size: 13px; }
.kp-table-wrap { overflow: auto; }
.kp-projection-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
.kp-projection-table th, .kp-projection-table td { border: 1px solid var(--line); padding: 14px; text-align: left; }
.kp-projection-table th { background: #fbfcff; color: var(--muted); font-size: 13px; }
.scenario-careful { color: #2474c9; font-weight: 950; }
.scenario-normal { color: var(--blue); font-weight: 950; }
.scenario-good { color: var(--green); font-weight: 950; }

.kp-consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid rgba(47, 158, 68, .24); border-radius: 10px; background: linear-gradient(145deg, #ffffff 0%, #f7fff8 100%); box-shadow: 0 12px 28px rgba(18,24,38,.06); }
.kp-consent input { width: 22px; height: 22px; accent-color: var(--green); }
.kp-consent span { font-size: 14px; line-height: 1.48; font-weight: 800; }
.kp-consent a { color: var(--blue); font-weight: 950; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.kp-success { display: inline-flex; padding: 7px 12px; border-radius: 999px; border: 1px solid #d8efd9; background: var(--green-soft); color: var(--green); font-weight: 950; }
.kp-results { display: grid; gap: 14px; }
.kp-result {
  display: grid;
  grid-template-columns: 42px 128px minmax(180px, 1fr) repeat(4, minmax(82px, .55fr)) 150px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #fffdf7 52%, #f7fbff 100%);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(24,31,42,.06);
}
.kp-result--featured {
  border-color: rgba(47,158,68,.26);
  background: linear-gradient(135deg, #fff 0%, #eefaf1 45%, #fff8df 100%);
}
.kp-result__rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 950; }
.kp-result__logo { display: grid; place-items: center; min-height: 64px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; }
.kp-result__logo img { max-width: 108px; max-height: 42px; width: auto; height: auto; object-fit: contain; }
.kp-provider strong { display: block; font-size: 18px; }
.kp-provider span { display: block; color: var(--muted); font-size: 13px; }
.kp-provider__tag {
  display: inline-flex !important;
  width: fit-content;
  margin-bottom: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff4c7;
  color: #7b5800 !important;
  font-size: 11px !important;
  font-weight: 950;
}
.kp-score { font-size: 13px; }
.kp-score strong { display: block; color: var(--muted); font-size: 12px; }
.kp-score span { font-weight: 950; color: var(--blue); }
.kp-offer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #237835);
  text-decoration: none;
  font-weight: 950;
}
.kp-result-cta { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; margin-top: 20px; padding: 22px; border-radius: 10px; background: linear-gradient(135deg, var(--blue-dark), var(--blue) 58%, #0f7a39); color: #fff; }
.kp-result-cta span { display: block; color: #edf5ff; }
.kp-result-cta__buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kp-primary, .kp-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 8px;
  padding: 0 24px;
  font-weight: 950;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.kp-primary { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; }
.kp-primary:hover { filter: brightness(.96); }
.kp-primary--light { background: #fff; color: var(--blue); }
.kp-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.kp-secondary--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.kp-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.kp-actions [hidden] { display: none; }

/* Logo plus visible dans le tunnel 3e pilier */
.kp-logo img{height:64px!important;max-height:64px!important;width:auto!important;object-fit:contain!important}
@media(max-width:720px){.kp-logo img{height:52px!important;max-height:52px!important}}

@media (max-width: 1080px) {
  .kp-result { grid-template-columns: 42px 128px minmax(200px, 1fr) 150px; }
  .kp-score { display: none; }
}
@media (max-width: 900px) {
  .kp-header__inner { grid-template-columns: 1fr; padding: 12px 18px; gap: 10px; }
  .kp-logo { grid-column: auto; justify-self: center; }
  .kp-header__tools { grid-column: auto; justify-content: center; flex-wrap: wrap; }
  .kp-progress { overflow: auto; padding-top: 20px; }
  .kp-steps { min-width: 720px; }
  .kp-flow { padding: 0 16px 28px; }
  .kp-layout, .kp-fields.two, .kp-status-grid, .kp-formula-grid, .kp-examples, .kp-summary-strip, .kp-projection-editor, .kp-formula-tabs, .kp-result, .kp-result-cta { grid-template-columns: 1fr; }
  .kp-result { gap: 12px; }
  .kp-score { display: block; }
  .kp-actions { position: sticky; bottom: 0; background: rgba(255,253,247,.96); padding: 12px 0; }
  .kp-actions button { flex: 1; }
  .kp-panel { padding: 22px; }
  .kp-intro { text-align: left; }
  .kp-chart { height: 240px; }
}


/* Mobile full-width refinement */
@media (max-width: 720px) {
  html,
  body,
  .kp-tunnel {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .kp-header__inner,
  .kp-progress,
  .kp-intro,
  .kp-flow,
  .kp-panel,
  .kp-actions,
  .kp-result-cta,
  .kp-results-layout,
  .kp-result-card {
    width: 100% !important;
    max-width: none !important;
  }

  .kp-header__inner,
  .kp-progress,
  .kp-intro,
  .kp-flow {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .kp-panel,
  .kp-consent,
  .kp-trust article,
  .kp-note,
  .kp-result,
  .kp-result-cta {
    border-radius: 8px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .kp-actions {
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .kp-primary,
  .kp-secondary,
  .kp-next,
  .kp-prev,
  .kp-premium-cta {
    width: 100% !important;
  }

  .kp-steps {
    min-width: 0 !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .kp-step {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .kp-step span {
    width: 30px !important;
    height: 30px !important;
    margin-bottom: 5px !important;
  }

  .kp-step:not(:last-child)::after {
    top: 14px !important;
    left: 58% !important;
    right: -42% !important;
  }
}
