.pendu-page{
  display:grid;
  gap:20px;
}

.pendu-hero,
.pendu-preview-card,
.pendu-panel{
  background:#fff;
  border:4px solid var(--line);
  border-radius:26px;
  box-shadow:8px 8px 0 var(--line);
}

.pendu-hero{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,.8fr);
  gap:20px;
  align-items:stretch;
  background:
    radial-gradient(circle at top left, rgba(162,155,254,.42), transparent 34%),
    linear-gradient(135deg, #ffffff, #fff8e7);
  padding:24px;
}

.pendu-kicker{
  display:inline-flex;
  width:max-content;
  background:#a29bfe;
  color:#111;
  border:3px solid var(--line);
  border-radius:999px;
  box-shadow:4px 4px 0 var(--line);
  padding:7px 12px;
  font-weight:1000;
  text-transform:uppercase;
  font-size:.78rem;
}

.pendu-hero h2{
  margin:14px 0 8px;
  font-size:clamp(2rem,4vw,3.6rem);
  line-height:.95;
  font-weight:1000;
  letter-spacing:-.04em;
}

.pendu-hero p{
  margin:0;
  max-width:760px;
  font-size:1.05rem;
  font-weight:800;
  color:#333;
  line-height:1.55;
}

.pendu-rules-card{
  display:grid;
  gap:10px;
  background:#111;
  color:#fff;
  border:4px solid var(--line);
  border-radius:22px;
  box-shadow:6px 6px 0 var(--line);
  padding:18px;
  align-content:center;
}

.pendu-rules-card strong{
  font-size:1.2rem;
  text-transform:uppercase;
}

.pendu-rules-card span{
  background:#fff;
  color:#111;
  border:2px solid var(--line);
  border-radius:14px;
  padding:9px 10px;
  font-weight:900;
}

.pendu-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.pendu-actions button,
.pendu-link,
.quick-friend-row button{
  border:4px solid var(--line);
  border-radius:18px;
  box-shadow:5px 5px 0 var(--line);
  padding:12px 16px;
  font-weight:1000;
  cursor:pointer;
  text-decoration:none;
}

.pendu-actions button:first-child{
  background:#ff4757;
  color:#fff;
}

.pendu-actions button:nth-child(2){
  background:#2ed573;
  color:#111;
}

.pendu-link{
  background:#ffd32a;
  color:#111;
}

.pendu-preview-card{
  padding:18px;
}

.pendu-preview-card h3{
  margin:0 0 8px;
  font-weight:1000;
  text-transform:uppercase;
}

.pendu-preview-card p{
  margin:0;
  font-weight:800;
  line-height:1.5;
}

.quick-bot-panel,
.quick-friend-panel{
  display:none;
}

.quick-bot-panel.open,
.quick-friend-panel.open{
  display:grid;
  gap:14px;
}

.quick-friend-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  background:#fff8e7;
  border:3px solid var(--line);
  border-radius:16px;
  box-shadow:4px 4px 0 var(--line);
  padding:12px;
  font-weight:900;
}

.pendu-game-premium{
  display:grid;
  grid-template-columns:minmax(260px,.7fr) minmax(0,1.3fr);
  gap:18px;
  align-items:stretch;
}

.pendu-stage{
  position:relative;
  min-height:380px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.9), transparent 24%),
    linear-gradient(145deg, #dff3ff, #74b9ff);
  border:4px solid var(--line);
  border-radius:26px;
  box-shadow:8px 8px 0 var(--line);
  overflow:hidden;
  perspective:900px;
}

.pendu-stage::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:78px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.45), transparent 16%),
    linear-gradient(145deg, #2ed573, #139d4c);
  border-top:4px solid var(--line);
}

.pendu-gallows{
  position:absolute;
  left:42px;
  bottom:72px;
  width:170px;
  height:250px;
}

.pendu-post,
.pendu-beam,
.pendu-rope{
  position:absolute;
  background:#6c4f2a;
  border:3px solid #111;
  box-shadow:4px 4px 0 rgba(0,0,0,.35);
}

.pendu-post{
  width:22px;
  height:230px;
  left:22px;
  bottom:0;
  border-radius:10px;
}

.pendu-beam{
  width:130px;
  height:20px;
  left:22px;
  top:0;
  border-radius:10px;
}

.pendu-rope{
  width:10px;
  height:58px;
  right:8px;
  top:18px;
  background:#d2a85f;
  border-radius:999px;
}

.pendu-person{
  position:absolute;
  right:46px;
  bottom:86px;
  width:138px;
  height:230px;
  transform-style:preserve-3d;
  transform:rotateX(8deg) rotateY(-10deg);
}

.pendu-part{
  position:absolute;
  opacity:0;
  transform:scale(.5) translateY(-10px);
  transition:.35s ease;
}

.pendu-person[data-errors="1"] .head,
.pendu-person[data-errors="2"] .head,
.pendu-person[data-errors="2"] .body,
.pendu-person[data-errors="3"] .head,
.pendu-person[data-errors="3"] .body,
.pendu-person[data-errors="3"] .arm-left,
.pendu-person[data-errors="4"] .head,
.pendu-person[data-errors="4"] .body,
.pendu-person[data-errors="4"] .arm-left,
.pendu-person[data-errors="4"] .arm-right,
.pendu-person[data-errors="5"] .head,
.pendu-person[data-errors="5"] .body,
.pendu-person[data-errors="5"] .arm-left,
.pendu-person[data-errors="5"] .arm-right,
.pendu-person[data-errors="5"] .leg-left,
.pendu-person[data-errors="6"] .head,
.pendu-person[data-errors="6"] .body,
.pendu-person[data-errors="6"] .arm-left,
.pendu-person[data-errors="6"] .arm-right,
.pendu-person[data-errors="6"] .leg-left,
.pendu-person[data-errors="6"] .leg-right,
.pendu-person[data-errors="7"] .head,
.pendu-person[data-errors="7"] .body,
.pendu-person[data-errors="7"] .arm-left,
.pendu-person[data-errors="7"] .arm-right,
.pendu-person[data-errors="7"] .leg-left,
.pendu-person[data-errors="7"] .leg-right,
.pendu-person[data-errors="7"] .face{
  opacity:1;
  transform:scale(1) translateY(0);
}

.pendu-person .head{
  width:74px;
  height:74px;
  border:4px solid #111;
  border-radius:50%;
  top:0;
  left:32px;
  background:
    radial-gradient(circle at 30% 25%, #fff6d6, transparent 24%),
    linear-gradient(145deg, #ffd6a5, #d49b68);
  box-shadow:
    7px 8px 0 rgba(0,0,0,.28),
    inset -10px -12px 0 rgba(0,0,0,.12);
}

.pendu-person .face{
  top:26px;
  left:54px;
  width:32px;
  height:20px;
}

.pendu-person .face::before,
.pendu-person .face::after{
  content:"";
  position:absolute;
  top:0;
  width:7px;
  height:7px;
  background:#111;
  border-radius:50%;
}

.pendu-person .face::before{left:0}
.pendu-person .face::after{right:0}

.pendu-person .face span{
  position:absolute;
  left:8px;
  bottom:0;
  width:18px;
  height:8px;
  border-bottom:3px solid #111;
  border-radius:50%;
}

.pendu-person .body{
  width:58px;
  height:92px;
  top:78px;
  left:40px;
  border:4px solid #111;
  border-radius:24px;
  background:
    radial-gradient(circle at 30% 20%, #a29bfe, transparent 28%),
    linear-gradient(145deg, #6c5ce7, #341f97);
  box-shadow:
    7px 8px 0 rgba(0,0,0,.28),
    inset -8px -10px 0 rgba(0,0,0,.16);
}

.pendu-person .arm-left,
.pendu-person .arm-right,
.pendu-person .leg-left,
.pendu-person .leg-right{
  width:22px;
  height:82px;
  border:4px solid #111;
  border-radius:999px;
  background:
    linear-gradient(145deg, #ffd6a5, #d49b68);
  box-shadow:5px 6px 0 rgba(0,0,0,.25);
}

.pendu-person .arm-left{
  top:84px;
  left:19px;
  transform-origin:top center;
  rotate:32deg;
}

.pendu-person .arm-right{
  top:84px;
  right:19px;
  transform-origin:top center;
  rotate:-32deg;
}

.pendu-person .leg-left{
  top:160px;
  left:44px;
  transform-origin:top center;
  rotate:14deg;
  background:linear-gradient(145deg, #2d3436, #111);
}

.pendu-person .leg-right{
  top:160px;
  right:44px;
  transform-origin:top center;
  rotate:-14deg;
  background:linear-gradient(145deg, #2d3436, #111);
}

.pendu-progress{
  position:absolute;
  left:16px;
  right:16px;
  top:16px;
  display:flex;
  gap:6px;
}

.pendu-progress span{
  flex:1;
  height:10px;
  background:#fff;
  border:2px solid #111;
  border-radius:999px;
}

.pendu-progress span.active{
  background:#ff4757;
}

.pendu-play-card{
  display:grid;
  gap:16px;
  background:#fff;
  border:4px solid var(--line);
  border-radius:26px;
  box-shadow:8px 8px 0 var(--line);
  padding:18px;
}

.pendu-word{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  background:#111;
  border:4px solid var(--line);
  border-radius:22px;
  box-shadow:6px 6px 0 var(--line);
  padding:16px;
  min-height:84px;
  align-items:center;
}

.pendu-letter-slot{
  min-width:38px;
  height:52px;
  display:grid;
  place-items:center;
  background:#fff;
  border:3px solid var(--line);
  border-radius:14px;
  box-shadow:3px 3px 0 var(--line);
  font-size:1.7rem;
  font-weight:1000;
}

.pendu-input-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pendu-input-row input{
  width:90px;
  border:4px solid var(--line);
  border-radius:18px;
  box-shadow:4px 4px 0 var(--line);
  padding:12px;
  font-size:1.4rem;
  font-weight:1000;
  text-align:center;
  text-transform:uppercase;
}

.pendu-input-row button,
.pendu-setup button,
.quick-bot-level select{
  border:4px solid var(--line);
  border-radius:18px;
  box-shadow:5px 5px 0 var(--line);
  padding:12px 16px;
  font-weight:1000;
}

.pendu-input-row button,
.pendu-setup button{
  background:#2ed573;
  color:#111;
  cursor:pointer;
}

.pendu-letters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.pendu-letters span{
  display:inline-flex;
  min-width:34px;
  height:34px;
  align-items:center;
  justify-content:center;
  background:#fff8e7;
  border:3px solid var(--line);
  border-radius:999px;
  box-shadow:3px 3px 0 var(--line);
  font-weight:1000;
}

.pendu-message{
  background:#fffa85;
  border:4px solid var(--line);
  border-radius:20px;
  box-shadow:5px 5px 0 var(--line);
  padding:14px;
  font-weight:1000;
}

.pendu-setup{
  display:grid;
  gap:12px;
}

.pendu-setup input{
  border:4px solid var(--line);
  border-radius:18px;
  box-shadow:4px 4px 0 var(--line);
  padding:12px;
  font-size:1.1rem;
  font-weight:900;
  text-transform:uppercase;
}

.quick-bot-level{
  display:grid;
  gap:6px;
  font-weight:900;
  max-width:280px;
}

.quick-bot-level select{
  background:#fff8e7;
}

@media(max-width:920px){
  .pendu-hero,
  .pendu-game-premium{
    grid-template-columns:1fr;
  }
}

@media(max-width:520px){
  .pendu-stage{
    min-height:330px;
  }

  .pendu-person{
    right:20px;
    transform:scale(.85) rotateX(8deg) rotateY(-10deg);
    transform-origin:bottom right;
  }

  .pendu-gallows{
    left:20px;
    transform:scale(.85);
    transform-origin:bottom left;
  }

  .pendu-letter-slot{
    min-width:31px;
    height:44px;
    font-size:1.35rem;
  }
}

.pendu-keyboard{
  display:grid;
  grid-template-columns:repeat(7, minmax(34px, 1fr));
  gap:8px;
  margin-top:10px;
}

.pendu-key{
  min-height:42px;
  border:3px solid var(--line);
  border-radius:14px;
  box-shadow:3px 3px 0 var(--line);
  background:#fff;
  font-weight:1000;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}

.pendu-key:not(:disabled):hover{
  transform:translateY(-3px);
  background:#ffd32a;
}

.pendu-key.used,
.pendu-key:disabled{
  background:#dfe6e9;
  opacity:.65;
  cursor:default;
  box-shadow:1px 1px 0 var(--line);
}

.pendu-letters em{
  font-style:normal;
  font-weight:900;
  color:#555;
}

@media(max-width:520px){
  .pendu-keyboard{
    grid-template-columns:repeat(6, minmax(32px, 1fr));
  }

  .pendu-key{
    min-height:38px;
    border-radius:12px;
  }
}

/* Pendu 10 chances : 1 mât, 2 potence, 3 corde, 4-10 personnage */
.pendu-stage .pendu-post,
.pendu-stage .pendu-beam,
.pendu-stage .pendu-rope{
  opacity:0;
  transform:scale(.85) translateY(-8px);
  transition:.35s ease;
}

.pendu-stage[data-errors="1"] .pendu-post,
.pendu-stage[data-errors="2"] .pendu-post,
.pendu-stage[data-errors="3"] .pendu-post,
.pendu-stage[data-errors="4"] .pendu-post,
.pendu-stage[data-errors="5"] .pendu-post,
.pendu-stage[data-errors="6"] .pendu-post,
.pendu-stage[data-errors="7"] .pendu-post,
.pendu-stage[data-errors="8"] .pendu-post,
.pendu-stage[data-errors="9"] .pendu-post,
.pendu-stage[data-errors="10"] .pendu-post{
  opacity:1;
  transform:scale(1) translateY(0);
}

.pendu-stage[data-errors="2"] .pendu-beam,
.pendu-stage[data-errors="3"] .pendu-beam,
.pendu-stage[data-errors="4"] .pendu-beam,
.pendu-stage[data-errors="5"] .pendu-beam,
.pendu-stage[data-errors="6"] .pendu-beam,
.pendu-stage[data-errors="7"] .pendu-beam,
.pendu-stage[data-errors="8"] .pendu-beam,
.pendu-stage[data-errors="9"] .pendu-beam,
.pendu-stage[data-errors="10"] .pendu-beam{
  opacity:1;
  transform:scale(1) translateY(0);
}

.pendu-stage[data-errors="3"] .pendu-rope,
.pendu-stage[data-errors="4"] .pendu-rope,
.pendu-stage[data-errors="5"] .pendu-rope,
.pendu-stage[data-errors="6"] .pendu-rope,
.pendu-stage[data-errors="7"] .pendu-rope,
.pendu-stage[data-errors="8"] .pendu-rope,
.pendu-stage[data-errors="9"] .pendu-rope,
.pendu-stage[data-errors="10"] .pendu-rope{
  opacity:1;
  transform:scale(1) translateY(0);
}
