/* L'écran de blocage tel que l'enfant le voit. L'appli Android reproduit cette mise en page. */

.ecran {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 34px 22px 18px;
  color: #fff;
  text-align: center;
  overflow-y: auto;
}

.e-tete {
  font-size: 104px;
  line-height: 1.12;
  margin-bottom: 6px;
  display: inline-block;
  transform-origin: 50% 80%;
}
.e-tete.n0 { animation: e-rebond 1.5s ease-in-out infinite; }
.e-tete.n1 { animation: e-penche 2.2s ease-in-out infinite; }
.e-tete.n2 { animation: e-secoue 0.9s ease-in-out infinite; }
.e-tete.n3 { animation: e-secoue 0.45s ease-in-out infinite; }
.e-tete.n4 { animation: e-gronde 0.3s linear infinite; }
.e-tete.pop { animation: e-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 1; }
@keyframes e-rebond { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1) translateY(-6px); } }
@keyframes e-penche { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes e-secoue { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes e-gronde {
  0% { transform: translate(-3px, 1px) scale(1.08); } 25% { transform: translate(3px, -2px) scale(1.12); }
  50% { transform: translate(-2px, 2px) scale(1.08); } 75% { transform: translate(2px, -1px) scale(1.12); }
  100% { transform: translate(-3px, 1px) scale(1.08); }
}
/* 1.4 : le chrono bat à chaque seconde, le smiley cligne des yeux */
.e-chrono.pulse { animation: e-pulse 0.4s ease-out; }
@keyframes e-pulse { from { transform: scale(1.1); } to { transform: none; } }
@keyframes e-pop { from { transform: scale(0.2) rotate(-25deg); } to { transform: none; } }

.e-message {
  font: 400 clamp(38px, 12vw, 54px)/1 var(--titre);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-wrap: balance;
  margin-top: 4px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.22);
}
.e-de { margin-top: 10px; font-weight: 700; font-size: 20px; }
.e-menu {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  background: #fff;
  color: var(--encre);
  border-radius: 999px;
  font-weight: 800;
  font-size: 19px;
}

.e-chrono {
  font: 400 54px/1 var(--titre);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.e-ralo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  font-family: var(--emoji);
}
.e-ralo span { font-size: 22px; line-height: 1; opacity: 0.35; filter: grayscale(1); transition: all 0.25s ease; }
.e-ralo span.passe { opacity: 0.75; filter: none; }
.e-ralo span.ici { font-size: 34px; opacity: 1; filter: none; }
.e-sous { margin-top: 10px; font-weight: 800; font-size: 21px; }
.e-info { margin-top: 6px; font-weight: 600; font-size: 17px; }
.e-temps { font: 400 68px/1 var(--titre); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.22); }
.e-temps.long { font-size: 48px; }
.e-temps.tres-long { font-size: 36px; }

.e-bas { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.e-gros {
  min-height: 70px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--vichy-fonce);
  font: 400 28px/1 var(--titre);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}
.e-gros:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.e-note { font-weight: 800; font-size: 20px; padding: 14px 0; }
.e-joker {
  min-height: 58px;
  padding: 8px 14px;
  border: 3px dashed #fff;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.14);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.e-joker small { display: block; font-weight: 600; font-size: 14px; opacity: 0.9; }
.e-secours { display: flex; justify-content: space-between; padding: 4px 6px 0; }
.e-secours button {
  background: none; border: 0; color: #fff; opacity: 0.9;
  font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
  min-height: 40px; padding: 0 6px;
}

.e-clavier {
  position: absolute; inset: 0; z-index: 3;
  background: var(--encre);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px;
}
.e-clavier-titre { font-weight: 800; font-size: 20px; }
.e-points { font-size: 30px; letter-spacing: 0.2em; min-height: 40px; }
.e-clavier-erreur { min-height: 24px; font-weight: 700; color: #ffb4b4; }
.e-touches { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; }
.e-touches button {
  height: 64px; border-radius: 18px; border: 2px solid #fff; background: transparent; color: #fff;
  font-weight: 800; font-size: 24px;
}
.e-touches button:active { background: rgba(255, 255, 255, 0.2); }
.e-fermer { background: none; border: 0; color: #fff; font-weight: 600; text-decoration: underline; min-height: 44px; }

.ecran :focus-visible { outline-color: #fff; }

/* 1.5 : la tirelire sur l'écran d'arrivée */
.e-tirelire { margin-top: 10px; background: rgba(0, 0, 0, 0.22); border-radius: 18px; padding: 10px; }
.e-tirelire .puzzle { width: min(240px, 100%); }
.e-tirelire .puzzle-image { font-size: 74px; }
.e-tirelire .piece-tas { color: #fff; }
