/* ===== La plateforme : accueil et salon =====
   Identité : la table de jeu. Feutre vert, laiton, cartons crème ; chaque jeu y apparaît comme une boîte,
   dans ses propres couleurs. Tout est préfixé « pl- » : rien ici ne touche les écrans de jeu
   (ham-box.css, pave.css, botc.css), qui gardent leurs règles. */

:root {
  --pl-felt-1: #236352;
  --pl-felt-2: #17483b;
  --pl-felt-3: #0e2d26;
  --pl-on: #f6efdb;            /* texte sur le feutre */
  --pl-on-2: #b9cbbf;          /* texte secondaire sur le feutre (≥ 5:1) */
  --pl-card: #fbf5e8;          /* carton */
  --pl-card-2: #f2e8d1;
  --pl-edge: #d6c6a3;
  --pl-edge-2: #bba97f;
  --pl-ink: #1d2823;           /* texte sur carton */
  --pl-ink-2: #46534c;         /* ≥ 7:1 sur carton */
  --pl-ink-3: #637068;         /* ≥ 4.5:1 sur carton */
  --pl-brass: #dfaa3f;
  --pl-brass-hi: #f4d27c;
  --pl-brass-deep: #8c6012;
  --pl-bad: #bf3b35;
  --pl-live: #2fbf71;
  --pl-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --pl-sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pl-shadow: 0 2px 0 rgb(0 0 0 / .28), 0 20px 34px -16px rgb(0 0 0 / .65);
}

/* ---- le feutre (hors partie : en partie chaque jeu a son propre décor) ---- */
body:not(.in-game) {
  color: var(--pl-on);
  font-family: var(--pl-sans);
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgb(255 255 255 / .11), transparent 70%),
    radial-gradient(ellipse 130% 100% at 50% 35%, var(--pl-felt-1) 0%, var(--pl-felt-2) 55%, var(--pl-felt-3) 100%) fixed;
}
body:not(.in-game)::before {
  /* le grain du tissu : remplace les rayons de soleil de la Boîte de Jambon */
  inset: 0; left: 0; top: 0; width: auto; height: auto; transform: none; -webkit-mask: none; mask: none;
  opacity: .5; mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pl-screen {
  width: 100%; max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.1rem;
  padding: calc(1rem + env(safe-area-inset-top)) 16px calc(2rem + env(safe-area-inset-bottom));
  font-family: var(--pl-sans); line-height: 1.45;
}
@media (min-width: 900px) { .pl-screen { padding-inline: 32px; gap: 1.5rem; } }

.pl-screen h1, .pl-screen h2, .pl-screen h3 { font-family: var(--pl-serif); letter-spacing: 0; }
.pl-screen :focus-visible { outline: 3px solid var(--pl-brass-hi); outline-offset: 2px; }
.pl-panel :focus-visible, .pl-game :focus-visible { outline-color: var(--pl-brass-deep); }

/* ---- boutons ---- */
.pl-btn {
  font: 800 1rem/1.1 var(--pl-sans); color: var(--pl-ink); cursor: pointer; text-decoration: none; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.1rem;
  background: linear-gradient(#fffdf6, #f5ecd7); border: 1.5px solid var(--pl-edge); border-radius: 12px;
  box-shadow: 0 3px 0 var(--pl-edge-2); transition: transform .1s, box-shadow .1s, filter .15s;
}
.pl-btn .icon { width: 1.2em; height: 1.2em; }
.pl-btn:hover:not(:disabled) { filter: brightness(1.04); }
.pl-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--pl-edge-2); }
.pl-btn:disabled { opacity: .5; cursor: not-allowed; }
.pl-btn.primary:disabled { opacity: 1; filter: saturate(.45) brightness(.8); box-shadow: 0 3px 0 #5d4310; } /* opaque : la barre du bas flotte sur le contenu */
.pl-btn.primary {
  color: #2b1d04; background: linear-gradient(#f7da86, var(--pl-brass)); border-color: #b98524;
  box-shadow: 0 3px 0 var(--pl-brass-deep), 0 12px 20px -10px rgb(0 0 0 / .55);
}
.pl-btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--pl-brass-deep); }
.pl-btn.big { min-height: 56px; width: 100%; font-size: 1.1rem; border-radius: 14px; }
.pl-btn.sm { min-height: 40px; padding: .35rem .8rem; font-size: .9rem; border-radius: 10px; }
.pl-btn.ghost { background: rgb(255 255 255 / .06); color: var(--pl-on); border-color: rgb(246 239 219 / .3); box-shadow: none; }
.pl-btn.ghost:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
.pl-btn.quiet { background: transparent; border-color: var(--pl-edge); box-shadow: none; }
.pl-btn.quiet:active:not(:disabled) { transform: scale(.98); box-shadow: none; }
.pl-btn.link {
  min-height: 44px; padding: .4rem .6rem; background: none; border: 0; box-shadow: none; color: var(--pl-on-2); font-weight: 700; font-size: .9rem;
  text-decoration: underline; text-decoration-color: rgb(185 203 191 / .4); text-underline-offset: 3px;
}
.pl-btn.link:hover:not(:disabled) { color: var(--pl-on); filter: none; }
.pl-btn.link:active:not(:disabled) { transform: none; }
.pl-btn.busy { pointer-events: none; opacity: .7; }

/* ---- champs ---- */
.pl-input {
  font: 700 1rem var(--pl-sans); color: var(--pl-ink); width: 100%; min-height: 50px; padding: .7rem .95rem;
  background: #fff; border: 1.5px solid var(--pl-edge); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.pl-input::placeholder { color: var(--pl-ink-3); font-weight: 400; }
.pl-input:focus { outline: none; border-color: var(--pl-brass-deep); box-shadow: 0 0 0 3px rgb(223 170 63 / .35); }
.pl-label { display: flex; flex-direction: column; gap: .35rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pl-ink-2); }
.pl-label .pl-input { text-transform: none; letter-spacing: 0; font-size: 1rem; }
.pl-code {
  flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .4em; text-align: center; font-family: var(--pl-serif);
  font-size: 1.35rem; font-weight: 800; padding-left: 1.4rem;
}
.pl-code::placeholder { letter-spacing: .3em; font-family: var(--pl-sans); font-size: 1rem; font-weight: 700; }

/* ---- cartons ---- */
.pl-panel {
  color: var(--pl-ink); background: linear-gradient(var(--pl-card), #f7efdc); border: 1px solid rgb(255 255 255 / .55); border-radius: 18px;
  padding: 1.1rem; display: flex; flex-direction: column; gap: .85rem; box-shadow: var(--pl-shadow), inset 0 1px 0 #fff;
}
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.pl-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.pl-head h2 .icon { color: var(--pl-brass-deep); }
.pl-sub { margin: -.35rem 0 0; color: var(--pl-ink-2); font-size: .9rem; }
.pl-note { margin: 0; color: var(--pl-ink-2); font-size: .85rem; }
.pl-chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .65rem; border-radius: 999px;
  font-size: .8rem; font-weight: 800; color: var(--pl-ink-2); background: var(--pl-card-2); border: 1px solid var(--pl-edge);
}
.pl-chip .icon { width: 14px; height: 14px; }
.pl-h { margin: 0 0 .7rem; font-size: 1.3rem; font-weight: 700; color: var(--pl-on); display: flex; align-items: baseline; gap: .6rem; }
.pl-h small { font: 700 .85rem var(--pl-sans); color: var(--pl-on-2); }

/* ---- accueil ---- */
.pl-home-main { display: grid; gap: 1.2rem; grid-template-areas: "hero" "panel" "steps"; }
.pl-hero { grid-area: hero; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding-top: .6rem; }
.pl-meeples { display: flex; align-items: flex-end; justify-content: center; height: 84px; margin-bottom: .6rem; }
.pl-meeple { flex: none; width: 46px; margin: 0 -2px; scale: var(--sc, 1); transform-origin: 50% 100%; animation: pl-hop 3.6s calc(var(--i) * .4s) ease-in-out infinite; }
.pl-meeple:nth-child(1), .pl-meeple:nth-child(5) { --sc: .88; }
.pl-meeple:nth-child(3) { --sc: 1.14; z-index: 1; }
.pl-meeple svg { display: block; width: 100%; height: auto; }
@keyframes pl-hop { 0%, 55%, 100% { translate: 0 0; } 68% { translate: 0 -9px; } 80% { translate: 0 0; } }
.pl-title { margin: 0; font-size: clamp(2.5rem, 12vw, 3.5rem); font-weight: 800; line-height: 1; color: var(--pl-on); text-shadow: 0 2px 0 rgb(0 0 0 / .25); }
.pl-title em { font-size: 1em; font-style: italic; color: var(--pl-brass-hi); }
.pl-tag { margin: .5rem 0 0; max-width: 32ch; color: var(--pl-on-2); font-size: 1.05rem; }
.pl-enter { grid-area: panel; }
.pl-or { display: flex; align-items: center; gap: .7rem; color: var(--pl-ink-3); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pl-or::before, .pl-or::after { content: ''; flex: 1; height: 1.5px; background: var(--pl-edge); }
.pl-join { display: flex; gap: .6rem; }
.pl-steps { grid-area: steps; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.pl-steps li { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font-size: .85rem; font-weight: 700; color: var(--pl-on-2); line-height: 1.3; }
.pl-steps b {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 1.05rem var(--pl-serif);
  color: #2b1d04; background: linear-gradient(#f7da86, var(--pl-brass)); box-shadow: 0 2px 0 var(--pl-brass-deep);
}
.pl-foot-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 .4rem; color: var(--pl-on-2); font-size: .85rem; }
.pl-foot-links .pl-btn.link { padding: .4rem .5rem; }
@media (min-width: 900px) {
  .pl-home-main { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "hero panel" "steps panel"; column-gap: 4rem; align-items: center; padding-top: 1.5rem; }
  .pl-hero { align-items: flex-start; text-align: left; padding-top: 0; }
  .pl-meeples { justify-content: flex-start; height: 104px; }
  .pl-meeple { width: 58px; }
  .pl-title { font-size: 4.6rem; }
  .pl-tag { font-size: 1.2rem; max-width: 30ch; }
  .pl-steps { align-self: start; margin-top: .8rem; max-width: 460px; }
  .pl-steps li { align-items: flex-start; text-align: left; }
}

/* ---- les boîtes (une par jeu) ---- */
.pl-shelf { display: flex; flex-direction: column; }
.pl-row {
  position: relative; display: flex; gap: 12px; margin: 0 -16px; padding: 4px 16px 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.pl-row::-webkit-scrollbar { display: none; }
.pl-row > .pl-game { flex: none; width: min(74vw, 280px); scroll-snap-align: center; }
@media (min-width: 700px) {
  /* trois par ligne, et la dernière ligne (4e, 5e jeu…) centrée plutôt que collée à gauche */
  .pl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 0; padding: 4px 4px 12px; overflow: visible; }
  .pl-row > .pl-game { flex: 0 1 calc((100% - 36px) / 3); width: auto; min-width: 0; }
}

/* téléphone : des points sous la rangée de boîtes disent où on en est */
.pl-dots { display: flex; justify-content: center; gap: 8px; margin-top: -4px; }
.pl-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: rgb(246 239 219 / .3); transition: width .2s, background .2s; }
.pl-dot.on { width: 24px; background: var(--pl-brass); }
@media (min-width: 700px) { .pl-dots { display: none; } }

/* essayer seul : un volet replié plutôt qu'une ligne de liens */
.pl-try { align-self: center; width: 100%; max-width: 640px; margin-top: .5rem; }
.pl-try > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; color: var(--pl-on-2); font-weight: 700; font-size: .9rem; border-radius: 10px; }
.pl-try > summary::-webkit-details-marker { display: none; }
.pl-try > summary:hover { color: var(--pl-on); }
.pl-try > summary .icon { width: 1.1em; height: 1.1em; }
.pl-try > summary::after { content: ''; width: 7px; height: 7px; margin: 0 0 3px .2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; transition: rotate .2s; }
.pl-try[open] > summary::after { rotate: -135deg; margin-bottom: -3px; }
.pl-try-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .5rem 0 .2rem; }
.pl-try-list .pl-btn { min-height: 44px; }

/* le choix du jeu dans le salon : une ligne par jeu, avec ce que le salon peut en faire */
.pl-picks { display: flex; flex-direction: column; gap: .6rem; }
.pl-pick {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; gap: .85rem; align-items: center; text-align: left; font: inherit; color: var(--pl-ink); cursor: pointer;
  padding: 8px 12px 8px 8px; background: linear-gradient(var(--pl-card), #f7efdc); border: 1px solid rgb(255 255 255 / .55); border-radius: 16px;
  box-shadow: var(--pl-shadow), inset 0 1px 0 #fff; transition: transform .12s, box-shadow .15s, opacity .2s;
}
.pl-pick:hover:not(:disabled) { transform: translateY(-2px); }
.pl-pick:active:not(:disabled) { transform: scale(.99); }
.pl-pick:disabled { cursor: default; }
.pl-pick.dim { opacity: .55; }
.pl-pick.active { box-shadow: 0 0 0 3px var(--pl-brass), var(--pl-shadow), inset 0 1px 0 #fff; }
.pl-pick:focus-visible { outline: 3px solid var(--pl-brass-hi); outline-offset: 3px; }
.pl-pick-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pl-pick-info strong { font: 700 1.05rem/1.2 var(--pl-serif); }
.pl-pick-tag { color: var(--pl-ink-2); font-size: .82rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-pick-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: .2rem; }
.pl-fit { font-size: .8rem; font-weight: 800; }
.pl-fit::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .35rem; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.pl-fit.ok { color: #1f7a45; }
.pl-fit.wait { color: var(--pl-brass-deep); }
.pl-fit.no { color: #a82f2a; }
.pl-pick-radio { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #2b1d04; border: 2px solid var(--pl-edge-2); }
.pl-pick.active .pl-pick-radio { background: linear-gradient(#f7da86, var(--pl-brass)); border-color: #b98524; box-shadow: 0 2px 0 var(--pl-brass-deep); }
.pl-pick-radio .icon { width: 15px; height: 15px; stroke-width: 3; }
@media (min-width: 900px) { .pl-pick { grid-template-columns: 120px minmax(0, 1fr) 28px; padding: 10px 16px 10px 10px; } }

.pl-game {
  position: relative; display: flex; flex-direction: column; gap: .7rem; padding: 10px 10px 14px; text-align: left; font: inherit; color: var(--pl-ink);
  background: linear-gradient(var(--pl-card), #f7efdc); border: 1px solid rgb(255 255 255 / .55); border-radius: 16px; box-shadow: var(--pl-shadow), inset 0 1px 0 #fff;
  transition: transform .15s, box-shadow .15s, opacity .2s;
}
button.pl-game { cursor: pointer; }
button.pl-game:hover:not(:disabled) { transform: translateY(-3px); }
button.pl-game:active:not(:disabled) { transform: translateY(0) scale(.99); }
button.pl-game:disabled { cursor: default; }
.pl-game.dim { opacity: .5; }
.pl-game.active { box-shadow: 0 0 0 3px var(--pl-brass), var(--pl-shadow), inset 0 1px 0 #fff; }
.pl-game-check {
  position: absolute; top: 18px; right: 18px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #2b1d04; background: linear-gradient(#f7da86, var(--pl-brass)); box-shadow: 0 2px 0 var(--pl-brass-deep), 0 4px 8px rgb(0 0 0 / .3);
}
.pl-game-check .icon { width: 16px; height: 16px; stroke-width: 3; }
.pl-game-info { display: flex; flex-direction: column; gap: .3rem; padding: 0 4px; min-width: 0; }
.pl-game-info strong { font: 700 1.1rem/1.2 var(--pl-serif); }
.pl-game-info p {
  margin: 0; color: var(--pl-ink-2); font-size: .88rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pl-game-info .pl-chip { align-self: flex-start; margin-top: .15rem; }
.pl-game-rules { margin: auto 4px 0; align-self: stretch; }
.pl-game-rules .icon { color: var(--pl-brass-deep); }
.pl-h-rules { margin-left: auto; align-self: center; }

.pl-box {
  position: relative; container-type: inline-size; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  aspect-ratio: 4 / 3; padding: 8px 10px 10px; border-radius: 10px; text-align: center; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18);
}
.pl-box-art { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.pl-box-art svg { display: block; width: auto; height: auto; max-width: 70%; max-height: 100%; filter: drop-shadow(0 5px 5px rgb(0 0 0 / .32)); }
.pl-box-title { position: relative; z-index: 1; display: block; line-height: 1; }
.pl-box-title small { display: block; }

.pl-box[data-game="ham-box"] { background: radial-gradient(circle at 50% 38%, #fff6ee 0, #ffdccb 62%, #f8b9a8 100%); color: #3a1d17; }
.pl-box[data-game="ham-box"]::before {
  content: ''; position: absolute; inset: -40%; z-index: 0; background: repeating-conic-gradient(rgb(255 255 255 / .42) 0 7deg, transparent 7deg 15deg);
  -webkit-mask: radial-gradient(circle, #000, transparent 55%); mask: radial-gradient(circle, #000, transparent 55%);
}
.pl-box[data-game="ham-box"] .pl-box-art svg { max-width: 66%; }
.pl-box[data-game="ham-box"] .pl-box-title { font: 600 clamp(.95rem, 7.4cqw, 1.25rem)/1 "Fredoka", var(--pl-sans); }

.pl-box[data-game="pave"] { background: radial-gradient(#dccdaa 1px, transparent 1.4px) 0 0 / 7px 7px, #f4ead6; color: #d83a2e; padding-top: 18px; }
.pl-box-ribbon { position: absolute; top: 0; left: 0; right: 0; height: 11px; z-index: 2; background: repeating-linear-gradient(135deg, #d83a2e 0 9px, #fffaf0 9px 18px); box-shadow: 0 1px 0 rgb(0 0 0 / .25); }
.pl-box[data-game="pave"] { padding-top: 22px; }
.pl-box[data-game="pave"] .pl-box-art svg { max-width: 78%; }

/* BOTC : le couvercle violet occupe toute la boîte */
.pl-box[data-game="botc"] { background: #2b2140; padding: 0; }
.pl-box[data-game="botc"] .pl-box-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Mindbug : le logo du livret sur une nuit violette */
.pl-box[data-game="mindbug"] { background: radial-gradient(circle at 50% 45%, #3c2b6c 0, #1d1740 62%, #0e0a26 100%); padding: 8px; }
.pl-box[data-game="mindbug"] .pl-box-art img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 5px 6px rgb(0 0 0 / .5)); }

/* Skyjo : le logo du livret sur le bleu de la boîte, un éventail de cartes dessous */
.pl-box[data-game="skyjo"] { background: radial-gradient(circle at 50% 32%, #3cc0f3 0, #00a0e4 58%, #0079b3 100%); padding: 7px 8px 8px; }
.pl-box[data-game="skyjo"]::before {
  content: ''; position: absolute; inset: 0; z-index: 0; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23fff' fill-opacity='.14' fill-rule='evenodd' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.34V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E") 0 0 / 22px auto;
}
.pl-sj { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqw; width: 100%; height: 100%; }
.pl-sj img { display: block; width: 66%; height: auto; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .4)); }
.pl-sj-fan { display: flex; justify-content: center; align-items: flex-end; }
.pl-sj-c { display: block; margin: 0 -1.1cqw; transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 120%; }

/* Uno : un ovale jaune incliné sur le rouge, quatre cartes en éventail */
.pl-box[data-game="uno"] { background: radial-gradient(ellipse 70% 55% at 50% 38%, #ffd84a 0, #ff8a1a 32%, #e5300e 62%, #8a0606 100%); padding: 8px; }
.pl-un { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; width: 100%; height: 100%; }
.pl-un-logo { display: block; width: 66%; height: auto; filter: drop-shadow(0 1.2cqw 1.6cqw rgb(0 0 0 / .4)); }
.pl-un-fan { display: flex; justify-content: center; align-items: flex-end; }
.pl-un-c { display: block; margin: 0 -2cqw; transform: translateY(var(--y)) rotate(var(--r)); transform-origin: 50% 120%; }

/* Dune: Imperium : un ciel d'Arrakis qui rougit, deux dunes, le titre en capitales romaines et les quatre Factions */
.pl-box[data-game="dune"] { background:
    radial-gradient(ellipse 80% 38% at 25% 104%, #7a3517 0 62%, transparent 63%),
    radial-gradient(ellipse 90% 34% at 82% 108%, #a24a1c 0 64%, transparent 65%),
    radial-gradient(circle at 50% 78%, #ffd27a 0, #f08f35 22%, #b9462a 52%, #3b1a3a 82%, #17102b 100%); padding: 6px; color: #fff1d6; }
.pl-du { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; width: 100%; height: 100%; }
.pl-du-t { font: 800 clamp(1.6rem, 21cqw, 2.8rem)/1 "Cinzel", Georgia, serif; letter-spacing: .14em; margin-right: -.14em; text-shadow: 0 2px 0 #4a1c0e, 0 4px 10px rgb(0 0 0 / .5); }
.pl-du-s { font: 700 clamp(.6rem, 7.4cqw, 1rem)/1 "Cinzel", Georgia, serif; letter-spacing: .5em; margin-right: -.5em; color: #ffd9a0; text-shadow: 0 1px 0 #4a1c0e; }
.pl-du-em { display: flex; gap: .5em; margin-top: .55em; }
.pl-du-em .du-ico { width: clamp(1rem, 8cqw, 1.5rem); height: auto; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .6)); }
.pl-du-em .fi-emperor { color: #e5e6ea !important; }

/* The Crew : le logo du livret sur la nuit étoilée, un astronaute en apesanteur */
.pl-box[data-game="crew"] { background: radial-gradient(ellipse at 70% 90%, #1f4f9c 0, #0c1a45 46%, #050914 100%), #050914; padding: 8px; }
.pl-box[data-game="crew"]::before { content: ''; position: absolute; inset: 0; z-index: 0; opacity: .75; background: url("/img/crew/space.jpg") center / cover; mix-blend-mode: screen; }
.pl-cr { position: relative; display: block; width: 100%; height: 100%; }
.pl-cr-logo { position: absolute; left: 50%; top: 5%; width: 78%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 3px 5px rgb(0 0 0 / .6)); }
.pl-cr-astro { position: absolute; right: 4%; bottom: -3%; height: 62%; width: auto; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .6)); }

/* ---- salon ---- */
.pl-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; }
.pl-top > :first-child { justify-self: start; }
.pl-top h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--pl-on); }
.pl-top .voice-bar { justify-self: end; }
.pl-top .vb { background: var(--pl-card); color: var(--pl-ink); border-radius: 12px; box-shadow: 0 3px 0 rgb(0 0 0 / .3); }
.pl-top .vb.off { color: #fff; background: #5c6962; }
.pl-top .vb.hang { color: #fff; background: var(--pl-bad); }
.pl-top .vb.join.live { color: #fff; background: #25a15d; box-shadow: 0 3px 0 #17703f; }
.pl-top .vb:focus-visible { outline-color: var(--pl-brass-hi); }
.pl-top .vb-count { background: var(--pl-brass); color: #2b1d04; border-color: var(--pl-card); }

.pl-lobby { display: grid; gap: 1.1rem; grid-template-areas: "top" "side" "main" "foot"; }
.pl-lobby > .pl-top { grid-area: top; }
.pl-side { grid-area: side; display: flex; flex-direction: column; gap: 1.1rem; }
.pl-main { grid-area: main; display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.pl-lobby > .pl-bar { grid-area: foot; }
@media (min-width: 900px) {
  .pl-lobby { grid-template-columns: 380px minmax(0, 1fr); grid-template-areas: "top top" "side main" "foot foot"; gap: 1.5rem; align-items: start; }
  .pl-side { position: sticky; top: 1rem; }
}

.pl-invite { align-items: center; text-align: center; gap: .7rem; }
.pl-invite .pl-label { align-items: center; }
.pl-tiles { display: flex; gap: .5rem; justify-content: center; }
.pl-tiles span {
  width: 52px; height: 62px; display: grid; place-items: center; font: 800 2rem var(--pl-serif); color: var(--pl-ink);
  background: linear-gradient(#fffdf6, #f1e6cb); border: 1.5px solid var(--pl-edge); border-radius: 10px; box-shadow: 0 3px 0 var(--pl-edge-2);
}
.pl-invite .pl-btn { width: 100%; }

.pl-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.pl-players li {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 54px; padding: .35rem .5rem .35rem .4rem;
  border-radius: 12px; background: var(--pl-card-2); border: 1px solid var(--pl-edge);
}
.pl-players li.offline { opacity: .55; }
.pl-players li.empty { border: 1.5px dashed var(--pl-edge-2); background: none; color: var(--pl-ink-3); font-size: .9rem; font-weight: 700; justify-content: flex-start; padding-left: .9rem; }
.pl-pname { display: flex; align-items: center; gap: .6rem; min-width: 0; font-weight: 800; }
.pl-pname > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pname em { color: var(--pl-ink-3); font-size: .85em; font-style: normal; font-weight: 700; }
.pl-avatar { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; border: 3px solid #fff; box-shadow: 0 2px 0 rgb(0 0 0 / .2); }
.pl-avatar .cam-bubble { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid #fff; }
.pl-players li.v-talk .pl-avatar { box-shadow: 0 0 0 3px var(--pl-live); }
.pl-players li.v-talk .pl-avatar .cam-bubble { border-color: var(--pl-live); }
.pl-vico { display: none; flex: none; color: #1f9a5a; }
.pl-vico .icon { width: 17px; height: 17px; }
.pl-vico .icon + .icon { display: none; }
li.v-in .pl-vico { display: inline-flex; }
li.v-mute .pl-vico { color: var(--pl-ink-3); }
li.v-mute .pl-vico .icon:first-child { display: none; }
li.v-mute .pl-vico .icon + .icon { display: block; }
.pl-host { display: inline-flex; align-items: center; gap: .25rem; color: var(--pl-brass-deep); font-size: .8rem; font-weight: 800; }
.pl-host .icon { width: 15px; height: 15px; }
.pl-players li { flex-wrap: wrap; }
.pl-players .pl-pname { flex: 1 1 9rem; }
.pl-rowact { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .35rem .5rem; }
.pl-st { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 800; color: #fff; background: var(--pl-brass-deep); }

/* thème de la Boîte de Jambon : un volet replié, qui dit déjà lequel est choisi */
.pl-fold { padding: 0; gap: 0; }
.pl-fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; min-height: 60px; padding: .6rem 1.1rem; border-radius: 18px;
}
.pl-fold > summary::-webkit-details-marker { display: none; }
.pl-fold > summary h2 { margin: 0; font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.pl-fold > summary h2 .icon { color: var(--pl-brass-deep); }
.pl-fold > summary .pl-cur { color: var(--pl-ink-2); font: 700 .88rem var(--pl-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-fold > summary::after {
  content: ''; flex: none; width: 9px; height: 9px; margin: 0 .3rem 3px 0; border-right: 2.5px solid var(--pl-ink-2); border-bottom: 2.5px solid var(--pl-ink-2);
  rotate: 45deg; transition: rotate .2s;
}
.pl-fold[open] > summary::after { rotate: -135deg; margin-bottom: -3px; }
.pl-fold-body { display: flex; flex-direction: column; gap: .85rem; padding: 0 1.1rem 1.1rem; }
.pl-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .55rem; }
.pl-theme {
  position: relative; font: inherit; color: var(--pl-ink); text-align: left; display: flex; align-items: center; gap: .7rem; min-height: 64px; cursor: pointer;
  background: var(--pl-card-2); border: 1.5px solid var(--pl-edge); border-radius: 12px; padding: .5rem 2.3rem .5rem .5rem; transition: border-color .15s, transform .1s;
}
.pl-theme:hover:not(:disabled) { border-color: var(--pl-brass-deep); }
.pl-theme:active:not(:disabled) { transform: scale(.98); }
.pl-theme.active { border-color: var(--pl-brass); box-shadow: 0 0 0 2px var(--pl-brass); background: #fff9e8; }
.pl-theme:disabled { cursor: default; opacity: .6; }
.pl-theme.active:disabled { opacity: 1; }
.pl-theme-art { flex: none; width: 58px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .3)); }
.pl-theme-art svg { display: block; width: 100%; height: auto; }
.pl-theme-info { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pl-theme-info strong { font: 700 1rem/1.2 var(--pl-serif); }
.pl-theme-info span { color: var(--pl-ink-2); font-size: .8rem; line-height: 1.25; }
.pl-theme-info .by { color: var(--pl-ink-3); }
.pl-theme-check {
  position: absolute; top: 50%; right: .6rem; translate: 0 -50%; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  color: #2b1d04; background: var(--pl-brass);
}
.pl-theme-check .icon { width: 14px; height: 14px; stroke-width: 3; }
.pl-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pl-actions .pl-btn { flex: 1 1 auto; }

/* barre du bas : lancer la partie, ou attendre l'hôte */
.pl-bar {
  position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: .9rem 16px calc(.9rem + env(safe-area-inset-bottom));
  display: flex; justify-content: center; background: linear-gradient(rgb(14 45 38 / 0), rgb(14 45 38 / .96) 40%);
}
.pl-bar > * { width: 100%; max-width: 460px; }
.pl-waiting {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 56px; color: var(--pl-on); font-weight: 800;
  background: rgb(0 0 0 / .25); border: 1px solid rgb(246 239 219 / .18); border-radius: 14px;
}
.pl-waiting i { width: 8px; height: 8px; border-radius: 50%; background: var(--pl-brass); animation: pl-blink 1.2s infinite; }
.pl-waiting i:nth-of-type(2) { animation-delay: .2s; }
.pl-waiting i:nth-of-type(3) { animation-delay: .4s; }
@keyframes pl-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (min-width: 900px) { .pl-bar { margin: 0; padding-inline: 0; background: none; } }

@media (max-width: 380px) { .pl-top .vb { min-width: 36px; height: 36px; padding: 0 7px; } .pl-top .voice-bar { gap: 4px; } .pl-tiles span { width: 46px; height: 56px; } }
@media (prefers-reduced-motion: reduce) { .pl-meeple, .pl-waiting i { animation: none !important; } .pl-game, .pl-btn { transition: none; } }
