:root {
  --encre: #4a2366;
  --encre-douce: #7a5a92;
  --rose: #ff5d8f;
  --rose-fonce: #c2305e;
  --ombre-rose: #f3a6cf;
  --citron: #ffd84d;
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--encre);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: linear-gradient(180deg, #a6dcff 0%, #d7c6ff 48%, #ffc9e6 100%) fixed;
}
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input { font-family: inherit; color: var(--encre); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.titre { font-family: 'Lilita One', sans-serif; font-weight: 400; }

#bandeau { position: sticky; top: 0; z-index: 60; padding: 10px 16px; background: #fff6b0; text-align: center; font-weight: 600; box-shadow: 0 3px 0 #f2c94c; }
#bandeau.erreur { background: #ffd6dc; box-shadow: 0 3px 0 #ff8fa3; }

.guirlande { position: absolute; left: 0; top: 0; width: 100%; height: 60px; pointer-events: none; }

/* ---------- boutons ---------- */

.gros {
  height: 64px; border: 0; border-radius: 22px; padding: 0 18px;
  background: repeating-linear-gradient(-45deg, #f2468a 0 16px, #ff6fa5 16px 32px);
  color: #fff; font-family: 'Lilita One', sans-serif; font-size: 24px; letter-spacing: .5px;
  text-shadow: 0 3px 0 #b8255e;
  box-shadow: 0 6px 0 #c2306e, inset 0 3px 0 rgba(255, 255, 255, .4);
  transition: transform .08s, box-shadow .08s;
}
.gros:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #c2306e; }
.gros.menthe {
  background: repeating-linear-gradient(-45deg, #18a56a 0 14px, #22b878 14px 28px);
  text-shadow: 0 3px 0 #0d6a42; box-shadow: 0 6px 0 #0f7a4a, inset 0 3px 0 rgba(255, 255, 255, .3);
}
.gros.blanc { background: #fff; color: #b4430b; text-shadow: none; box-shadow: 0 6px 0 var(--ombre-rose); }
.gros.citron {
  background: linear-gradient(#ffe993, #ffd84d); color: #6b3a00; text-shadow: none;
  box-shadow: 0 6px 0 #d99a00, inset 0 3px 0 rgba(255, 255, 255, .7);
}
.gros:disabled, .gros.inactif {
  background: #eadff5; color: #5b4a70; text-shadow: none; box-shadow: 0 6px 0 #cbb8e0;
}
.petit {
  min-height: 46px; border: 0; border-radius: 16px; padding: 6px 14px; background: #fff;
  color: var(--encre); font-weight: 600; font-size: 15px; box-shadow: 0 4px 0 var(--ombre-rose);
}
.petit.danger { color: #b4232f; }
.petit:disabled { opacity: .5; }
.rond {
  width: 58px; height: 58px; flex: none; border: 0; border-radius: 50%; background: #fff;
  color: var(--rose-fonce); display: grid; place-items: center; box-shadow: 0 5px 0 var(--ombre-rose);
}
.rond[aria-pressed="true"] { background: #ffe3ee; box-shadow: 0 2px 0 var(--ombre-rose); transform: translateY(3px); }

/* ---------- accueil ---------- */

#accueil { position: relative; max-width: 420px; margin: 0 auto; padding: 52px 20px 40px; display: flex; flex-direction: column; align-items: center; }
.decor span { position: absolute; }
.nuage { width: 70px; height: 24px; border-radius: 999px; background: #fff; opacity: .92; animation: derive 9s ease-in-out infinite alternate; }
.nuage::before, .nuage::after { content: ''; position: absolute; border-radius: 50%; background: #fff; }
.nuage::before { left: 14px; top: -14px; width: 30px; height: 30px; }
.nuage::after { left: 36px; top: -9px; width: 24px; height: 24px; }
.sucette { left: 6%; top: 250px; width: 40px; height: 40px; border-radius: 50%; background: repeating-conic-gradient(from 10deg, #ff5d8f 0 30deg, #fff 30deg 60deg); box-shadow: 0 0 0 3px #fff; animation: flotte 3.4s ease-in-out infinite; }
.sucette::after { content: ''; position: absolute; left: 17px; top: 42px; width: 6px; height: 46px; border-radius: 3px; background: repeating-linear-gradient(180deg, #fff 0 6px, #ff9fc4 6px 12px); }
.ballon { width: 34px; height: 42px; border-radius: 50% 50% 46% 46%; transform-origin: 50% 100%; animation: balance 4s ease-in-out infinite; }
.ballon::after { content: ''; position: absolute; left: 50%; top: 42px; width: 2px; height: 48px; background: #fff; }
.ballon.bleu { right: 8%; top: 236px; background: radial-gradient(circle at 35% 30%, #c2d0ff, #6c8cff 60%, #3a52c4); }
.ballon.jaune { right: 18%; top: 266px; width: 30px; height: 36px; background: radial-gradient(circle at 35% 30%, #fff2a8, #ffd84d 60%, #e0a800); animation-delay: .8s; }

.mascotte { position: relative; width: 150px; height: 136px; animation: flotte 3.6s ease-in-out infinite; }
.mascotte span { position: absolute; border-radius: 50%; }
.mascotte .oreille { top: 0; width: 48px; height: 48px; background: radial-gradient(circle, #f7c9a8 0 38%, #c98a5a 42% 100%); }
.mascotte .oreille.g { left: 4px; } .mascotte .oreille.d { right: 4px; }
.mascotte .tete { left: 10px; top: 18px; width: 130px; height: 112px; background: radial-gradient(circle at 40% 32%, #e6ad7c, #c98a5a 62%, #a06a40); box-shadow: 0 8px 16px rgba(120, 40, 100, .25); }
.mascotte .oeil { top: 58px; width: 13px; height: 15px; background: radial-gradient(circle at 35% 30%, #fff 0 20%, #2b1a1a 24%); animation: cligne 4s infinite; }
.mascotte .oeil.g { left: 44px; } .mascotte .oeil.d { left: 93px; }
.mascotte .joue { top: 82px; width: 20px; height: 11px; background: rgba(255, 110, 160, .6); }
.mascotte .joue.g { left: 24px; } .mascotte .joue.d { left: 106px; }
.mascotte .museau { left: 50px; top: 74px; width: 50px; height: 38px; background: #f7dcc4; }
.mascotte .nez { left: 66px; top: 78px; width: 18px; height: 12px; background: #3a1f2b; }
.mascotte .sourire { left: 66px; top: 92px; width: 18px; height: 9px; border-bottom: 3px solid #3a1f2b; border-radius: 0 0 12px 12px; }

.logo { margin: 8px 0 0; display: flex; flex-direction: column; align-items: center; font-family: 'Lilita One', sans-serif; font-weight: 400; line-height: 1; }
.logo span { font-size: 58px; letter-spacing: 1px; color: var(--rose); text-shadow: 3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 0 8px 0 var(--rose-fonce), 0 14px 18px rgba(120, 40, 100, .3); }
.logo .city { font-size: 46px; letter-spacing: 6px; color: var(--citron); text-shadow: 3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 0 7px 0 #d99a00, 0 12px 16px rgba(120, 40, 100, .3); }
.slogan { margin: 14px 0 22px; font-weight: 600; color: #5b2a86; }
.pied { margin: 28px 0 0; font-weight: 600; font-size: 15px; color: #6b2a5e; text-align: center; }

.carte-accueil { position: relative; width: 100%; background: #fff; border-radius: 30px; padding: 24px 22px 26px; box-shadow: 0 8px 0 var(--ombre-rose), 0 22px 34px rgba(120, 40, 100, .25); display: flex; flex-direction: column; gap: 14px; }
.carte-accueil > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; color: #6b3a8f; }
.carte-accueil input { height: 56px; border-radius: 18px; border: 3px solid #ffd0e6; background: #fff5fa; padding: 0 16px; font-weight: 600; font-size: 19px; outline: none; width: 100%; }
.carte-accueil input:focus { border-color: var(--rose); }
.separateur { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--encre-douce); }
.separateur::before, .separateur::after { content: ''; flex: 1; height: 3px; background: repeating-linear-gradient(90deg, #ffd0e6 0 6px, transparent 6px 10px); }
.rejoindre { display: flex; gap: 10px; }
.rejoindre label { flex: 1; display: flex; }
.rejoindre input { text-align: center; font-family: 'Lilita One', sans-serif; font-size: 26px; letter-spacing: 8px; text-transform: uppercase; border-color: #d3e4ff; background: #f4f8ff; }
.rejoindre .gros { width: 150px; height: 56px; font-size: 21px; }
#attente { text-align: center; padding: 14px; border-radius: 20px; background: #fff5fa; border: 3px dashed #ffd0e6; font-weight: 600; }
#attente .code { display: block; margin: 6px 0; font-family: 'Lilita One', sans-serif; font-size: 44px; letter-spacing: 10px; color: var(--rose-fonce); }

/* ---------- jeu ---------- */

#jeu { position: relative; max-width: 560px; margin: 0 auto; padding: 18px 12px 40px; display: flex; flex-direction: column; gap: 14px; }

#joueurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 3; }
.carte-joueur { position: relative; background: #fff; border-radius: 22px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 6px 0 var(--ombre-rose); min-width: 0; }
.carte-joueur.actif { box-shadow: 0 0 0 3px var(--joueur), 0 0 0 7px color-mix(in srgb, var(--joueur) 30%, transparent), 0 6px 0 var(--ombre-rose); }
.etiquette { position: absolute; top: -12px; right: 12px; background: var(--citron); color: #6b3a00; font-family: 'Lilita One', sans-serif; font-size: 13px; padding: 3px 10px; border-radius: 10px; box-shadow: 0 2px 0 #d99a00; }
.avatar { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 3px var(--joueur); }
.avatar .nounours { left: 12px; top: 1px; transform: scale(1.75); transform-origin: 12px 0; }
.avatar .nounours .ombre, .avatar .nounours .corps { display: none; }
.infos { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.infos .nom { font-family: 'Lilita One', sans-serif; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.argent { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 16px; }
.piece { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--citron); box-shadow: inset 0 0 0 2px #e0a800; }
.statut { font-size: 12px; font-weight: 600; color: var(--encre-douce); }

/* Sous le plateau, au-dessus des boutons : ne cache ni les pions ni les bâtiments du fond. */
#evenement { position: absolute; left: 0; right: 0; bottom: -8px; z-index: 6; width: fit-content; max-width: 100%; margin: 0 auto; text-align: center; background: #fff; border-radius: 999px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 0 var(--ombre-rose); animation: apparait .3s ease-out; }

#scene { position: relative; width: 100%; isolation: isolate; } /* les z-index des pions restent dans la scène */
.roue-decor { position: absolute; right: 0; top: 0; width: 30%; }
.roue { animation: tourne 22s linear infinite; }
.chapiteau { position: absolute; left: 2%; top: 6%; width: 26%; }
#plateau {
  position: absolute; transform: rotateX(58deg) rotateZ(45deg);
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); grid-template-rows: repeat(11, minmax(0, 1fr));
  background: #fff6ea; border-radius: 8px;
}
.case { border: 1px solid rgba(120, 60, 100, .18); background: #fff6ea; cursor: pointer; }
.case:focus-visible { outline: 3px solid #6c8cff; outline-offset: -3px; }
.case.selectionnee { background: #fff !important; box-shadow: inset 0 0 0 4px var(--citron) !important; }
.case.hypotheque { opacity: .45; }
.centre { grid-area: 2 / 2 / 11 / 11; background-color: #b8f0d4; background-image: radial-gradient(#fff 22%, transparent 25%); background-size: 18px 18px; box-shadow: inset 0 0 0 3px #7ee0a1; }
#batiments { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#batiments polygon, #batiments ellipse, #batiments rect, #batiments circle { stroke: rgba(90, 40, 80, .55); stroke-width: .6; stroke-linejoin: round; }
#batiments .batiment { pointer-events: visiblePainted; cursor: pointer; }
#batiments .batiment.hypotheque { filter: grayscale(1); opacity: .55; }
#batiments .corps, #batiments .bulle { transform-box: fill-box; transform-origin: 50% 100%; }
#batiments .batiment.selectionne .corps { animation: sautille .9s ease-in-out infinite; }
#batiments .bulle { animation: flotte 1.8s ease-in-out infinite; }
#batiments .bulle rect { stroke: none; }
#batiments .bulle text { font-family: 'Lilita One', sans-serif; font-size: 14px; }
#batiments .cheval { animation: monte 1.2s ease-in-out infinite; transform-box: fill-box; }
#pions { position: absolute; inset: 0; pointer-events: none; }
.pion { position: absolute; left: 0; top: 0; width: 24px; height: 36px; transform-origin: 0 0; }
.pion .anneau { display: none; position: absolute; left: -5px; bottom: -4px; width: 34px; height: 16px; border-radius: 50%; border: 3px solid var(--rose); animation: pulse 1.4s ease-out infinite; }
.pion.actif .anneau { display: block; }
.pion.actif .nounours { animation: rebond 1.1s ease-in-out infinite; }

.nounours { position: absolute; left: 0; top: 0; width: 24px; height: 36px; transform-origin: 50% 100%; }
.nounours > span { position: absolute; display: block; }
.nounours .ombre { left: 1px; bottom: 0; width: 22px; height: 8px; border-radius: 50%; background: rgba(80, 30, 80, .28); }
.nounours .corps { left: 4px; bottom: 3px; width: 16px; height: 15px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 35% 30%, var(--l), var(--c) 60%, var(--d)); }
.nounours .oreille { bottom: 25px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, var(--l) 0 30%, var(--c) 34% 100%); }
.nounours .oreille.g { left: 2px; } .nounours .oreille.d { right: 2px; }
.nounours .tete { left: 3px; bottom: 14px; width: 18px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--l), var(--c) 60%, var(--d)); }
.nounours .tete::before, .nounours .tete::after { content: ''; position: absolute; top: 5px; width: 2.5px; height: 3px; border-radius: 50%; background: #3a1f2b; }
.nounours .tete::before { left: 5px; } .nounours .tete::after { right: 5px; }
.nounours .museau { left: 8.5px; bottom: 16px; width: 7px; height: 5px; border-radius: 50%; background: #fff3e6; }
.nounours .museau::after { content: ''; position: absolute; left: 2px; top: .5px; width: 3px; height: 2px; border-radius: 50%; background: #3a1f2b; }

#des { position: absolute; left: 0; right: 0; top: 2%; display: flex; justify-content: center; gap: 48px; perspective: 700px; z-index: 5; pointer-events: none; }
.de { --demi: 32px; position: relative; width: 64px; height: 64px; transform-style: preserve-3d; }
.face { position: absolute; inset: 0; background: #fff; border-radius: 14px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 16%; box-shadow: inset 0 0 0 3px #ffd6e8, inset 0 -6px 12px rgba(194, 48, 94, .12); backface-visibility: hidden; }
.point { width: 68%; height: 68%; margin: auto; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8fb3, #e0306e); }
#total { position: absolute; left: 50%; top: 84px; width: 84px; height: 84px; margin-left: -42px; display: grid; place-items: center; isolation: isolate; font-family: 'Lilita One', sans-serif; font-size: 38px; color: var(--rose-fonce); text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff; }
#total::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--citron); clip-path: polygon(50% 0%, 61% 32%, 95% 25%, 72% 52%, 98% 75%, 63% 72%, 50% 100%, 37% 72%, 2% 75%, 28% 52%, 5% 25%, 39% 32%); }

/* ---------- actions et panneaux ---------- */

#actions .rangee { display: flex; align-items: center; gap: 12px; }
#actions .rangee .gros { flex: 1; min-width: 0; height: 76px; font-size: 26px; border-radius: 26px; }
.secondaires { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.aide { margin: 12px 0 0; text-align: center; font-weight: 600; font-size: 14px; color: #6b2a5e; }

.panneau { background: #fff; border-radius: 24px; box-shadow: 0 6px 0 var(--ombre-rose); overflow: hidden; }
.panneau-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--entete, #fff0f7); }
.panneau-entete h2 { margin: 0; font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 22px; line-height: 1.1; }
.fermer { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .8); color: var(--encre); display: grid; place-items: center; }
.panneau-corps { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.lignes { display: flex; flex-direction: column; }
.ligne { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 2px dotted #ffd0e6; font-weight: 600; font-size: 15px; color: #6b3a8f; }
.ligne b { font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 17px; color: var(--encre); }
.ligne.active { color: var(--rose-fonce); }
.note { font-size: 13px; font-weight: 600; color: var(--encre-douce); margin: 0; }
.boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.journal { max-height: 260px; overflow: auto; font-size: 14px; }
.journal p { margin: 0; padding: 5px 0; border-bottom: 2px dotted #ffe3ee; }
.liste-proprietes { display: flex; flex-direction: column; gap: 6px; }
.liste-proprietes h3 { margin: 6px 0 0; font-size: 15px; }
.propriete { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 0; border-radius: 14px; padding: 6px 10px; background: #fff5fa; color: var(--encre); font-weight: 600; font-size: 15px; text-align: left; }
.pastille { width: 16px; height: 16px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 2px rgba(90, 40, 80, .35); }

/* ---------- fenêtres (achat, enchère, fin) ---------- */

#modale { position: fixed; inset: 0; z-index: 40; overflow: auto; background: rgba(74, 35, 102, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: grid; justify-items: center; align-items: start; padding: 24px 16px; }
.rayons { position: fixed; left: 50%; top: 45%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .45) 0 9deg, rgba(255, 255, 255, 0) 9deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 60%); mask-image: radial-gradient(circle, #000 12%, transparent 60%); animation: tourne 26s linear infinite; }
.fenetre { position: relative; width: min(100%, 360px); margin-block: auto; /* centrée, mais défile si elle dépasse */ display: flex; flex-direction: column; gap: 14px; }
.fenetre > .intro { margin: 0; text-align: center; font-family: 'Lilita One', sans-serif; font-size: 24px; color: #fff; text-shadow: 0 3px 0 var(--rose-fonce); }
.titre-propriete { position: relative; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 5px #fff, 0 10px 0 5px var(--ombre-rose), 0 30px 40px rgba(120, 40, 100, .35); animation: entre .8s cubic-bezier(.2, .8, .3, 1.2) both; }
.titre-propriete .bandeau-couleur { position: relative; min-height: 130px; padding: 20px 130px 22px 20px; background-color: var(--entete); background-image: radial-gradient(rgba(255, 255, 255, .25) 20%, transparent 22%); background-size: 16px 16px; }
.titre-propriete .bandeau-couleur::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 12px; background-image: radial-gradient(circle at 10px 12px, #fff 9px, transparent 10px); background-size: 20px 12px; background-repeat: repeat-x; }
.titre-propriete .surtitre { font-weight: 700; font-size: 11px; letter-spacing: 2px; color: var(--encre); opacity: .75; }
.titre-propriete h2 { margin: 4px 0 0; font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 28px; line-height: 1.05; text-shadow: 0 2px 0 rgba(255, 255, 255, .7); }
.illustration { position: absolute; right: 6px; bottom: 6px; width: 120px; height: 120px; overflow: visible; }
.illustration polygon { stroke: rgba(90, 40, 80, .6); stroke-width: .5; stroke-linejoin: round; }
.illustration .corps { transform-box: fill-box; transform-origin: 50% 100%; animation: pousse .9s .4s cubic-bezier(.2, .8, .3, 1.4) both; }
.titre-propriete .lignes { padding: 8px 20px 16px; }
.prix-sucette { position: absolute; right: -10px; top: -26px; width: 80px; height: 80px; transform: rotate(12deg); z-index: 2; }
.prix-sucette::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, #ffd84d 0 20deg, #ffe993 20deg 40deg); box-shadow: 0 0 0 4px #fff, 0 6px 0 4px #d99a00; }
.prix-sucette span { position: absolute; inset: 12px; border-radius: 50%; background: var(--citron); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #6b3a00; font-weight: 700; font-size: 10px; letter-spacing: 1px; }
.prix-sucette b { font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 24px; line-height: 1; letter-spacing: 0; }
.fenetre .gros { width: 100%; }
.fenetre .gros.principal { height: 76px; font-size: 28px; border-radius: 26px; }
.attente-autre { margin: 0; text-align: center; padding: 14px; border-radius: 20px; background: #fff; font-weight: 600; box-shadow: 0 4px 0 var(--ombre-rose); }
.reste { align-self: center; margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .9); text-align: center; font-weight: 600; color: var(--encre); }

.banniere { align-self: center; background: var(--rose); border-radius: 18px; padding: 8px 14px; box-shadow: 0 0 0 4px #fff, 0 8px 0 4px var(--rose-fonce); display: flex; flex-direction: column; gap: 6px; animation: tangue 3s ease-in-out infinite; }
.banniere .titre { font-size: 34px; line-height: 1; letter-spacing: 2px; color: #fff; text-align: center; text-shadow: 0 3px 0 #a52a68; padding: 0 12px; }
.ampoules { display: flex; justify-content: space-between; gap: 10px; }
.ampoule { width: 8px; height: 8px; border-radius: 50%; background: #fff6b0; box-shadow: 0 0 6px var(--citron); animation: clignote 1s steps(1) infinite; }
.ampoule:nth-child(even) { animation-delay: .5s; }
.mini-carte { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 6px 0 var(--ombre-rose); }
.mini-carte .titre { display: block; background: var(--entete); text-align: center; font-size: 20px; padding: 8px 10px; }
.mini-carte .note { display: flex; justify-content: space-between; padding: 8px 14px; }
.chrono { position: relative; align-self: center; width: 170px; height: 170px; }
.chrono svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.chrono .centre-chrono { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.chrono .mise { font-family: 'Lilita One', sans-serif; font-size: 54px; line-height: 1; animation: battement 1s ease-in-out infinite; }
.chrono .decompte { position: absolute; right: -10px; top: 6px; background: var(--citron); border-radius: 12px; padding: 4px 10px; font-family: 'Lilita One', sans-serif; font-size: 18px; color: #6b3a00; box-shadow: 0 3px 0 #d99a00; }
.meneur { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.meneur::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--joueur); }
.mises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mises .gros { height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 24px; line-height: 1; }
.mises .gros small { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 13px; }
.autre-mise { display: flex; gap: 10px; }
.autre-mise label { flex: 1; display: flex; }
.autre-mise input { width: 100%; height: 58px; border-radius: 20px; border: 3px solid #ffd0e6; background: #fff; padding: 0 14px; font-weight: 600; font-size: 17px; outline: none; }
.autre-mise .gros { width: auto; height: 58px; font-size: 20px; }

.victoire { text-align: center; background: #fff; border-radius: 28px; padding: 24px 20px; box-shadow: 0 10px 0 var(--ombre-rose); display: flex; flex-direction: column; align-items: center; gap: 10px; animation: entre .8s cubic-bezier(.2, .8, .3, 1.2) both; }
.victoire .titre { font-size: 40px; color: var(--rose); text-shadow: 0 4px 0 var(--rose-fonce); }
/* Le zoom est sur le podium : l'animation de rebond du nounours écraserait son propre transform. */
.victoire .podium { position: relative; width: 24px; height: 36px; margin: 6px 0 66px; transform: scale(2.8); transform-origin: 50% 0; }
.victoire .podium .nounours { animation: rebond 1s ease-in-out infinite; }

/* ---------- échanges ---------- */

.panneau.echange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.colonne-echange { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.colonne-echange + .colonne-echange { border-left: 3px dotted #ffd0e6; }
.colonne-echange h3 { margin: 0; font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 17px; line-height: 1.1; }
.colonne-echange ul { margin: 0; padding-left: 18px; font-weight: 600; font-size: 14px; }
.colonne-echange .argent-liste { color: #8a5a00; }
.jetons { display: flex; flex-direction: column; gap: 6px; }
.jeton-propriete { display: flex; align-items: center; gap: 6px; min-height: 40px; border: 2px solid #ffe3ee; border-radius: 12px; padding: 4px 8px; background: #fff; color: var(--encre); font-weight: 600; font-size: 13px; text-align: left; }
.jeton-propriete[aria-pressed="true"] { border-color: var(--rose); background: #ffe3ee; box-shadow: 0 3px 0 var(--ombre-rose); }
.jeton-propriete:disabled { opacity: .45; }
.argent-echange { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.argent-echange input { width: 100%; min-width: 0; height: 40px; border-radius: 12px; border: 2px solid #ffd0e6; padding: 0 8px; font-weight: 600; font-size: 15px; }

/* ---------- effets : cartes piochées, gains, confettis ---------- */

.carte-piochee {
  position: absolute; left: 50%; top: 52%; z-index: 7; width: 210px; transform: translate(-50%, -50%);
  background: #fff; border-radius: 22px; overflow: hidden; text-align: center;
  box-shadow: 0 0 0 5px #fff, 0 9px 0 5px var(--ombre-rose), 0 24px 34px rgba(120, 40, 100, .35);
}
.carte-piochee .titre { display: block; padding: 10px; font-size: 20px; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.carte-piochee.chance .titre { background: #ff8a1f; }
.carte-piochee.caisse .titre { background: #4d8dff; }
.carte-piochee .symbole { display: block; margin-top: 10px; font-family: 'Lilita One', sans-serif; font-size: 40px; line-height: 1; }
.carte-piochee.chance .symbole { color: #ff8a1f; }
.carte-piochee.caisse .symbole { color: #4d8dff; }
.carte-piochee p { margin: 8px 16px 18px; font-weight: 600; font-size: 16px; }
.carte-joueur .gain { position: absolute; right: 10px; top: 34px; z-index: 2; pointer-events: none; padding: 2px 10px; border-radius: 999px; font-family: 'Lilita One', sans-serif; font-size: 20px; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.gain.plus { background: #d9fbe8; color: #0f7a4a; }
.gain.moins { background: #ffe0e6; color: #b4232f; }
.confetti { position: fixed; top: 0; z-index: 70; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }
#attente .gros { width: 100%; margin: 4px 0 8px; }
#attente .note { margin: 0; }

/* ---------- animations ---------- */

@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes balance { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes derive { from { transform: translateX(0); } to { transform: translateX(30px); } }
@keyframes cligne { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes monte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes rebond { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(.95, 1.05); } }
@keyframes sautille { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes apparait { from { transform: translateY(-8px); opacity: 0; } }
@keyframes entre { 0% { transform: perspective(900px) rotateY(80deg) scale(.6); opacity: 0; } 60% { transform: perspective(900px) rotateY(-10deg) scale(1.03); opacity: 1; } 100% { transform: none; } }
@keyframes pousse { 0% { transform: translateY(10px) scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes tangue { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg); } }
@keyframes clignote { 50% { opacity: .25; } }
@keyframes battement { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
