/* La Pyramide du midi — direction artistique briques de jouet — Sebdesign Studio */
body[data-jeu="pyramide"] {
  background-color: #F4F1EA;
  background-image: radial-gradient(circle at 12px 12px, rgba(0, 0, 0, .06) 5px, transparent 6px);
  background-size: 24px 24px; background-attachment: fixed; color: #1B1B1B;
}
body[data-jeu="pyramide"] #scene { display: none; }
.pyr-page { --rouge: #E3342F; --bleu: #3490DC; --jaune: #F6C90E; --vert: #38C172; --noir: #1B1B1B;
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; gap: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.pyr-entete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pyr-titre { margin: 0; white-space: nowrap; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(24px, 7.4vw, 32px); color: var(--rouge); -webkit-text-stroke: 1.5px var(--noir); text-shadow: 3px 3px 0 var(--jaune); }
.pyr-entete-d { display: flex; gap: 5px; flex: none; }
.pyr-badge, .pyr-mini { padding: 5px 10px; white-space: nowrap; border: 2.5px solid var(--noir); border-radius: 10px; background: #FFF; color: var(--noir); font-family: inherit; font-weight: 700; font-size: 13px; box-shadow: 0 3px 0 var(--noir); }
.pyr-duo-noms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pyr-role { display: flex; flex-direction: column; padding: 8px 12px; border: 2.5px solid var(--noir); border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; box-shadow: 0 4px 0 var(--noir); }
.pyr-role b { font-size: 19px; text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pyr-role.g { background: var(--jaune); } .pyr-role.d { background: #9ED0F5; }
.pyr-carte { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px; text-align: center; border: 3px solid var(--noir); border-radius: 16px; background: #FFF; box-shadow: 0 6px 0 var(--noir); }
.pyr-carte.mot { background: var(--jaune); }
.pyr-carte.gagne { background: #BDF0CE; } .pyr-carte.perdu { background: #FFC9C7; }
.pyr-carte small { font-size: 13px; font-weight: 500; color: #444; }
.pyr-lbl { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #555; }
.pyr-cat { margin: 0; font-size: 28px; font-weight: 700; }
.pyr-mot { margin: 0; font-size: clamp(32px, 11vw, 46px); font-weight: 700; line-height: 1.05; }
.pyr-aide { margin: 0; text-align: center; font-size: 15px; font-weight: 500; line-height: 1.4; color: #333; }
.pyr-attente { margin: 0; text-align: center; font-size: 16px; font-weight: 500; color: #555; }
.pyr-paris { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; }
.pyr-pari { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 2.5px solid var(--noir); border-radius: 12px; background: #FFF; font-family: inherit; color: var(--noir); box-shadow: 0 4px 0 var(--noir); }
.pyr-pari:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--noir); }
.pyr-pile { display: flex; flex-direction: column-reverse; gap: 2px; min-height: 80px; justify-content: flex-start; }
.pyr-pile i { width: 34px; height: 13px; border: 2px solid var(--noir); border-radius: 3px; }
.pyr-pari b { font-size: 12px; font-weight: 600; }
.pyr-pari em { font-style: normal; font-size: 16px; font-weight: 700; color: var(--rouge); }
.pyr-pyramide { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pyr-svg { width: 100%; max-width: 330px; height: auto; overflow: visible; }
.pyr-brique { transform-box: fill-box; transform-origin: center; }
.pyr-brique.tombe { animation: pyr-chute .9s cubic-bezier(.5, 0, .9, .4) forwards; }
.pyr-brique.partie { display: none; }
.pyr-brique.pose { animation: pyr-pose .55s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes pyr-pose { 0% { transform: translateY(-140px); opacity: 0; } 55% { transform: translateY(3px); opacity: 1; } 75% { transform: translateY(-4px); } 100% { transform: none; } }
@keyframes pyr-chute { 0% { transform: none; opacity: 1; } 25% { transform: translateY(-6px) rotate(-6deg); } 100% { transform: translateY(160px) rotate(40deg); opacity: 0; } }
.pyr-reste { margin: 0; font-size: 15px; font-weight: 600; }
.pyr-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pyr-btn { width: 100%; min-height: 58px; padding: 0 12px; border: 3px solid var(--noir); border-radius: 14px; background: var(--bleu); color: #FFF; font-family: inherit; font-weight: 700; font-size: 18px; box-shadow: 0 5px 0 var(--noir); }
.pyr-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--noir); }
.pyr-btn.vert { background: var(--vert); } .pyr-btn.rouge { background: var(--rouge); font-size: 15px; }
.pyr-btn.clair { background: #FFF; color: var(--noir); }
.pyr-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pyr-points li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border: 2.5px solid var(--noir); border-radius: 12px; background: #FFF; font-weight: 600; font-size: 17px; box-shadow: 0 3px 0 var(--noir); }
.pyr-points li i { width: 22px; height: 14px; border: 2px solid var(--noir); border-radius: 3px; }
.pyr-points b { color: var(--rouge); }
.pyr-signature { margin: 6px 0 0; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(27, 27, 27, .45); }
