/* script/jeu_deco.css : jeu « Décore ta maison » */
.jm { --jm-bois: #7a4e2c; --jm-bois-clair: #a87449; --jm-creme: #fbf6ee; --jm-bleu: #3fa9f5; --jm-or: #d4af37; --jm-encre: #241a12;
      max-width: 1200px; margin: 0 auto; padding-block: 8px 40px; color: var(--jm-encre); }
.jm-tete h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; }
.jm-intro { color: #4A4339; max-width: 760px; margin: 4px 0 14px; }

.jm-niveaux { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; scrollbar-width: thin; }
.jm-niv { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
          min-width: 128px; padding: 7px 10px; border-radius: 12px; border: 1px solid #E6DFD3; background: #fff; color: inherit; cursor: pointer; font: inherit; }
.jm-niv-num { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #f3ece1; }
.jm-niv-nom { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.jm-niv-et { font-size: .72rem; color: #5F574C; }
.jm-niv.is-ferme { background: #efebe4; color: #8b8378; }
.jm-niv.is-actif { border-color: var(--jm-or); box-shadow: 0 0 0 2px var(--jm-or); }
.jm-niv.is-gagne .jm-niv-num { background: var(--jm-or); color: #fff; }
.jm-et { color: #cfc6b8; }
.jm-et.is-on { color: var(--jm-or); }

.jm-barre { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 16px; margin-bottom: 10px; }
.jm-barre-titre { font-weight: 800; font-size: 1.1rem; }
.jm-temps { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.jm-jauge { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: #e9e2d6; overflow: hidden; }
.jm-jauge-in { height: 100%; width: 100%; background: linear-gradient(90deg, #8a6d12, #d4af37); transition: width .1s linear; }
.jm-jauge-in.is-court { background: #A3211A; }

/* Scène */
.jm-cadre { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(60, 40, 20, .22); background: #2a1d12; }
.jm-cadre.is-erreur { animation: jm-secoue .35s; }
@keyframes jm-secoue { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.jm-scene { position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; user-select: none; -webkit-user-select: none; }
.jm-toile { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.jm-objets { position: absolute; inset: 0; }
.jm-place { position: absolute; line-height: 0; cursor: pointer; }
.jm-place img { width: 100%; height: auto; display: block; pointer-events: none; }
.jm-place:not(.is-rempli) img {
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 0 6px rgba(120, 200, 255, .9));
    opacity: .5; animation: jm-respire 2.2s ease-in-out infinite;
}
.jm-place.is-survol:not(.is-rempli) img { opacity: .9; filter: brightness(0) invert(1) drop-shadow(0 0 4px #fff) drop-shadow(0 0 14px var(--jm-bleu)); animation: none; }
.jm-place.is-rempli { cursor: default; }
.jm-place.is-rempli img { filter: drop-shadow(0 6px 6px rgba(40, 25, 10, .35)); }
.jm-place.is-pop { animation: jm-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes jm-pop { from { transform: scale(.6); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@keyframes jm-respire { 50% { opacity: .78; } }
.jm-etincelle { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 8px #ffd56b; pointer-events: none;
                animation: jm-etincelle .7s ease-out forwards; z-index: 200; }
@keyframes jm-etincelle { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* Carrousel des objets, façon étagère en bois */
.jm-etagere { display: flex; align-items: center; gap: 8px; padding: 10px 10px 12px;
              background: linear-gradient(#9a6a42, #7a4e2c 60%, #5f3b20); border-top: 2px solid #c2905f; }
.jm-fleche { flex: 0 0 auto; width: 34px; height: 54px; border-radius: 10px; border: 0; background: rgba(255, 240, 215, .18); color: #ffe7b8;
             font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.jm-fleche:hover { background: rgba(255, 240, 215, .32); }
.jm-carrousel { flex: 1 1 auto; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px; scrollbar-width: none; }
.jm-carrousel::-webkit-scrollbar { display: none; }
.jm-carte-obj { flex: 0 0 auto; width: 96px; height: 96px; padding: 8px; border-radius: 16px; border: 3px solid transparent; scroll-snap-align: start;
                background: linear-gradient(#fffdf8, #f1e7d7); box-shadow: 0 4px 10px rgba(30, 15, 5, .35), inset 0 -3px 0 rgba(120, 80, 40, .15);
                cursor: grab; touch-action: none; display: grid; place-items: center; transition: transform .15s; }
.jm-carte-obj img { width: 100%; height: 100%; min-width: 0; min-height: 0; display: block; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(40, 25, 10, .3)); }
.jm-carte-obj { box-sizing: border-box; grid-template: 100% / 100%; overflow: hidden; }
.jm-carte-obj:hover { transform: translateY(-3px); }
.jm-carte-obj.is-choisi { border-color: var(--jm-bleu); box-shadow: 0 0 0 3px rgba(63, 169, 245, .35), 0 0 18px rgba(63, 169, 245, .8); }
.jm-carte-obj.is-glisse { opacity: .35; }
.jm-carte-obj:focus-visible, .jm-btn:focus-visible, .jm-niv:focus-visible, .jm-fleche:focus-visible { outline: 3px solid var(--jm-bleu); outline-offset: 2px; }
.jm-vide { color: #ffe7b8; margin: 0; padding: 30px 8px; font-weight: 700; }
.jm-clone { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .35)); }
.jm-astuce { color: #5F574C; font-size: .85rem; margin: 8px 2px 0; min-height: 1em; }

/* Fenêtres par-dessus la scène */
.jm-voile { position: absolute; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 12px;
            background: rgba(26, 18, 10, .45); backdrop-filter: blur(2px); }
.jm-voile[hidden] { display: none; }
.jm-carte { background: #fffdf8; border-radius: 18px; padding: 20px 22px; max-width: 520px; max-height: 100%; overflow: auto; text-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.jm-carte h2 { font-size: 1.3rem; margin: 4px 0 8px; text-wrap: balance; }
.jm-carte p { color: #4A4339; margin: 0 0 12px; }
.jm-carte-sur { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: #8a6d12; font-weight: 800; }
.jm-etoiles { font-size: 2rem; letter-spacing: 4px; }
.jm-boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.jm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 2px solid transparent;
          background: var(--jm-or); color: #1a1a1a; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.jm-btn:hover { background: #e2c35a; }
.jm-btn-ligne { background: transparent; border-color: #1a1a1a; }
.jm-btn-ligne:hover { background: #1a1a1a; color: #fff; }
.jm-petit { font-size: .85rem; }
.jm-produits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; }
.jm-produit { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: inherit; font-size: .7rem; line-height: 1.15; }
.jm-produit img { width: 64px; height: 64px; object-fit: contain; background: #f4ece0; border-radius: 12px; padding: 4px; }
.jm-produit[href]:hover span { text-decoration: underline; }
.jm-bulle { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 250; background: #A3211A; color: #fff; padding: 6px 12px;
            border-radius: 20px; font-size: .9rem; white-space: nowrap; animation: jm-bulle 1.4s forwards; }
@keyframes jm-bulle { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 600px) {
    .jm-carte-obj { width: 72px; height: 72px; padding: 6px; border-radius: 12px; }
    .jm-fleche { width: 26px; height: 44px; font-size: 1.2rem; }
    .jm-carte { padding: 14px; }
    .jm-carte h2 { font-size: 1.1rem; }
    .jm-produit { width: 60px; }
    .jm-produit img { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .jm *, .jm-clone { animation: none !important; transition: none !important; } }
/* Ombre plus large et plus foncee que l'objet, pour qu'elle depasse dessous (avant : cachee par l'objet) */
.jm-ombre-sol { position: absolute; left: -6%; right: -6%; bottom: -7%; height: 16%; min-height: 10px; border-radius: 50%;
                 background: radial-gradient(closest-side, rgba(40, 25, 10, .7), rgba(40, 25, 10, 0)); }
.jm-place img { position: relative; }

/* La décoratrice */
.jm-perso { position: absolute; left: 108%; top: 86%; height: 50%; aspect-ratio: 80 / 180; transform: translate(-50%, -100%);
            transition-property: left, top, height; transition-timing-function: linear; pointer-events: none; z-index: 90; }
.jm-perso-corps { position: relative; width: 100%; height: 100%; transition: transform .2s; }
.jm-perso.is-gauche .jm-perso-corps { transform: scaleX(-1); }
.jm-perso svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 4px rgba(30, 18, 8, .25)); }
.jm-jambe, .jm-bras { transform-box: view-box; }
.jm-jambe { transform-origin: 40px 106px; }
.jm-bras { transform-origin: 41px 60px; transition: transform .25s; }
.jm-perso.is-marche .jm-jambe-av { animation: jm-pas var(--jm-pas, .7s) ease-in-out infinite alternate; }
.jm-perso.is-marche .jm-jambe-ar { animation: jm-pas var(--jm-pas, .7s) ease-in-out infinite alternate-reverse; }
.jm-perso.is-marche .jm-perso-corps { animation: jm-rebond calc(var(--jm-pas, .7s) / 2) ease-in-out infinite alternate; }
@keyframes jm-pas { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes jm-rebond { to { translate: 0 -2%; } }
.jm-perso:not(.is-porte) .jm-bras-ar { transform: rotate(8deg); }
.jm-perso.is-marche:not(.is-porte) .jm-bras-av { animation: jm-pas var(--jm-pas, .7s) ease-in-out infinite alternate-reverse; }
.jm-perso.is-porte .jm-bras { transform: rotate(-150deg); }
.jm-perso.is-pose .jm-bras { transform: rotate(-120deg); }
.jm-perso-objet { position: absolute; left: 52%; bottom: 86%; width: 150%; height: 42%; object-fit: contain; object-position: bottom center;
                  transform: translateX(-50%); opacity: 0; transition: opacity .15s; filter: drop-shadow(0 4px 4px rgba(30, 18, 8, .3)); }
.jm-perso.is-porte .jm-perso-objet { opacity: 1; }
.jm-perso.is-gauche .jm-perso-objet { transform: translateX(-50%) scaleX(-1); }
.jm-vol { position: absolute; z-index: 150; pointer-events: none; transition: left .35s ease-in, top .35s cubic-bezier(.5, -0.6, .7, 1), width .35s; filter: drop-shadow(0 6px 6px rgba(30, 18, 8, .3)); }
.jm-place.is-attente img { filter: brightness(0) invert(1) drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px #f3c552); opacity: .8; animation: none; }

/* Fond en photo (envoyée dans l'admin) */
.jm-scene.is-photo { background-size: cover; background-position: center; }
/* Personnage en image (envoyée dans l'admin) */
.jm-perso.is-image { aspect-ratio: auto; }
.jm-perso.is-image .jm-perso-image { display: block; height: 100%; width: auto; max-width: none; filter: drop-shadow(0 4px 4px rgba(30, 18, 8, .25)); }
.jm-perso.is-image .jm-perso-objet { left: 50%; bottom: 100%; width: 120%; height: 30%; }
.jm-perso.is-image.is-marche .jm-perso-corps { animation: jm-rebond calc(var(--jm-pas, .7s) / 2) ease-in-out infinite alternate; }

/* Teinte réglée dans l'admin (--jm-fx) et objets retournés */
.jm-place { --jm-fx: hue-rotate(0deg); }
.jm-place.is-rempli img { filter: var(--jm-fx) drop-shadow(0 6px 6px rgba(40, 25, 10, .35)); }
.jm-place img { transform: rotate(var(--jm-rot, 0deg)); }
.jm-place.is-miroir img { transform: rotate(var(--jm-rot, 0deg)) scaleX(-1); }

/* Produits de la boutique de la pièce, sous le jeu */
.jm-boutique { margin: 28px 0 10px; }
.jm-boutique h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.jm-bq-intro { color: #6b6257; margin: 0 0 14px; font-size: .95rem; }
.jm-bq-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.jm-bq-carte { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #E6DFD3; border-radius: 12px; background: #fff;
              color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.jm-bq-carte:hover { box-shadow: 0 8px 20px rgba(60, 40, 20, .14); transform: translateY(-2px); color: inherit; }
.jm-bq-img { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #faf7f0; }
.jm-bq-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.jm-bq-nom { font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-bq-prix { font-weight: 800; color: #8a6d12; }
.jm-bq-prix s { color: #9a9087; font-weight: 400; margin-right: 4px; }
@media (max-width: 575px) { .jm-bq-liste { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Écran de départ du niveau : carrousel des produits de la pièce */
.jm-defile { margin: 4px 0 14px; text-align: left; }
.jm-df-titre { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8a6d12; margin-bottom: 6px; text-align: center; }
.jm-df-fenetre { overflow: hidden; border-radius: 12px; }
.jm-defile:not(.is-anime) .jm-df-piste { justify-content: center; }
.jm-df-piste { display: flex; gap: 10px; width: max-content; min-width: 100%; }
.jm-defile.is-anime .jm-df-piste { animation: jm-defile var(--jm-df-duree, 12s) linear infinite; }
.jm-defile.is-anime .jm-df-fenetre:hover .jm-df-piste { animation-play-state: paused; }
@keyframes jm-defile { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 5px)); } }
.jm-df-carte { flex: 0 0 104px; display: flex; flex-direction: column; gap: 3px; padding: 7px; border: 1px solid #E6DFD3; border-radius: 10px; background: #fff;
               color: inherit; text-decoration: none; font-size: .78rem; line-height: 1.2; }
.jm-df-carte:hover { border-color: #d4af37; color: inherit; }
.jm-df-carte img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; background: #faf7f0; display: block; }
/* Firefox : sans largeur fixe, une grande photo élargit la carte et la sort de la fenêtre du carrousel */
.jm-df-carte { box-sizing: border-box; width: 104px; min-width: 0; overflow: hidden; }
.jm-df-carte img { width: 88px; height: 88px; max-width: 100%; }
@media (max-width: 575px) { .jm-df-carte { width: 84px; } .jm-df-carte img { width: 68px; height: 68px; } }
.jm-df-nom { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-df-prix { font-weight: 800; color: #8a6d12; }
@media (max-width: 575px) { .jm-df-carte { flex-basis: 84px; } }
@media (prefers-reduced-motion: reduce) { .jm-df-fenetre { overflow-x: auto; } }

/* 05/11 : encart surprise (roue de la fortune) en fin de pièces ouvertes */
.jm-surprise { margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, #fff3cf, #fde5a6); border: 2px dashed #d4af37; color: #4a3413; }
.jm-surprise-titre { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; animation: jm-surprise-pulse 1.6s ease-in-out infinite; }
.jm-surprise p { margin: 0; font-size: .92rem; }
@keyframes jm-surprise-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .jm-surprise-titre { animation: none; } }
/* 05/11 : case finale roue de la fortune dans la barre des niveaux */
.jm-niv-roue { background: linear-gradient(120deg, #fff3cf, #fde5a6); border: 2px dashed #d4af37; }
.jm-niv-roue .jm-niv-num { background: #fff; font-size: 1rem; }
.jm-niv-roue.is-pret { animation: jm-surprise-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .jm-niv-roue.is-pret { animation: none; } }
/* 05/11 : case surprise animée (cadeau qui bouge, texte qui brille) */
.jm-niv-roue { grid-template-rows: auto; position: relative; overflow: hidden; }
.jm-niv-roue .jm-niv-num { grid-row: 1; }
.jm-cadeau { display: inline-grid; animation: jm-cadeau-bouge 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes jm-cadeau-bouge { 0%, 60%, 100% { transform: rotate(0) scale(1); } 66% { transform: rotate(-14deg) scale(1.12); } 72% { transform: rotate(12deg) scale(1.12); } 78% { transform: rotate(-8deg) scale(1.08); } 84% { transform: rotate(5deg) scale(1.04); } 90% { transform: rotate(0) scale(1); } }
.jm-surprise-brille { background: linear-gradient(90deg, #7a4e14 0%, #7a4e14 40%, #f6d77a 50%, #7a4e14 60%, #7a4e14 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: jm-brille 2.8s linear infinite; }
@keyframes jm-brille { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.jm-niv-roue::after { content: '✨'; position: absolute; top: 2px; right: 6px; font-size: .75rem; animation: jm-etincelle 1.8s ease-in-out infinite; }
@keyframes jm-etincelle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.1); } }
.jm-niv-roue.is-jouee .jm-cadeau, .jm-niv-roue.is-jouee .jm-surprise-brille, .jm-niv-roue.is-jouee::after { animation: none; }
.jm-niv-roue.is-jouee .jm-surprise-brille { color: #5F574C; background: none; }
.jm-niv-roue.is-jouee::after { content: none; }
@media (prefers-reduced-motion: reduce) { .jm-cadeau, .jm-surprise-brille, .jm-niv-roue::after { animation: none; } .jm-surprise-brille { color: #7a4e14; background: none; } }

/* 05/11 : bandeau « TOP 5 des meilleurs décorateurs » (pages/jeu_maison.php) */
.jm-top { display: flex; gap: 18px; align-items: center; margin: 10px 0 16px; padding: 16px 20px; border-radius: 18px; color: #fff;
    background: radial-gradient(circle at 12% 40%, rgba(212, 175, 55, .35), transparent 45%), linear-gradient(120deg, #1d140b, #3b2716 55%, #1d140b);
    border: 2px solid #d4af37; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 10px 28px rgba(120, 80, 10, .35); }
.jm-top-coupe { font-size: 4.2rem; line-height: 1; filter: drop-shadow(0 0 12px rgba(255, 200, 60, .7)); animation: jm-top-brille 3s ease-in-out infinite; }
@keyframes jm-top-brille { 0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 200, 60, .5)); } 50% { filter: drop-shadow(0 0 18px rgba(255, 210, 80, .95)); } }
.jm-top-corps { flex: 1; min-width: 0; }
.jm-top-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jm-top h2 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 900; color: #fff; text-shadow: 0 2px 10px rgba(212, 175, 55, .6); }
.jm-top-tete p { margin: 2px 0 0; color: #f1e6cf; }
.jm-top-badge { background: linear-gradient(180deg, #ffe27a, #d4af37); color: #241a12; font-weight: 800; border-radius: 999px; padding: 7px 16px; white-space: nowrap; box-shadow: 0 0 14px rgba(255, 215, 90, .5); }
.jm-top-liste { list-style: none; margin: 0; padding: 10px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.jm-top-place { position: relative; text-align: center; padding: 18px 8px 10px; margin-top: 12px; border-radius: 12px; background: rgba(0, 0, 0, .45); border: 2px solid #8c8c8c; }
.jm-top-rang { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1; }
.jm-top-rang b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #6f6f6f; color: #fff; font-size: .95rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.jm-top-nom { display: block; font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jm-top-pts { display: block; font-size: .9rem; color: #f1e6cf; }
.jm-top-1 { border-color: #d4af37; box-shadow: 0 0 14px rgba(212, 175, 55, .55); }
.jm-top-1 .jm-top-rang { top: -34px; font-size: 1.1rem; }
.jm-top-1 .jm-top-rang b { background: #d4af37; color: #241a12; }
.jm-top-2 { border-color: #c9ced6; } .jm-top-2 .jm-top-rang b { background: #9aa3ae; }
.jm-top-3 { border-color: #c98a4b; } .jm-top-3 .jm-top-rang b { background: #b8712e; }
.jm-top-place.is-libre { opacity: .7; border-style: dashed; }
.jm-top-place.is-moi { outline: 2px solid #ffe27a; outline-offset: 2px; }
.jm-top-regle { margin: 10px 0 0; font-size: .75rem; color: #cdbf9f; }
@media (max-width: 900px) {
    .jm-top { flex-direction: column; text-align: center; padding: 14px; }
    .jm-top-coupe { font-size: 3rem; }
    .jm-top-tete { justify-content: center; }
    .jm-top-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .jm-top-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .jm-top-coupe { animation: none; } }
/* 05/11 : invitation à se connecter sous l'intro du jeu */
.jm-connexion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; padding: 10px 14px; border-radius: 12px; background: #fff7e0; border: 1px solid #e6c766; color: #4a3413; }
.jm-connexion .jm-btn { margin-left: auto; }
/* 05/11 : partage du temps sur les réseaux (carte de fin de pièce) */
.jm-partage { margin: 12px 0 4px; padding: 10px 12px; border-radius: 14px; background: #f3eee6; }
.jm-partage-titre { font-weight: 800; margin-bottom: 8px; }
.jm-partage-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jm-pt { display: inline-block; border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .85rem; text-decoration: none; background: #fff; color: #3b2716; box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; }
.jm-pt-fb { background: #1877f2; color: #fff; } .jm-pt-wa { background: #25d366; color: #fff; }
.jm-pt:hover { filter: brightness(1.08); color: inherit; } .jm-pt-fb:hover, .jm-pt-wa:hover { color: #fff; }
