/* p4.css — Puissance 4 contre le commerçant (portrait) */
.p4 { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(64px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom)); background: var(--fond); overflow: hidden; }
.p4__niveau { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: #2fbf71; color: #fff; }
.p4__niveau--dur { background: var(--accent); }
.p4__niveau--expert { background: #c8102e; }
.p4__tour { margin: 0; min-height: 30px; font-family: var(--police-titre); font-weight: 800; font-size: 21px; color: var(--encre); text-align: center; }
.p4__plateau {
  width: min(100%, 470px, calc((100svh - 260px) * var(--c) / var(--l))); aspect-ratio: var(--c) / var(--l); display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 4px;
  padding: 8px; border-radius: 18px; background: var(--primaire); box-shadow: 0 10px 0 rgba(0,0,0,.25), var(--ombre);
}
.p4__col { display: grid; grid-template-rows: repeat(var(--l), 1fr); gap: 4px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.p4__col:hover:not(.p4__col--pleine), .p4__col:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.p4--attente .p4__col { cursor: wait; }
.p4__col--pleine { cursor: default; }
.p4__case { position: relative; border-radius: 50%; background: var(--fond); box-shadow: inset 0 3px 6px rgba(0,0,0,.35); overflow: visible; }
.p4__jeton {
  position: absolute; inset: 7%; border-radius: 50%; display: grid; place-items: center; font-family: var(--police-titre); font-weight: 800; font-size: clamp(10px, 3.2vw, 16px);
  animation: p4-chute calc(.18s + var(--chute) * .05s) cubic-bezier(.5, 0, 1, 1); z-index: 1;
}
.p4__jeton--joueur { background: radial-gradient(circle at 35% 30%, #ff6b6b, #c8102e 70%); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.p4__jeton--commercant { background: radial-gradient(circle at 35% 30%, var(--secondaire), color-mix(in srgb, var(--secondaire) 70%, #000) 75%); color: var(--primaire); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.p4__case--gagnante .p4__jeton { box-shadow: 0 0 0 4px #fff, 0 0 18px #fff; animation: p4-brille .6s ease-in-out infinite alternate; }
@keyframes p4-chute { from { transform: translateY(calc(var(--chute) * -118%)); } to { transform: none; } }
@keyframes p4-brille { from { transform: scale(1); } to { transform: scale(1.1); } }
.p4__aide { margin: 0; font-size: 14px; opacity: .8; text-align: center; }
@media (prefers-reduced-motion: reduce) { .p4__jeton, .p4__case--gagnante .p4__jeton { animation: none; } }
