/* (24/11/2026) « Reprendre là où vous en étiez » après un redémarrage du serveur (js/reprise.js). Même famille que les grandes
   fenêtres du jeu (cadre doré sur bleu nuit, police PMD) ; un halo d'escalier qui respire derrière, des étincelles qui montent,
   l'équipe qui saute en place, le gros bouton qui brille. Départ : la fenêtre plonge dans l'escalier. */
.rep-modal { z-index: 60; background: radial-gradient(ellipse at 50% 45%, rgba(48, 36, 110, .62), rgba(3, 6, 20, .9)); animation: rep-fond .35s ease-out; overflow-x: hidden; overflow-y: auto; }
.rep-halo { position: absolute; left: 50%; top: 46%; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 215, 106, 0) 0deg, rgba(255, 215, 106, .16) 30deg, rgba(255, 215, 106, 0) 60deg, rgba(143, 180, 255, .14) 120deg, rgba(255, 215, 106, 0) 160deg, rgba(255, 215, 106, .16) 220deg, rgba(255, 215, 106, 0) 260deg, rgba(143, 180, 255, .12) 320deg, rgba(255, 215, 106, 0) 360deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: rep-tourne 18s linear infinite, rep-respire 3.2s ease-in-out infinite; }
.rep-etincelles { position: absolute; inset: 0; pointer-events: none; }
.rep-etincelles i { position: absolute; bottom: -12px; left: calc(6% + var(--k) * 6.6%); width: 6px; height: 6px; background: #ffe9a8; box-shadow: 0 0 8px #ffd76a;
  transform: rotate(45deg); opacity: 0; animation: rep-monte calc(4.2s + var(--k) * .23s) linear infinite; animation-delay: calc(var(--k) * -.61s); }
.rep-etincelles i:nth-child(3n) { background: #c9d9ff; box-shadow: 0 0 8px #8fb4ff; width: 4px; height: 4px; }
.rep-box { position: relative; width: min(760px, 94vw); padding: 20px 26px 16px; text-align: center;
  background: linear-gradient(180deg, #20265a, #12153a); border: 2px solid #ffd76a; box-shadow: 0 0 0 4px rgba(255, 215, 106, .13), 0 0 60px rgba(255, 215, 106, .18), 0 20px 70px rgba(0, 0, 0, .65);
  animation: rep-entree .55s cubic-bezier(.2, 1.45, .4, 1); }
.rep-titre { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: 'PMD Font', 'Pixelify', sans-serif; font-size: 40px; color: var(--gold, #ffd76a); text-shadow: 0 3px 0 #6b3b00, 0 0 18px rgba(255, 215, 106, .35); }
/* L'escalier du donjon, dessiné en marches qui s'allument l'une après l'autre */
.rep-escalier { position: relative; width: 38px; height: 34px; flex: none; }
.rep-escalier::before, .rep-escalier::after { content: ''; position: absolute; inset: 0; }
.rep-escalier::before { background: linear-gradient(#ffd76a, #ffd76a) 0 100% / 38px 8px, linear-gradient(#ffd76a, #ffd76a) 10px 100% / 28px 17px, linear-gradient(#ffd76a, #ffd76a) 20px 100% / 18px 26px, linear-gradient(#ffd76a, #ffd76a) 30px 100% / 8px 34px; background-repeat: no-repeat; filter: drop-shadow(0 2px 0 #6b3b00); }
.rep-escalier::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent) -40px 0 / 30px 100% no-repeat; animation: rep-reflet 2.4s ease-in-out infinite; mix-blend-mode: overlay; }
.rep-sous { font-size: 18px; line-height: 1.35; margin: 6px auto 12px; max-width: 640px; opacity: .93; }
.rep-lieu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin-bottom: 10px; }
.rep-donjon { font-family: 'PMD Font', 'Pixelify', sans-serif; font-size: 28px; color: #fff; text-shadow: 0 2px 0 #000; }
.rep-cran { font-size: 18px; padding: 0 8px; border-radius: 4px; background: #5b2d8a; border: 1px solid #c79bff; color: #f0e0ff; }
.rep-pastille { font-size: 19px; padding: 1px 12px; border-radius: 999px; background: rgba(255, 215, 106, .14); border: 1px solid rgba(255, 215, 106, .55); color: #ffe9a8; }
.rep-pastille.rep-niv { background: rgba(110, 226, 122, .12); border-color: rgba(110, 226, 122, .55); color: #c8ffd0; }
.rep-equipe { display: flex; justify-content: center; gap: 14px; margin: 6px 0 12px; min-height: 128px; }
.rep-poke { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: rep-arrive .5s cubic-bezier(.2, 1.5, .4, 1) backwards; animation-delay: calc(.15s + var(--i) * .09s); }
.rep-cadre { width: 84px; height: 84px; padding: 4px; border: 2px solid #ffd76a; background: #0c1030; box-shadow: 0 0 14px rgba(255, 215, 106, .3); animation: rep-saute 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
.rep-cadre img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.rep-nom { font-size: 18px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-etat { font-size: 14px; min-height: 1.2em; color: var(--dim, #8ea3cf); }
.rep-poke.la .rep-etat { color: var(--ok, #6ee27a); }
.rep-poke.la .rep-cadre { border-color: var(--ok, #6ee27a); box-shadow: 0 0 18px rgba(110, 226, 122, .55); animation: rep-saute 1.6s ease-in-out infinite, rep-allume .5s ease-out; }
.rep-poke.absent .rep-cadre { border-style: dashed; border-color: #6a76b8; box-shadow: none; animation: rep-attend 1.4s ease-in-out infinite; }
.rep-poke.absent img { filter: grayscale(.85) brightness(.6); }
.rep-attente { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 19px; margin: -4px 0 10px; color: #cfe0ff; }
.rep-attente[hidden] { display: none; }
.rep-decompte { color: #ffe9a8; min-width: 6.5em; text-align: left; }
.rep-sablier { width: 14px; height: 18px; flex: none; background: conic-gradient(#ffd76a 0 25%, transparent 0 50%, #ffd76a 0 75%, transparent 0); clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%, 45% 50%); animation: rep-sablier 1.2s steps(4) infinite; }
.rep-go { font-size: 30px; padding: 8px 26px 8px 36px; min-width: min(560px, 86%); animation: rep-brille 1.8s ease-in-out infinite; }
.rep-go:not(:disabled):hover, .rep-go.focus { transform: translateY(-2px) scale(1.03); }
.rep-go.appuye { animation: rep-appuye .35s ease-out; filter: saturate(.7) brightness(.85); }
.rep-go:disabled { cursor: default; }
.rep-bas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.rep-bas .btn { font-size: 18px; }
.rep-bas .btn[hidden] { display: none; }
.rep-seul { animation: rep-arrive .4s cubic-bezier(.2, 1.5, .4, 1); }
.rep-non { opacity: .78; }
.rep-non.rep-sur { opacity: 1; animation: rep-secoue .35s; }
.rep-garde { margin-top: 8px; font-size: 14px; color: var(--dim, #8ea3cf); }
/* Départ : tout plonge dans l'escalier ; sortie (abandon, trop tard) : la fenêtre s'efface */
.rep-modal.rep-depart .rep-box { animation: rep-plonge .9s cubic-bezier(.5, 0, .9, .4) forwards; }
.rep-modal.rep-depart .rep-halo { animation: rep-tourne 2s linear infinite, rep-aspire .9s ease-in forwards; }
.rep-modal.rep-depart { animation: rep-blanc .9s ease-in forwards; }
.rep-modal.rep-sortie { animation: rep-fond-sortie .4s ease-in forwards; }
.rep-modal.rep-sortie .rep-box { animation: rep-sortie .4s ease-in forwards; }
@keyframes rep-fond { from { opacity: 0; } to { opacity: 1; } }
@keyframes rep-fond-sortie { to { opacity: 0; } }
@keyframes rep-entree { from { opacity: 0; transform: translateY(30px) scale(.88); } to { opacity: 1; transform: none; } }
@keyframes rep-sortie { to { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes rep-tourne { to { transform: rotate(360deg); } }
@keyframes rep-respire { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes rep-monte { 0% { opacity: 0; transform: translateY(0) rotate(45deg); } 12% { opacity: .9; } 85% { opacity: .5; } 100% { opacity: 0; transform: translateY(-105vh) rotate(225deg); } }
@keyframes rep-reflet { 0%, 40% { background-position: -40px 0; } 80%, 100% { background-position: 50px 0; } }
@keyframes rep-arrive { from { opacity: 0; transform: translateY(16px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes rep-saute { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes rep-allume { 0% { box-shadow: 0 0 0 rgba(110, 226, 122, 0); } 40% { box-shadow: 0 0 34px rgba(110, 226, 122, .95); } 100% { box-shadow: 0 0 18px rgba(110, 226, 122, .55); } }
@keyframes rep-attend { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes rep-sablier { to { transform: rotate(360deg); } }
@keyframes rep-brille { 0%, 100% { box-shadow: 0 0 0 rgba(255, 215, 106, 0); } 50% { box-shadow: 0 0 26px rgba(255, 215, 106, .75); } }
@keyframes rep-appuye { 0% { transform: scale(1.04); } 50% { transform: scale(.96); } 100% { transform: none; } }
@keyframes rep-secoue { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes rep-plonge { 0% { transform: none; opacity: 1; } 25% { transform: scale(1.05); } 100% { transform: scale(.15) translateY(160px); opacity: 0; } }
@keyframes rep-aspire { to { transform: scale(.2) rotate(180deg); opacity: 0; } }
@keyframes rep-blanc { 0%, 60% { background-color: transparent; } 100% { background-color: rgba(255, 246, 220, .35); } }
@media (max-width: 700px) {
  .rep-titre { font-size: 30px; } .rep-sous { font-size: 16px; } .rep-go { font-size: 24px; }
  .rep-cadre { width: 64px; height: 64px; } .rep-equipe { gap: 8px; min-height: 104px; }
}
/* Téléphone couché (390 px de haut) : tout tient sans défiler */
@media (max-height: 520px) {
  .rep-box { padding: 10px 18px 8px; }
  .rep-titre { font-size: 28px; } .rep-escalier { transform: scale(.75); }
  .rep-sous { font-size: 14px; margin: 2px auto 6px; line-height: 1.25; }
  .rep-donjon { font-size: 22px; } .rep-pastille, .rep-cran { font-size: 15px; }
  .rep-lieu { margin-bottom: 4px; }
  .rep-equipe { min-height: 0; margin: 2px 0 6px; } .rep-cadre { width: 56px; height: 56px; padding: 2px; } .rep-nom { font-size: 15px; } .rep-etat { font-size: 12px; }
  .rep-attente { font-size: 15px; margin: 0 0 6px; }
  .rep-go { font-size: 22px; padding: 4px 18px 4px 28px; }
  .rep-bas { margin-top: 6px; } .rep-bas .btn { font-size: 15px; } .rep-garde { margin-top: 4px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .rep-halo, .rep-etincelles i, .rep-cadre, .rep-go, .rep-escalier::after { animation: none !important; } }
