/* Appel des secours à la guilde (lot I8, 5/11/2026) : fenêtres façon Donjon Mystère, en rouge d'alerte et or. */
.sos { background: radial-gradient(ellipse at center, rgba(110,20,20,.5), rgba(10,2,4,.72)); }
.sos-box { border-image-source: url('assets/ui/cadres/cadre1_pink_translucide.png'); box-shadow: 0 0 28px rgba(255,110,70,.45); background: linear-gradient(rgba(60,14,22,.92), rgba(22,6,10,.94)) padding-box;
  width: min(560px, 94vw); padding: 12px 14px; text-align: center; animation: sos-in .35s steps(5); }
.sos-titre { color: #ffd2b8; text-shadow: 2px 2px 0 #6a1414; font-size: 28px; }
.sos-texte { margin: 6px 0; font-size: 19px; }
.sos-guilde { font-size: 20px; margin-top: 4px; }
.sos-petit { margin: 4px 0; font-size: 15px; }
.sos-act { justify-content: center; gap: 10px; margin: 8px 0 4px; align-items: center; flex-wrap: wrap; }
.sos .btn.primary, .sos-modal .btn.primary { filter: hue-rotate(-28deg) saturate(1.4); }
.sos-ok { color: #9dffb8; font-size: 20px; }
/* Boutons de taille fixe : le curseur de sélection (manette, toucher) ne les fait pas changer de ligne sous le doigt */
.sos-boutons { display: flex; justify-content: center; gap: 10px; }
.sos-boutons .btn, .sos-act .btn { min-width: 210px; justify-content: center; }
.sos-refus { color: #ff9a9a; }
.sos-temps { margin-top: 8px; height: 5px; background: rgba(0,0,0,.45); border-radius: 3px; overflow: hidden; }
.sos-temps i { display: block; height: 100%; background: linear-gradient(90deg, #ff6b4a, #ffd35c); transform-origin: left; transition: transform 1s linear; }
.sos-message { display: flex; align-items: center; gap: 10px; text-align: left; margin: 8px 0; font-size: 18px; }
.sos-message .portrait { width: 56px; height: 56px; flex: none; border: 2px solid #ff8a5c; image-rendering: pixelated; }
.sos-chrono { margin: 4px 0; }
.sos-chrono .sos-sec, .sos-chrono-mini { font-size: 40px; color: #ffe27a; text-shadow: 2px 2px 0 #6a1414; letter-spacing: 2px; }
.sos-chrono-mini { font-size: 26px; }
.sos-sec.urgent { color: #ff6b6b; animation: sos-clign .5s steps(2) infinite; }
.sos-places { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sos-place { width: 92px; padding: 4px 2px; border: 2px dashed #6a3030; background: #1a0a0e; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; color: #b89a9a; }
.sos-place .portrait, .sos-vide { width: 44px; height: 44px; image-rendering: pixelated; }
.sos-vide { display: flex; align-items: center; justify-content: center; font-size: 26px; color: #6a3030; border: 2px solid #3a1818; animation: sos-attend 1.2s steps(4) infinite; }
.sos-place.pleine { border-style: solid; border-color: #ffd35c; color: #ffe9b0; background: #2a1a0a; }
.sos-place.neuve { animation: sos-neuve .5s steps(5); }
.sos-place b { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sos-part { animation: sos-out .25s steps(4) forwards; }
body:has(.sos) #h-pause, body:has(.sos) .tuto-bulle { display: none; }
body:has(.sos-bandeau) #h-pause { display: none; } /* le bandeau dit déjà que l'on attend les secours */
@media (max-height: 500px) { .sos-bandeau { top: 44px; font-size: 13px; gap: 8px; padding: 2px 8px; } .sos-b-attente { display: none; } }

/* Bandeau pendant le combat des secours */
.sos-bandeau { position: absolute; top: max(58px, 8vh); left: 50%; transform: translateX(-50%); z-index: 5; pointer-events: none;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 94vw;
  padding: 4px 12px; border: 2px solid #ff8a5c; background: rgba(30,8,10,.82); box-shadow: 0 0 14px rgba(255,110,70,.4); font-size: 17px; text-shadow: 0 2px 0 #000; animation: sos-in .3s steps(4); }
.sos-bandeau b { color: #ffd2b8; }
.sos-b-temps { color: #ffe27a; }
.sos-b-noms { color: #9dffb8; }
.sos-b-attente { color: #c8b0b0; font-size: 15px; }
.sos-bandeau.urgent .sos-b-temps { color: #ff6b6b; animation: sos-clign .5s steps(2) infinite; }

/* Fenêtre surgissante chez les membres de la guilde */
.sos-modal { background: rgba(10,2,4,.55); z-index: 60; }
.sos-alerte { position: relative; overflow: hidden; }
.sos-sirene { position: absolute; top: 0; left: 0; right: 0; height: 6px; display: flex; }
.sos-sirene i { flex: 1; background: #ff4a3a; animation: sos-sirene .6s steps(2) infinite; }
.sos-sirene i + i { background: #ffd35c; animation-delay: .3s; }
.sos-surgit .sos-box { animation: sos-surgit .45s steps(6); }
.sos-places-txt { font-size: 18px; }
.sos-pl { color: #ffe27a; }

/* Fin chez le sauveteur */
.sos-fin-banniere { position: fixed; top: 38%; left: 50%; transform: translate(-50%, -50%); z-index: 70; padding: 10px 26px; font-size: 40px; pointer-events: none;
  border: 3px solid #ffd35c; background: rgba(20,10,4,.88); color: #ffe27a; text-shadow: 3px 3px 0 #6a1414; animation: sos-surgit .4s steps(5); }
.sos-fin-banniere.ko { border-color: #9a8cb8; color: #d8d0f0; }
.sos-resultat.ok { border-image-source: url('assets/ui/cadres/cadre1_yellow_translucide.png'); box-shadow: 0 0 30px rgba(255,211,92,.45); background: linear-gradient(rgba(44,30,8,.92), rgba(18,12,4,.94)) padding-box; }
.sos-gains { display: flex; justify-content: center; gap: 16px; margin: 10px 0; flex-wrap: wrap; }
.sos-gain { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; padding: 6px; border: 2px solid #b88a2e; background: #1e1408; animation: sos-neuve .6s steps(5) both; }
.sos-gain + .sos-gain { animation-delay: .25s; }
.sos-gain img { width: 32px; height: 32px; image-rendering: pixelated; }
.sos-gain b { font-size: 26px; color: #ffe27a; }
.sos-gain span { font-size: 14px; color: #e8d8b0; }
.sos-xp { width: 32px; height: 32px; display: flex !important; align-items: center; justify-content: center; font-size: 15px !important; color: #9dffb8 !important; border: 2px solid #5ce0a0; }

@keyframes sos-in { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sos-out { to { transform: scale(.9); opacity: 0; } }
@keyframes sos-surgit { 0% { transform: translateY(-40px) scale(.8); opacity: 0; } 60% { transform: translateY(6px) scale(1.04); opacity: 1; } 100% { transform: none; } }
@keyframes sos-clign { 50% { opacity: .35; } }
@keyframes sos-sirene { 50% { opacity: .2; } }
@keyframes sos-attend { 50% { color: #a04848; border-color: #6a3030; } }
@keyframes sos-neuve { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: none; } }
.sos-bandeau { transform: translateX(-50%); }
@keyframes sos-in-b { from { opacity: 0; } to { opacity: 1; } }
.sos-bandeau { animation-name: sos-in-b; }
.sos-fin-banniere { animation-name: sos-in-b; }

@media (max-width: 560px) {
  .sos-titre { font-size: 23px; }
  .sos-texte, .sos-message { font-size: 16px; }
  .sos-place { width: 72px; } .sos-place .portrait, .sos-vide { width: 36px; height: 36px; }
  .sos-chrono .sos-sec { font-size: 32px; }
  .sos-bandeau { font-size: 15px; gap: 8px; }
  .sos-fin-banniere { font-size: 28px; }
  .sos-boutons, .sos-act { flex-direction: column; align-items: center; }
  .sos-boutons .btn, .sos-act .btn { width: min(280px, 78vw); }
  .sos-alerte .sos-act { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) { .sos-box, .sos-sec.urgent, .sos-vide, .sos-place.neuve, .sos-sirene i, .sos-bandeau, .sos-gain, .sos-fin-banniere { animation: none; } }

/* (25/11, secours v2) Avec quel Pokémon pars-tu ? (la grille de Ma Team, avec le compte à rebours des secours) */
.modal.mt-choix.sos-choix { z-index: 70; } /* devant les autres fenêtres (cadeau du jour…), derrière le petit clavier (80) */
.mt-choix.sos-choix > .box { box-shadow: 0 0 26px rgba(255,107,74,.45); animation: sos-surgit .45s ease-out; }
.sos-choix-haut { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; }
.sos-choix-txt { flex: 1; font-size: 17px; line-height: 1.25; }
.sos-choix-txt .muted { font-size: 15px; }
.sos-choix .sos-temps { margin: 4px 0 8px; }
.mt-actuel { background: #2f7d4a; color: #eafff0; border-color: #9dffb8; }
.sos-place.enroute { border-style: dashed; border-color: #9dffb8; animation: sos-attend-v 1s steps(2) infinite; }
.sos-place.enroute .sos-vide { animation: none; }
@keyframes sos-attend-v { 50% { border-color: #3c7a52; } }
.sos-enroute { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: rgba(18,24,40,.94); border: 2px solid #9dffb8; border-radius: 8px; box-shadow: 0 0 0 2px #0b3a1e, 0 6px 22px rgba(0,0,0,.5); font-size: 18px; animation: sos-surgit .45s ease-out; pointer-events: none; }
.sos-enroute .portrait { width: 48px; height: 48px; image-rendering: pixelated; animation: sos-envol 1.2s ease-in-out infinite; }
@keyframes sos-envol { 50% { transform: translateY(-5px); } }
@media (max-width: 600px) { .sos-choix-haut { gap: 6px; } .sos-choix-txt { font-size: 15px; } .sos-choix-txt .muted { font-size: 13px; } .sos-enroute { top: 12%; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .mt-choix.sos-choix > .box, .sos-place.enroute, .sos-enroute, .sos-enroute .portrait { animation: none; } }

/* (Kiko, 25/11) place prise dès « J'y vais » : le Pokémon actuel, et en petit « Choisit son Pokémon… » */
.sos-place.enroute .portrait { opacity: .85; }
.sos-choisit { font-style: normal; font-size: 11px; line-height: 12px; color: #9dffb8; text-align: center; }
.sos-alerte-places { margin: 2px 0 4px; }
.sos-alerte-places .sos-places { gap: 6px; }
.sos-alerte-places .sos-place { width: 78px; font-size: 13px; }
.sos-alerte-places .sos-place .portrait, .sos-alerte-places .sos-vide { width: 36px; height: 36px; }
@media (max-width: 600px) { .sos-alerte-places .sos-place { width: 64px; } .sos-choisit { font-size: 10px; } }
