/*
 * Papillote — cadre de téléphone (aperçu) et écran d'exemple dessiné en HTML.
 * Sur un vrai téléphone, l'aperçu occupe la largeur sans cadre (docs/DESIGN.md, Responsive).
 * Couleurs fixes, exception assumée à la règle des jetons : le cadre et l'écran du lecteur
 * restent identiques quel que soit le thème du site, comme le vrai lecteur ePoc.
 */

.pa-phone {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 9 / 19;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2E3460, #151831);
  box-shadow:
    0 0 0 1.5px rgb(255 255 255 / 0.08) inset,
    0 30px 60px rgb(27 31 58 / 0.32),
    0 10px 20px rgb(27 31 58 / 0.18);
}

.pa-phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 22px;
  border-radius: var(--pa-radius-pill);
  background: #0B0D1C;
  transform: translateX(-50%);
}

.pa-phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 36px;
  background: #F4F6FA;
  overflow: hidden;
}

iframe.pa-phone__screen {
  display: block;
}

/* Avec le vrai lecteur dans le cadre, l'encoche dessinée masquerait son en-tête : on la retire. */
.pa-phone:has(> iframe)::before {
  display: none;
}

/* Écran d'exemple : une question telle que l'élève la voit (illustration, pas le lecteur réel) */
.pa-demo-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  padding: 52px 18px 18px;
  color: #2A3150;
  font-family: var(--pa-font-text);
  font-size: 14px;
}

.pa-demo-screen__progress {
  height: 5px;
  margin-bottom: 18px;
  border-radius: 99px;
  background: #E2E6EF;
  overflow: hidden;
}

.pa-demo-screen__progress span {
  display: block;
  width: 62%;
  height: 100%;
  background: var(--pa-gradient-candy);
}

.pa-demo-screen__card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 8px 22px rgb(42 49 80 / 0.08);
}

.pa-demo-screen__kicker {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #FDE4EC;
  color: #C8235F;
}

.pa-demo-screen__title {
  font-family: var(--pa-font-title);
  font-variation-settings: var(--pa-title-variation);
  font-weight: var(--pa-title-weight);
  font-size: 17px;
  line-height: 1.25;
  text-align: center;
  color: #232845;
}

.pa-demo-screen__hint {
  text-align: center;
  font-size: 12px;
  color: #5A6080;
}

.pa-demo-screen__answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1.5px solid #E2E6EF;
  border-radius: 14px;
  background: #F7F8FC;
  font-weight: 600;
  font-size: 13.5px;
}

.pa-demo-screen__answer i {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #B8BFD3;
  border-radius: 50%;
}

.pa-demo-screen__answer[data-selected] {
  border-color: #0B7190;
  background: #DCF1F7;
}

.pa-demo-screen__answer[data-selected] i {
  border: 5px solid #0B7190;
  background: #FFFFFF;
}

.pa-demo-screen__validate {
  margin-top: 14px;
  padding: 12px;
  border-radius: 99px;
  background: #C8235F;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}
