/* Tests de mariage — questionnaire, progression et bilan. */
.page-tests .tests-guide,
.page-tests .tests-questionnaire,
.page-tests .tests-result {
  width: min(1040px,calc(100% - 40px));
  box-sizing: border-box;
  margin: 0 auto 56px;
}
.page-tests .tests-guide {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
}
.page-tests .tests-guide > div {
  padding: 24px;
  border: 1px solid #756184;
  border-radius: 22px;
  background: #182445;
}
html body.page-tests main .tests-guide h3,
html body.page-tests main .tests-group-heading h3 {
  color: #f4ca92 !important;
  font-family: var(--police-titres);
  text-shadow: none !important;
}
.page-tests .tests-guide p,
.page-tests .tests-lead,
.page-tests .tests-group > p {
  color: #d7deee;
  line-height: 1.8;
}
.page-tests .tests-progress {
  padding: 24px;
  margin: 28px 0;
  border: 1px solid #bb9362;
  border-radius: 22px;
  background: #243151;
  color: #fff;
}
.page-tests .tests-progress label {
  display: block;
  margin-bottom: 16px;
  font-weight: 700;
}
.page-tests progress {
  width: 100%;
  height: 12px;
  accent-color: #ed80ae;
}
.page-tests .tests-progress p:empty {
  display: none;
}
.page-tests .tests-group {
  margin-bottom: 40px;
}
.page-tests .tests-group-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-tests .tests-group-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border: 1px solid #d9b779;
  border-radius: 50%;
  color: #f2c487;
  font-weight: 700;
}
.page-tests .tests-question {
  min-width: 0;
  padding: 24px;
  margin: 30px 0;
  border: 1px solid #cba772;
  border-radius: 22px;
  background: linear-gradient(135deg,#fff9ef,#f9e9ed);
  color: #402938;
}
.page-tests .tests-question legend {
  float: left;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
  padding: 0;
  font-family: var(--police-texte);
  font-weight: 700;
  line-height: 1.7;
}
.page-tests .tests-choices {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.page-tests .tests-choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #b58b9b;
  border-radius: 999px;
  background: #fffdfa;
  font-family: var(--police-texte);
  cursor: pointer;
}
.page-tests .tests-choices label:has(input:checked) {
  border-color: #93436a;
  background: #f2d4e2;
  box-shadow: 0 0 0 1px #93436a;
}
.page-tests input[type=radio] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: #943b65;
}
.page-tests .tests-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.page-tests .tests-questionnaire .fp-button:not(.primary) {
  color: #ffdfb7;
}
.page-tests #tests-form-status {
  color: #ffcb97;
  min-height: 1.6em;
}
.page-tests .tests-result {
  padding: 36px;
  border: 1px solid #cea361;
  border-radius: 28px;
  background: linear-gradient(145deg,#fff8ed,#f7e4eb);
  color: #432938;
  scroll-margin-top: 100px;
}
html body.page-tests main .tests-result h2,
html body.page-tests main .tests-result h3 {
  color: #542e45 !important;
  font-family: var(--police-titres);
  text-shadow: none !important;
}
.page-tests .tests-result p {
  line-height: 1.8;
  color: #503442;
}
.page-tests .tests-result-themes {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin: 28px 0;
}
.page-tests .tests-result-themes > div {
  padding: 22px;
  border: 1px solid #cbaeb8;
  border-radius: 18px;
  background: #fffaf5;
}
.page-tests .tests-result-themes h3 {
  margin-top: 0;
  font-size: 1.2rem;
}
.page-tests .tests-result-themes > div:last-child {
  grid-column: 1/-1;
}
.page-tests :is(button,input):focus-visible {
  outline: 3px solid #dd709f;
  outline-offset: 4px;
}
.page-tests .tests-result:focus-visible {
  outline: 3px solid #dd709f;
  outline-offset: 5px;
}
.page-tests button:disabled {
  opacity: .6;
  cursor: default;
}
@media (max-width: 700px) {
  .page-tests .tests-guide,
  .page-tests .tests-result-themes {
    grid-template-columns: minmax(0,1fr);
  }
  .page-tests .tests-result {
    padding: 26px 20px;
  }
}
@media (max-width: 500px) {
  .page-tests .tests-guide,
  .page-tests .tests-questionnaire,
  .page-tests .tests-result {
    width: calc(100% - 32px);
  }
  .page-tests .tests-question {
    padding: 22px 16px;
  }
  .page-tests .tests-choices {
    flex-direction: column;
  }
  .page-tests .tests-actions .fp-button {
    flex: 1 1 auto;
  }
}
@media print {
  @page { margin: 18mm; }
  body.tests-print,
  body.tests-print main {
    background: white !important;
  }
  body.tests-print > :not(main),
  body.tests-print main > :not(.tests-result),
  body.tests-print .tests-actions,
  body.tests-print #tests-copy-status {
    display: none !important;
  }
  body.tests-print .tests-result {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: white;
  }
  body.tests-print .tests-result-themes {
    display: block;
  }
  body.tests-print .tests-result-themes > div {
    margin: 16px 0;
    break-inside: avoid;
  }
}
