/* AZUR v94 — ch1-lobby-v94.css : le salon prend vie (complète ch1-lobby-v92.css, même mise en page).
 *  - entrées animées à chaque changement d'onglet (body.v94-enter, posée par ch1-lobby-v94.js) ;
 *  - barre d'XP et barre de mission qui se remplissent, reflet qui passe ;
 *  - bouton JOUER ! qui respire, réagit au survol et à l'appui ; éclat quand on le presse (body.v94-go) ;
 *  - chiffres du compte à rebours qui basculent quand ils changent ;
 *  - places d'escouade « + » qui flottent avec une onde ;
 *  - barre d'onglets sur une seule ligne aussi entre 761 et 1180 px de large.
 * Les règles existantes posent `transform: … !important` sur plusieurs blocs : les animations
 * utilisent donc les propriétés `translate` / `scale`, qui se composent avec elles sans les écraser. */

/* ------------------------------------------------------------------ entrées d'onglet */
@keyframes v94-in-left { from { opacity: 0; translate: -28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes v94-in-right { from { opacity: 0; translate: 28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes v94-in-up { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes v94-in-down { from { opacity: 0; translate: 0 -18px; } to { opacity: 1; translate: 0 0; } }
@keyframes v94-pop { 0% { opacity: 0; scale: 0.4; } 70% { opacity: 1; scale: 1.12; } 100% { opacity: 1; scale: 1; } }
@keyframes v94-tab { 0% { scale: 0.9; filter: brightness(1.5); } 100% { scale: 1; filter: none; } }

html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-progress {
  animation: v94-in-left 0.55s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .v83-event-card {
  animation: v94-in-right 0.55s 0.08s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-play-card {
  animation: v94-in-up 0.55s 0.12s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .ch1-countdown {
  animation: v94-in-down 0.5s 0.05s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .ch1-lobby-actions,
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-player-label {
  animation: v94-in-up 0.5s 0.2s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-invite {
  animation: v94-pop 0.5s 0.25s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-invite-two { animation-delay: 0.33s; }
html body.ch1-ui.v94-enter[data-screen="menu"][data-tab="play"] #ui .classic-invite-three { animation-delay: 0.41s; }
html body.ch1-ui.v94-enter[data-screen="menu"]:not([data-tab="play"]) #ui .v6-panel {
  animation: v94-in-up 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"]:not([data-tab="play"]) #ui .page-preview-label {
  animation: v94-in-left 0.45s 0.06s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
html body.ch1-ui.v94-enter[data-screen="menu"] #ui .topbar .navlinks .ch1-tab.active {
  animation: v94-tab 0.35s ease-out both;
}

/* ------------------------------------------------------------------ barres qui se remplissent */
@keyframes v94-fill { from { width: 0; } }
@keyframes v94-shine { 0%, 55% { translate: -120% 0; } 100% { translate: 260% 0; } }
html body.ch1-ui.v94-enter #ui .ch1-xpbar > i {
  animation: v94-fill 1.25s 0.35s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
html body.ch1-ui.v94-enter #ui .ch1-mbar > i {
  animation: v94-fill 1s 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
html body.ch1-ui #ui .ch1-xpbar > i,
html body.ch1-ui #ui .ch1-mbar > i {
  position: relative;
  overflow: hidden;
}
html body.ch1-ui #ui .ch1-xpbar > i::after,
html body.ch1-ui #ui .ch1-mbar > i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: v94-shine 3.6s 1.4s ease-in-out infinite;
}
.ch1-medal.on {
  animation: v94-pop 0.45s 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

/* ------------------------------------------------------------------ bouton JOUER ! */
@keyframes v94-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.028; } }
@keyframes v94-sweep { 0%, 62% { translate: -160% 0; } 100% { translate: 520% 0; } }
@keyframes v94-go { 0% { scale: 1; } 25% { scale: 1.07; } 100% { scale: 1; } }
@keyframes v94-ring { 0% { opacity: 0.9; scale: 1; } 100% { opacity: 0; scale: 1.25 1.6; } }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn {
  transition: scale 0.16s ease, filter 0.16s ease, translate 0.08s ease;
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn[data-act="play"] {
  animation: v94-breathe 1.8s ease-in-out infinite;
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: v94-sweep 3.4s ease-in-out infinite;
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn[data-act="cancel-ready"]::after {
  display: none;
}
@media (hover: hover) {
  html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn:hover {
    animation-play-state: paused;
    scale: 1.045;
    filter: brightness(1.1) saturate(1.1);
  }
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-play-card .play-btn:active {
  animation: none;
  scale: 0.95;
  translate: 0 3px;
  filter: brightness(0.95);
}
html body.ch1-ui.v94-go[data-screen="menu"][data-tab="play"] #ui .classic-play-card {
  animation: v94-go 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
html body.ch1-ui.v94-go[data-screen="menu"][data-tab="play"] #ui .classic-play-card::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 3px solid #ffe62e;
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(255, 230, 46, 0.8);
  pointer-events: none;
  animation: v94-ring 0.9s ease-out both;
}
@keyframes v94-tick { 0% { scale: 1.35; color: #ffe62e; } 100% { scale: 1; } }
html body.ch1-ui.v94-ready[data-screen="menu"][data-tab="play"] #ui .classic-ready-note {
  animation: v94-tick 0.45s ease-out both;
}

/* ------------------------------------------------------------------ compte à rebours : chiffres qui basculent */
@keyframes v94-flip {
  0% { transform: perspective(160px) rotateX(-88deg); opacity: 0.2; color: #ffd0d0; }
  60% { transform: perspective(160px) rotateX(12deg); opacity: 1; }
  100% { transform: perspective(160px) rotateX(0); }
}
.ch1-countdown b .v94-dg,
.ch1-countdown b .v94-cs {
  display: inline-block;
  font-style: normal;
  transform-origin: 50% 60%;
}
.ch1-countdown b .v94-flip {
  animation: v94-flip 0.42s cubic-bezier(0.3, 1.2, 0.5, 1) both;
}
.ch1-countdown b .v94-cs {
  animation: v94-blink 1s steps(2, end) infinite;
}
@keyframes v94-blink { 50% { opacity: 0.45; } }

/* ------------------------------------------------------------------ places d'escouade « + » */
@keyframes v94-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes v94-ping { 0% { opacity: 0.75; scale: 1; } 100% { opacity: 0; scale: 1.55; } }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite {
  animation: v94-float 3.2s ease-in-out infinite;
  transition: scale 0.15s ease, background 0.15s ease, color 0.15s ease;
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite-two { animation-delay: -1.1s; }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite-three { animation-delay: -2.2s; }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 2px solid rgba(39, 211, 255, 0.75);
  border-radius: 4px;
  pointer-events: none;
  animation: v94-ping 2.4s ease-out infinite;
}
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite-two::before { animation-delay: -0.8s; }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite-three::before { animation-delay: -1.6s; }
html body.ch1-ui[data-screen="menu"][data-tab="play"] #ui .classic-invite:active {
  scale: 0.9;
}

/* ------------------------------------------------------------------ boutons EMOTE / FORMATION */
html body.ch1-ui #ui .ch1-lobby-actions .btn {
  transition: scale 0.12s ease, background 0.15s ease !important;
}
html body.ch1-ui #ui .ch1-lobby-actions .btn:active {
  scale: 0.94;
}
@media (hover: hover) {
  html body.ch1-ui #ui .ch1-lobby-actions .btn:hover {
    background: rgba(26, 44, 102, 0.95) !important;
  }
}

/* ------------------------------------------------------------------ onglets sur une ligne (écrans moyens) */
@media (min-width: 761px) and (max-width: 1180px) and (min-height: 521px) {
  html body.ch1-ui[data-screen="menu"] #ui .topbar .navlinks {
    position: absolute !important;
    top: 0 !important;
    left: 56px !important;
    right: auto !important;
    width: auto !important;
    margin: 0 !important;
    transform: none !important;
  }
  html body.ch1-ui[data-screen="menu"] #ui .topbar .navlinks .ch1-tab {
    font-size: 16px !important;
    padding: 0 9px !important;
  }
  html body.ch1-ui[data-screen="menu"] #ui .topbar .navlinks .ch1-tab-aux {
    width: 36px !important;
    min-width: 36px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.ch1-ui #ui *,
  html body.ch1-ui #ui *::before,
  html body.ch1-ui #ui *::after {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
  }
}
