/* Espace outils — laboratoire privé avant validation. */
:root {
  --profile-intense: #ffd51f;
  --profile-prudent: #3b82f6;
  --profile-atypique: #45de72;
  --profile-strategique: #ff2534;
}

.tools-page {
  --tool-accent: var(--white);
}

.tools-page [hidden] {
  display: none !important;
}

.tools-main {
  min-height: 70vh;
  padding-block: clamp(34px, 7vw, 86px) clamp(70px, 10vw, 124px);
}

.tools-narrow {
  width: min(820px, calc(100% - 40px));
  margin-inline: auto;
}

.tools-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: color var(--t-fast) ease, transform var(--t-fast) ease;
}

.tools-back:hover,
.tools-back:focus-visible {
  color: var(--green);
  transform: translateX(-3px);
}

.tools-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tools-kicker::before {
  width: 24px;
  height: 3px;
  background: var(--green);
  content: "";
}

.tools-hero {
  max-width: 850px;
}

.tools-hero h1,
.quiz-intro-card h1,
.maker-intro h1 {
  max-width: 800px;
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 7.2vw, 78px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.tools-hero h1 em {
  color: var(--red);
  font-style: normal;
}

.tools-lede {
  max-width: 700px;
  margin: 24px 0 0;
  color: #d9ddd8;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 720;
  letter-spacing: -0.018em;
  line-height: 1.5;
}

.tools-promise {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  border: 1px solid rgba(121, 255, 19, 0.32);
  border-radius: 999px;
  background: rgba(121, 255, 19, 0.06);
  padding: 9px 13px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(44px, 7vw, 72px);
}

.tool-card {
  --card-accent: var(--white);
  position: relative;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(245, 247, 242, 0.19);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 42%),
    var(--panel);
  padding: clamp(24px, 4vw, 38px);
  transition: transform var(--t-med) var(--ease-trail), border-color var(--t-fast) ease, box-shadow var(--t-med) ease;
}

.tool-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--card-accent);
  content: "";
}

.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-accent) 72%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.tool-card--quiz {
  --card-accent: var(--red);
}

.tool-card--map {
  --card-accent: var(--green);
}

.tool-card--map h2 {
  font-size: clamp(25px, 3vw, 37px);
  line-height: 1.04;
}

.tool-card--guide {
  --card-accent: var(--gold);
  min-height: 250px;
  grid-column: 1 / -1;
}

.tool-card--guide h2,
.tool-card--guide p {
  max-width: 760px;
}

.tool-card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 54%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card-accent) 10%, transparent);
  font-size: 28px;
}

.tool-card-meta {
  margin-top: 25px;
  color: var(--card-accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-card h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3.5vw, 43px);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
}

.tool-card p {
  margin: 17px 0 28px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 670;
  line-height: 1.5;
}

.tool-card-action,
.tools-primary-button,
.quiz-next,
.maker-next,
.maker-restart {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  padding: 0 18px;
  color: var(--black);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, opacity var(--t-fast) ease;
}

.tool-card-action {
  margin-top: auto;
}

.tool-card-action--placeholder:disabled {
  width: fit-content;
  cursor: default;
  opacity: 0.66;
  transform: none;
  box-shadow: none;
}

.tool-card-action:hover,
.tool-card-action:focus-visible,
.tools-primary-button:hover,
.tools-primary-button:focus-visible,
.quiz-next:hover,
.quiz-next:focus-visible,
.maker-next:hover,
.maker-next:focus-visible,
.maker-restart:hover,
.maker-restart:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(245, 247, 242, 0.15);
}

.profile-dots {
  display: flex;
  gap: 6px;
  margin-top: 19px;
}

.profile-dots span {
  width: 22px;
  height: 5px;
  border-radius: 999px;
}

.profile-dots span:nth-child(1) { background: var(--profile-intense); }
.profile-dots span:nth-child(2) { background: var(--profile-prudent); }
.profile-dots span:nth-child(3) { background: var(--profile-atypique); }
.profile-dots span:nth-child(4) { background: var(--profile-strategique); }

.tools-lab-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  border: 1px dashed rgba(245, 247, 242, 0.25);
  border-radius: 18px;
  padding: 24px;
}

.tools-lab-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.tools-lab-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.tools-feedback-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--white);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}

.tools-feedback-link:hover,
.tools-feedback-link:focus-visible {
  background: var(--white);
  color: var(--black);
}

/* Quiz */
.quiz-shell {
  --profile-color: var(--red);
}

.quiz-intro-card,
.quiz-stage,
.quiz-result,
.maker-panel,
.maker-result {
  border: 1px solid rgba(245, 247, 242, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 37, 52, 0.08), transparent 24rem),
    var(--panel);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.quiz-intro-card h1,
.maker-intro h1 {
  font-size: clamp(38px, 6.5vw, 68px);
}

.quiz-intro-card p,
.maker-intro p {
  max-width: 650px;
  margin: 20px 0 0;
  color: #d9ddd8;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 650;
  line-height: 1.55;
}

.quiz-intro-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.quiz-intro-list li {
  border: 1px solid rgba(245, 247, 242, 0.12);
  border-radius: 12px;
  background: rgba(5, 7, 6, 0.62);
  padding: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.quiz-disclaimer,
.maker-privacy {
  margin: 17px 0 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.quiz-stage {
  min-height: 590px;
}

.quiz-progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-progress {
  width: 100%;
  height: 6px;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #262b27;
}

.quiz-progress::-webkit-progress-bar {
  background: #262b27;
}

.quiz-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--red));
}

.quiz-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--red));
}

.quiz-question {
  margin: 37px 0 24px;
  color: var(--white);
  font-size: clamp(25px, 4vw, 39px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.quiz-context {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.quiz-answers,
.maker-choices {
  display: grid;
  gap: 10px;
}

.quiz-answer,
.maker-choice {
  width: 100%;
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(245, 247, 242, 0.14);
  border-radius: 14px;
  background: rgba(5, 7, 6, 0.7);
  padding: 14px 16px;
  color: var(--white);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: transform var(--t-fast) ease, border-color var(--t-fast) ease, background var(--t-fast) ease;
}

.quiz-answer::before,
.maker-choice::before {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 247, 242, 0.36);
  border-radius: 50%;
  color: var(--black);
  content: "";
}

.quiz-answer:hover,
.quiz-answer:focus-visible,
.maker-choice:hover,
.maker-choice:focus-visible {
  transform: translateX(3px);
  border-color: rgba(121, 255, 19, 0.65);
}

.quiz-answer.is-selected,
.maker-choice.is-selected {
  border-color: var(--green);
  background: rgba(121, 255, 19, 0.09);
}

.quiz-answer.is-selected::before,
.maker-choice.is-selected::before {
  background: var(--green);
  box-shadow: inset 0 0 0 5px var(--panel);
}

.quiz-actions,
.maker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.quiz-previous,
.maker-previous {
  min-height: 46px;
  border: 0;
  background: transparent;
  padding: 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.quiz-previous:hover,
.quiz-previous:focus-visible,
.maker-previous:hover,
.maker-previous:focus-visible {
  color: var(--white);
}

.quiz-next:disabled,
.maker-next:disabled {
  cursor: not-allowed;
  opacity: 0.32;
  transform: none;
  box-shadow: none;
}

.quiz-result {
  --profile-color: var(--profile-strategique);
  border-color: color-mix(in srgb, var(--profile-color) 48%, transparent);
  background:
    radial-gradient(circle at 88% 7%, color-mix(in srgb, var(--profile-color) 13%, transparent), transparent 25rem),
    var(--panel);
}

.result-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: clamp(24px, 5vw, 52px);
}

.result-kicker {
  margin: 0 0 10px;
  color: var(--profile-color);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.result-name {
  margin: 0;
  font-size: clamp(40px, 7.6vw, 72px);
  font-weight: 950;
  letter-spacing: -0.068em;
  line-height: 0.92;
}

.result-tagline {
  margin: 18px 0 0;
  color: #dfe3dd;
  font-size: clamp(17px, 2.3vw, 21px);
  font-weight: 740;
  line-height: 1.45;
}

.result-backpack {
  width: 180px;
  height: 206px;
  display: grid;
  place-items: center;
  color: var(--profile-color);
  filter: drop-shadow(0 18px 26px color-mix(in srgb, var(--profile-color) 18%, transparent));
  animation: backpack-breathe 4.8s ease-in-out infinite;
}

.result-backpack svg {
  width: 100%;
  height: 100%;
}

.result-backpack .bag-fill {
  fill: color-mix(in srgb, var(--profile-color) 24%, #101411);
  stroke: currentColor;
  stroke-width: 4;
}

.result-backpack .bag-detail,
.result-backpack .bag-strap {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.result-backpack .bag-badge {
  fill: currentColor;
}

@keyframes backpack-breathe {
  50% { transform: translateY(-4px) rotate(0.4deg); }
}

.result-secondary {
  margin: 29px 0 0;
  border-left: 3px solid var(--profile-color);
  padding: 3px 0 3px 15px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.result-secondary strong {
  color: var(--white);
}

.result-affinities {
  display: grid;
  gap: 9px;
  margin-top: 30px;
}

.affinity-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.affinity-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #282d29;
}

.affinity-value {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--bar-color);
  transform-origin: left;
  animation: affinity-grow 700ms var(--ease-trail) both;
}

@keyframes affinity-grow {
  from { transform: scaleX(0); }
}

.result-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.result-section {
  border: 1px solid rgba(245, 247, 242, 0.13);
  border-radius: 16px;
  background: rgba(5, 7, 6, 0.58);
  padding: 20px;
}

.result-section h3 {
  margin: 0 0 10px;
  color: var(--profile-color);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.result-section p {
  margin: 0;
  color: #d2d7d1;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.52;
}

.result-message {
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--profile-color) 33%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--profile-color) 7%, transparent);
  padding: clamp(20px, 3.5vw, 30px);
}

.result-message h3,
.result-spots h3 {
  margin: 0 0 11px;
  font-size: clamp(22px, 3vw, 31px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.result-message p {
  margin: 0;
  color: #e0e5df;
  font-size: 16px;
  font-weight: 670;
  line-height: 1.6;
}

.result-spots {
  margin-top: 38px;
}

.result-spots-intro {
  margin: -3px 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.result-spot-grid,
.maker-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.result-spot,
.maker-route-card {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(245, 247, 242, 0.14);
  border-radius: 14px;
  background: rgba(5, 7, 6, 0.72);
  padding: 17px;
  transition: transform var(--t-fast) ease, border-color var(--t-fast) ease;
}

.result-spot:hover,
.result-spot:focus-visible,
.maker-route-card:hover,
.maker-route-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--profile-color, var(--green));
}

.result-spot small,
.maker-route-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-spot strong,
.maker-route-card strong {
  margin: 8px 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.result-spot span,
.maker-route-card span {
  margin-top: auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.result-restart,
.result-feedback {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--white);
  border-radius: 12px;
  background: var(--white);
  padding: 0 17px;
  color: var(--black);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.result-feedback {
  background: transparent;
  color: var(--white);
}

/* Générateur simplifié */
.maker-intro {
  margin-bottom: 28px;
}

.maker-progress {
  display: flex;
  gap: 7px;
  margin-bottom: 29px;
}

.maker-progress span {
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: #2b302c;
}

.maker-progress span.is-active,
.maker-progress span.is-done {
  background: var(--green);
}

.maker-step-label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.maker-question {
  margin: 0 0 9px;
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.maker-help {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.maker-choices--tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maker-choice {
  min-height: 76px;
}

.maker-result {
  --profile-color: var(--green);
  border-color: rgba(121, 255, 19, 0.32);
  background:
    radial-gradient(circle at 88% 5%, rgba(121, 255, 19, 0.09), transparent 24rem),
    var(--panel);
}

.maker-result h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 950;
  letter-spacing: -0.062em;
  line-height: 0.96;
}

.maker-result-lede {
  max-width: 670px;
  margin: 18px 0 28px;
  color: #d9ddd8;
  font-size: 17px;
  font-weight: 680;
  line-height: 1.5;
}

.maker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.maker-summary span {
  border: 1px solid rgba(121, 255, 19, 0.35);
  border-radius: 999px;
  background: rgba(121, 255, 19, 0.06);
  padding: 8px 11px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.maker-route-card:first-child {
  border-color: var(--green);
}

.maker-route-card:first-child small::before {
  content: "PLAN A · ";
  color: var(--green);
}

.maker-checklist {
  margin-top: 30px;
  border: 1px solid rgba(245, 247, 242, 0.14);
  border-radius: 16px;
  background: rgba(5, 7, 6, 0.55);
  padding: 22px;
}

.maker-checklist h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.maker-checklist ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.maker-checklist li {
  position: relative;
  padding-left: 22px;
  color: #d1d6d0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.maker-checklist li::before {
  position: absolute;
  left: 0;
  color: var(--green);
  content: "✓";
  font-weight: 950;
}

.maker-warning {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .tools-grid,
  .result-sections,
  .result-spot-grid,
  .maker-route-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 330px;
  }

  .tools-lab-note,
  .result-identity {
    grid-template-columns: 1fr;
  }

  .result-backpack {
    grid-row: 1;
    width: 135px;
    height: 155px;
  }

  .result-sections {
    gap: 9px;
  }
}

@media (max-width: 620px) {
  .tools-main {
    padding-top: 25px;
  }

  .tools-narrow {
    width: min(100% - 24px, 820px);
  }

  .quiz-intro-card,
  .quiz-stage,
  .quiz-result,
  .maker-panel,
  .maker-result {
    border-radius: 18px;
    padding: 22px 17px;
  }

  .quiz-intro-list,
  .maker-choices--tiles,
  .maker-checklist ul {
    grid-template-columns: 1fr;
  }

  .quiz-stage {
    min-height: 610px;
  }

  .quiz-question {
    margin-top: 28px;
  }

  .quiz-answer,
  .maker-choice {
    min-height: 66px;
    padding: 12px 13px;
    font-size: 14px;
  }

  .quiz-actions,
  .maker-actions {
    align-items: stretch;
  }

  .quiz-next,
  .maker-next {
    flex: 1;
  }

  .affinity-row {
    grid-template-columns: 82px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .result-actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .result-backpack,
  .affinity-value {
    animation: none;
    transition: none;
  }
}
