/* The two quizzes of the site played in the member space (template/quiz/quiz.php and template/couple-parents/test.php,
   with $inSpace): one first card for both (sq-intro), and every card in the night of the app instead of white, as the
   cards of the games of the space. Loaded only there; the pages of the site keep their look. */

/* ---- The night behind, the same for both, and the column of the app ---- */
.quiz-page .quiz-hero,
.cp-test-page .cp-hero {
  padding: 12px 0 28px;
  background:
    radial-gradient(70% 55% at 8% 4%, rgba(247, 37, 133, .3), rgba(247, 37, 133, 0) 70%),
    radial-gradient(60% 70% at 100% 100%, rgba(139, 44, 246, .34), rgba(139, 44, 246, 0) 70%),
    linear-gradient(160deg, #2a0f33 0%, #3b163f 48%, #4a1d6e 100%);
}

.quiz-page .quiz-container,
.cp-test-page .cp-container {
  width: min(480px, calc(100% - 32px));
}

/* ---- A card of the night: plum, a fine grain, a gold frame, white words ---- */
.quiz-page .quiz-panel,
.cp-test-page .cp-test__panel {
  position: relative;
  isolation: isolate;
  padding: 26px 22px 24px;
  border-radius: 28px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(110% 70% at 0% 0%, rgba(255, 217, 138, .16), rgba(255, 217, 138, 0) 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(247, 37, 133, .24), rgba(247, 37, 133, 0) 60%),
    linear-gradient(160deg, #4f2075 0%, #35134d 55%, #22092e 100%);
  box-shadow: 0 30px 70px rgba(10, 2, 18, .6), inset 0 1px 0 rgba(255, 255, 255, .14);
  color: #ffffff;
}

.quiz-page .quiz-panel::before,
.cp-test-page .cp-test__panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10px;
  border: 1px solid rgba(255, 217, 138, .3);
  border-radius: 20px;
  pointer-events: none;
}

/* ---- The first card, the same for both quizzes ---- */
.sq-intro {
  text-align: center;
}

.sq-intro > * {
  animation: sq-rise .6s cubic-bezier(.2, .8, .2, 1) backwards;
}

.sq-intro > :nth-child(1) { animation-delay: .08s; }
.sq-intro > :nth-child(2) { animation-delay: .14s; }
.sq-intro > :nth-child(3) { animation-delay: .2s; }
.sq-intro > :nth-child(4) { animation-delay: .26s; }
.sq-intro > :nth-child(5) { animation-delay: .32s; }
.sq-intro > :nth-child(6) { animation-delay: .38s; }

.sq-intro__art {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 2px auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 70%);
  box-shadow: 0 0 0 1.5px rgba(255, 217, 138, .55), 0 14px 30px rgba(10, 2, 18, .45), 0 0 40px rgba(247, 37, 133, .25);
}

.sq-intro__art svg {
  transform: scale(1.3);
}

.sq-intro .sq-intro__kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 217, 138, .55);
  border-radius: 999px;
  background: rgba(255, 217, 138, .12);
  color: #ffd98a;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sq-intro .sq-intro__title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(2rem, 8.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.04;
  text-wrap: balance;
}

.sq-intro .sq-intro__lead {
  max-width: 30em;
  margin: 0 auto 18px;
  color: rgba(255, 255, 255, .82);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.sq-intro .sq-intro__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.sq-intro .sq-intro__points li {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .9);
  font-size: .88rem;
  font-weight: 800;
  list-style: none;
}

.sq-intro .sq-intro__points li::before {
  content: "\2713";
  margin-right: 6px;
  color: #ffd98a;
  font-weight: 900;
}

/* The button of the first card, and the others of the quizzes: the pink of the buttons of the games. */
.sq-intro__go,
.quiz-page .quiz-btn--primary,
.cp-test-page .cp-btn--primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0156f, #f0503a);
  box-shadow: 0 14px 30px rgba(240, 40, 100, .38), inset 0 1px 0 rgba(255, 255, 255, .25);
  color: #ffffff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}

.sq-intro__go::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: sq-sweep 7s ease-in-out 2s infinite;
  pointer-events: none;
}

.sq-intro__go:active {
  transform: scale(.97);
}

.sq-intro__go:disabled {
  opacity: .55;
  cursor: default;
}

.sq-intro__go:focus-visible {
  outline: 3px solid rgba(255, 185, 56, .9);
  outline-offset: 3px;
}

/* ---- The questions ---- */
.quiz-page .quiz-back,
.cp-test-page .cp-test__back {
  color: rgba(255, 255, 255, .72);
}

.quiz-page .quiz-back:hover,
.cp-test-page .cp-test__back:hover {
  color: #ffffff;
}

.quiz-page .quiz-kind,
.cp-test-page .cp-test__kind {
  color: #ffd98a;
}

.quiz-page .quiz-thread::before,
.cp-test-page .cp-test__thread::before {
  background: rgba(255, 255, 255, .16);
}

.quiz-page .quiz-thread__node,
.cp-test-page .cp-test__node {
  border-color: rgba(255, 255, 255, .32);
  background: #35134d;
}

.quiz-page .quiz-thread__node.is-done,
.cp-test-page .cp-test__node.is-done {
  border-color: #f72585;
  background: #f72585;
}

.quiz-page .quiz-progress-text,
.cp-test-page .cp-test__count {
  color: rgba(255, 255, 255, .66);
}

.quiz-page .quiz-question,
.cp-test-page .cp-test__question {
  color: #ffffff;
}

.quiz-page .quiz-hint,
.cp-test-page .cp-test__hint {
  color: rgba(255, 255, 255, .7);
}

.quiz-page .quiz-answer,
.cp-test-page .cp-test__answer {
  border: 1.5px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: #ffffff;
}

.quiz-page .quiz-answer:hover,
.cp-test-page .cp-test__answer:hover {
  border-color: rgba(255, 217, 138, .55);
  background: rgba(255, 255, 255, .12);
  box-shadow: none;
}

.quiz-page .quiz-answer[aria-pressed="true"],
.cp-test-page .cp-test__answer[aria-pressed="true"],
.quiz-page .quiz-answer.is-picked,
.cp-test-page .cp-test__answer.is-picked {
  border-color: #ff7eb3;
  background: linear-gradient(135deg, rgba(247, 37, 133, .32), rgba(139, 92, 255, .3));
  box-shadow: 0 12px 28px rgba(10, 2, 18, .35);
}

/* ---- The result ---- */
.quiz-page .quiz-result__kicker,
.cp-test-page .cp-test__kicker {
  color: #ffd98a;
}

.quiz-page .quiz-result__name,
.cp-test-page .cp-test__name {
  background: linear-gradient(90deg, #ffd98a, #ffb070 45%, #ff9cc4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.quiz-page .quiz-result__nuance {
  color: #cbb6ff;
}

.quiz-page .quiz-result__tagline,
.cp-test-page .cp-test__tagline {
  color: #ff9cc4;
}

.quiz-page .quiz-result__text,
.cp-test-page .cp-test__text {
  color: rgba(255, 255, 255, .84);
}

.cp-test-page .cp-test__emoji-face {
  box-shadow: 0 0 0 6px rgba(255, 217, 138, .5), 0 18px 40px rgba(10, 2, 18, .5);
}

/* The face of the couple's duo on a medal of the same size, as the profile of the parents. */
.quiz-page .quiz-result__emoji {
  margin: 14px auto 10px;
  font-size: 3rem;
}

.quiz-page .quiz-result__emoji-face {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 70%), #3a1650;
  box-shadow: 0 0 0 6px rgba(255, 217, 138, .5), 0 18px 40px rgba(10, 2, 18, .5);
}

.quiz-page .quiz-energies,
.cp-test-page .cp-test__map {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
}

.quiz-page .quiz-energies h3,
.quiz-page .quiz-insight h3,
.cp-test-page .cp-test__map h3,
.cp-test-page .cp-test__insight h3 {
  color: #ffd98a;
}

.quiz-page .quiz-energy {
  color: #ffffff;
}

.quiz-page .quiz-energy__bar {
  background: rgba(255, 255, 255, .12);
}

.quiz-page .quiz-energy__value {
  color: rgba(255, 255, 255, .72);
}

.quiz-page .quiz-insight,
.cp-test-page .cp-test__insight {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
}

.quiz-page .quiz-insight:hover {
  box-shadow: none;
}

.quiz-page .quiz-insight p,
.cp-test-page .cp-test__insight p {
  color: rgba(255, 255, 255, .86);
}

/* The energy to cultivate leads to a game of the space. */
.quiz-page .quiz-insight a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  line-height: 1.25;
  text-align: center;
  background: linear-gradient(135deg, #e0156f, #f0503a);
  box-shadow: 0 10px 22px rgba(240, 40, 100, .3);
  color: #ffffff;
  text-decoration: none;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}

.quiz-page .quiz-insight a:active {
  transform: scale(.97);
}

.cp-test-page .cp-test__insight .cp-test__insight-label {
  color: #ffffff;
}

.cp-test-page .cp-test__map-axis,
.cp-test-page .cp-test__map-row {
  color: rgba(255, 255, 255, .66);
}

.cp-test-page .cp-test__map-cell {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .8);
}

.cp-test-page .cp-test__map-cell.is-you {
  background: linear-gradient(135deg, rgba(247, 37, 133, .3), rgba(139, 92, 255, .28));
  box-shadow: 0 0 0 2px #ffd98a, 0 10px 24px rgba(10, 2, 18, .35);
  color: #ffffff;
}

.cp-test-page .cp-test__map-cell.is-hidden {
  border-color: rgba(255, 217, 138, .3);
  background: transparent;
  color: rgba(255, 217, 138, .62);
}

.cp-test-page .cp-test__ideas {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 2, 18, .3);
}

.cp-test-page .cp-test__ideas h3 {
  color: #ffd98a;
}

/* « Quand en parler à un professionnel », in the gold of the space. */
.cp-test-page .cp-test__help {
  border-color: rgba(255, 217, 138, .55);
  background: rgba(255, 217, 138, .1);
}

.cp-test-page .cp-test__help p {
  color: #ffffff;
}

.cp-test-page .cp-test__help a {
  color: #ffd98a;
}

/* The end of a quiz: play again, under the card. */
.quiz-page .quiz-result__end,
.cp-test-page .cp-test__end {
  margin-top: 18px;
  color: rgba(255, 255, 255, .86);
  text-align: center;
}

/* The drawing of the first card lives as on its tile of the lobby: the heart beats, the child jumps. */
.sq-intro__art .esp-art__heart,
.sq-intro__art .esp-art__kid {
  transform-box: fill-box;
  transform-origin: center;
}

.sq-intro__art .esp-art__heart {
  animation: sq-heartbeat 2.8s ease-in-out .8s infinite;
}

.sq-intro__art .esp-art__kid {
  animation: sq-kid-hop 3.6s ease-in-out 1.2s infinite;
}

@keyframes sq-heartbeat {
  0%, 36%, 100% { transform: none; }
  9% { transform: scale(1.2); }
  18% { transform: none; }
  27% { transform: scale(1.12); }
}

@keyframes sq-kid-hop {
  0%, 66%, 100% { transform: none; }
  74% { transform: translateY(-5px); }
  82% { transform: none; }
  88% { transform: translateY(-2px); }
}

@keyframes sq-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes sq-sweep {
  0%, 72% { left: -60%; }
  100% { left: 130%; }
}

/* A short phone (iPhone SE): the first card holds on the screen, its button in sight. */
@media (max-height: 720px) {
  .quiz-page .quiz-hero,
  .cp-test-page .cp-hero {
    padding-top: 8px;
  }

  .quiz-page .sq-intro,
  .cp-test-page .sq-intro {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .sq-intro__art {
    width: 68px;
    height: 68px;
    margin-bottom: 10px;
  }

  .sq-intro__art svg {
    transform: scale(1.05);
  }

  .sq-intro .sq-intro__kicker {
    margin-bottom: 8px;
  }

  .sq-intro .sq-intro__title {
    margin-bottom: 8px;
    font-size: 1.9rem;
  }

  .sq-intro .sq-intro__lead {
    margin-bottom: 14px;
    font-size: .94rem;
    line-height: 1.45;
  }

  .sq-intro .sq-intro__points {
    gap: 6px;
    margin-bottom: 16px;
  }

  .sq-intro .sq-intro__points li {
    padding: 6px 11px;
  }

  .sq-intro__go {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sq-intro > *,
  .sq-intro__go::after,
  .sq-intro__art .esp-art__heart,
  .sq-intro__art .esp-art__kid {
    animation: none;
  }
}
