/* 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: 0.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;
  }
}

/* Sommaire : huit photographies d’origine et cartes de navigation. */
.page-tests .love-library {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 64px;
}
.page-tests .love-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.page-tests .love-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #756184;
  background: #182445;
}
.page-tests .love-card a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.page-tests .love-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.page-tests .love-card a > div {
  padding: 26px;
}
.page-tests .love-card h3 {
  font-family: var(--police-titres);
  color: #f4ca92;
}
.page-tests .love-card p {
  line-height: 1.8;
}
.page-tests .love-card a:hover,
.page-tests .love-card a:focus-visible {
  background: #243151;
}
.page-tests .love-hub-note {
  display: grid;
  grid-template-columns: 180px 1fr;
  text-align: left;
  gap: 30px;
  align-items: center;
  margin-top: 32px;
}
.page-tests .love-hub-note img {
  width: 100%;
  height: auto;
  border-radius: 24px;
}
.page-tests .love-hub h1 {
  margin-top: 16px;
}
.page-tests .citations-hero > img:not(.mobile-rubrique-image) {
  object-fit: cover;
  object-position: left center;
}
.page-tests .tests-result-themes > div:last-child {
  grid-column: auto;
}
.page-tests .tests-result-themes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.page-tests [hidden] {
  display: none !important;
}
.page-tests #questionnaire-title {
  scroll-margin-top: 100px;
}
@media (max-width: 700px) {
  .page-tests .love-grid,
  .page-tests .tests-result-themes {
    grid-template-columns: 1fr;
  }
  .page-tests .love-hub-note {
    grid-template-columns: 1fr;
  }
  .page-tests .love-hub-note img {
    width: 160px;
    margin: auto;
  }
  .page-tests .citations-hero .mobile-rubrique-image {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
@media print {
  body.tests-print .tests-result-themes {
    display: block;
  }
}

/* ===============================================================
   HEADER DU SOMMAIRE : MODÈLE PHOTO À GAUCHE, TITRE À DROITE
   =============================================================== */
@media (min-width: 761px) {
  html body.page-tests main .tests-hub-hero {
    min-height: 0;
    aspect-ratio: 12 / 5;
  }
  html body.page-tests main .tests-hub-hero > .mobile-rubrique-image {
    display: none;
  }
  html body.page-tests main .tests-hub-hero .citations-hero-copy {
    width: 38%;
    margin-right: 4%;
  }
  html body.page-tests main .tests-hub-hero h1 {
    font-size: clamp(2.25rem, 4.6vw, 4.5rem);
    line-height: 1.05;
  }
  html body.page-tests main .tests-hub-hero .citations-hero-copy > p {
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.6;
  }
}
.page-tests .tests-hub-hero .fp-button {
  margin-top: 16px;
}
@media (max-width: 760px) {
  html body.page-tests main .tests-hub-hero {
    min-height: 0;
    display: block;
  }
  html body.page-tests main .tests-hub-hero::after {
    display: none;
  }
  html body.page-tests main .tests-hub-hero > .mobile-rubrique-image {
    position: static;
    display: block;
  }
  html body.page-tests main .tests-hub-hero .citations-hero-copy {
    width: auto;
    margin: 0;
    padding: 28px 24px;
  }
}

/* ===============================================================
   HUIT TESTS : TITRES LONGS ET HEADERS PROPRES À CHAQUE THÈME
   =============================================================== */
@media (min-width: 761px) {
  html body.page-tests main .tests-detail-hero .citations-hero-copy {
    width: 40%;
  }
  html body.page-tests main .tests-detail-hero h1 {
    font-size: clamp(1.75rem, 3.3vw, 3.5rem);
    line-height: 1.1;
  }
  html body.page-tests main .tests-detail-hero > img:not(.mobile-rubrique-image) {
    object-fit: contain;
  }
}

/* =============================================================
   ENCADRÉS ILLUSTRÉS — sommaire et chapitres des questionnaires
   ============================================================= */
.page-tests .love-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}
.page-tests .love-card,
.page-tests .love-hub-note,
.page-tests .tests-chapter {
  border: 1px solid rgba(239, 199, 116, 0.55);
  border-radius: 28px;
  background: linear-gradient(125deg, #14263f, #111c32 70%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.page-tests .love-card > a,
.page-tests .love-hub-note,
.page-tests .tests-chapter {
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  padding: 24px;
}
.page-tests .love-card > a > img,
.page-tests .love-hub-note > img,
.page-tests .tests-chapter > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 945;
  object-fit: contain;
  border-radius: 18px;
}
.page-tests .love-card > a > div {
  padding: 0;
}
.page-tests .love-card h3,
.page-tests .tests-chapter h3,
.page-tests .love-hub-note h2 {
  color: #fff4df;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  margin: 8px 0 14px;
}
.page-tests .tests-chapter p,
.page-tests .love-hub-note p,
.page-tests .love-card p {
  color: #c7d5e7;
  line-height: 1.75;
}
.page-tests .tests-chapter .eyebrow,
.page-tests .love-card .eyebrow {
  color: #ff8fc6;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}
.page-tests .tests-chapter {
  margin: 32px 0 22px;
}
.page-tests #tests-result-themes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.page-tests #tests-result-themes > :last-child {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .page-tests .love-card > a,
  .page-tests .love-hub-note,
  .page-tests .tests-chapter {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
  }
  .page-tests #tests-result-themes {
    grid-template-columns: 1fr;
  }
}
@media print {
  .page-tests .tests-chapter {
    background: white;
    box-shadow: none;
  }
}

/* =============================================================
   BOUTONS — contraste renforcé sur tous les fonds de la rubrique
   ============================================================= */
html body.page-tests main .fp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  padding: 12px 24px;
  border: 2px solid #efc774 !important;
  border-radius: 999px;
  background: #efc774 !important;
  color: #14213a !important;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  text-shadow: none !important;
  opacity: 1;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
}
html body.page-tests main .fp-button:hover,
html body.page-tests main .love-card > a:hover .fp-button {
  background: #ffe2a3 !important;
  border-color: #ffe2a3 !important;
  color: #14213a !important;
}
html body.page-tests main .fp-button:focus-visible,
html body.page-tests main .love-card > a:focus-visible .fp-button {
  outline: 3px solid #ff8fc6;
  outline-offset: 4px;
}
html body.page-tests main button.fp-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* =============================================================
   ORDINATEUR — contenu sur toute la largeur avec marges de 3 %
   Commun au sommaire et aux huit questionnaires ; mobile inchangé.
   ============================================================= */
@media screen and (min-width: 1024px) {
  html body.page-tests main {
    width: 100%;
    max-width: none;
  }
  html body.page-tests main > section:not(.tests-hub-hero) {
    width: 94%;
    max-width: none;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
  }
  html body.page-tests main > .fp-intro,
  html body.page-tests main > .fp-tips,
  html body.page-tests main > .fp-share,
  html body.page-tests main > .fp-companion {
    padding-left: 0;
    padding-right: 0;
  }
  html body.page-tests main > .fp-intro > p,
  html body.page-tests main > .fp-intro > h2,
  html body.page-tests main .tests-lead,
  html body.page-tests main .tests-group,
  html body.page-tests main #tests-form,
  html body.page-tests main .love-grid,
  html body.page-tests main .love-hub-note {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
}
