/* =========================
   PARTIE EN COURS – MOTEUR V1
========================= */

/* Lueur rose sur les bords gauche et droit de l'écran pendant la partie */
body.game-round-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(to right, rgba(255, 77, 109, 0.4) 0%, rgba(255, 77, 109, 0.15) 80px, transparent 220px),
              linear-gradient(to left, rgba(255, 77, 109, 0.4) 0%, rgba(255, 77, 109, 0.15) 80px, transparent 220px);
}

body.game-round-page #main-content {
  position: relative;
  z-index: 1;
}

body.game-round-page #site-topbar {
  position: relative;
  z-index: 300;
}

.game-round-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 374px) {
  .game-round-container {
    padding: 12px 16px 32px;
  }
  .actions-zone {
    gap: 8px;
  }
  .btn-action {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) {
  .game-round-container {
    padding: 24px 16px 48px;
  }
}

.game-round-container .hidden {
  display: none !important;
}

/* Barre de progression – rose vif, dégradé, glow, shimmer */
.progress-bar {
  margin-bottom: 16px;
}

.progress-bar-track {
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: width 0.5s ease-in-out;
  /* Dégradé rose foncé → clair par défaut (niveau 1) */
  background: linear-gradient(90deg, #b81a45 0%, #e6396b 50%, #ff6b8a 100%);
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.5), 0 0 24px rgba(255, 77, 109, 0.25);
}

/* Plus intense selon le niveau */
.progress-bar[data-level="2"] .progress-bar-fill {
  background: linear-gradient(90deg, #c41e50 0%, #eb4d75 50%, #ff7a99 100%);
  box-shadow: 0 0 14px rgba(255, 77, 109, 0.55), 0 0 28px rgba(255, 77, 109, 0.3);
}

.progress-bar[data-level="3"] .progress-bar-fill {
  background: linear-gradient(90deg, #d02258 0%, #f05a80 50%, #ff8fa3 100%);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.6), 0 0 32px rgba(255, 77, 109, 0.35);
}

.progress-bar[data-level="4"] .progress-bar-fill {
  background: linear-gradient(90deg, #dc2660 0%, #f56688 50%, #ff9aab 100%);
  box-shadow: 0 0 18px rgba(255, 77, 109, 0.65), 0 0 36px rgba(255, 77, 109, 0.4);
}

.progress-bar[data-level="5"] .progress-bar-fill {
  background: linear-gradient(90deg, #e82d68 0%, #fa7094 50%, #ffb3c1 100%);
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.7), 0 0 40px rgba(255, 77, 109, 0.45);
}

/* Surbrillance animée (shimmer) qui glisse sur la partie remplie */
.progress-bar-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 30%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.25) 70%,
    transparent 100%
  );
  border-radius: 6px;
  animation: progress-shimmer 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-120%);
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(220%);
    opacity: 0.8;
  }
}

.progress-bar-label {
  font-size: 0.85rem;
  color: #b0b0b0;
}

/* Ligne indicateur + quitter */
.level-indicator-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.level-indicator-row .level-indicator {
  flex: 1;
  margin-bottom: 0;
}

.level-indicator-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1a1a1e;
  color: #aaa;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-fullscreen:hover {
  background: #25252a;
  color: #ff4d8d;
  border-color: rgba(255, 77, 109, 0.4);
}

.btn-fullscreen .btn-fullscreen-icon {
  display: inline-flex;
}

.btn-fullscreen .btn-fullscreen-icon.hidden {
  display: none !important;
}

.btn-quit-game {
  padding: 10px 16px;
  min-height: 44px;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1a1a1e;
  color: #aaa;
  cursor: pointer;
  white-space: nowrap;
}

.btn-quit-game:hover {
  background: #25252a;
  color: #cc6666;
  border-color: #663333;
}

/* Indicateur niveau */
.level-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: #1a1a1e;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #aaa;
}

.level-indicator #levelName {
  color: #ff4d8d;
  font-weight: 600;
}

/* Bloc unique : intro niveau ou gage */
.main-game-block {
  margin-bottom: 24px;
}

.dare-panel {
  background: #17171c;
  border: 1px solid #26262c;
  border-radius: 16px;
  padding: 24px;
}

.level-intro-panel {
  text-align: center;
  padding: 28px 20px;
  background: #17171c;
  border-radius: 12px;
  border: 1px solid #26262c;
}

@media (min-width: 768px) {
  .level-intro-panel {
    padding: 40px 24px;
    border-radius: 16px;
  }
}

/* Écran gage (legacy / alias) */
.dare-screen {
  background: #17171c;
  border: 1px solid #26262c;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.dare-description {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #eee;
  margin-bottom: 24px;
  padding: 16px;
  background: #0f0f12;
  border-radius: 12px;
  border-left: 4px solid #ff4d8d;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 374px) {
  .dare-description {
    font-size: 1.05rem;
    padding: 12px;
  }
}

.dare-media-sentence {
  margin-top: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(255, 77, 141, 0.08);
  border-radius: 8px;
  border-left: 3px solid #ff4d8d;
}

.dare-media-sentence.hidden {
  display: none;
}

.dare-media-sentence-p {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #ccc;
  margin: 0;
}

.dare-media-sentence-p + .dare-media-sentence-p {
  margin-top: 8px;
}

/* Chrono */
.chrono-zone {
  margin-bottom: 36px;
  text-align: center;
}

.chrono-pre {
  font-size: 1rem;
  color: #aaa;
}

.chrono-pre #countdownValue {
  font-weight: 700;
  color: #ff4d8d;
}

.chrono-running-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chrono-display {
  font-size: 2rem;
  font-weight: 700;
  color: #ff4d8d;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.btn-chrono-pause {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #444;
  background: #1a1a1e;
  color: #bbb;
  transition: background 0.2s, border-color 0.2s;
}

.btn-chrono-pause:hover {
  background: #25252a;
  border-color: #ff4d8d;
  color: #ff8fa3;
}

/* Actions */
.actions-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
}

.action-with-notif {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-notif {
  font-size: 0.8rem;
  color: #ff8fa3;
  white-space: nowrap;
}

.action-notif.action-notif-already {
  color: #b0b0b0;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #333;
  background: #1a1a1e;
  color: #ddd;
  transition: background 0.2s, border-color 0.2s;
}

.actions-zone .btn-action .btn-action-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #ff4d8d;
}

.actions-zone .btn-action .btn-action-icon svg {
  display: block;
}

.btn-action:hover {
  background: #25252a;
  border-color: #444;
}

.btn-pass,
.btn-change {
  border-color: #555;
  color: #bbb;
}

.btn-blacklist {
  border-color: #555;
  color: #bbb;
}

.btn-blacklist:hover {
  background: #25252a;
  border-color: #444;
}

.btn-like {
  border-color: #ff4d8d;
  color: #ff4d8d;
}

.btn-like:hover {
  background: rgba(255, 77, 109, 0.15);
}

.btn-next {
  border-color: #ff4d8d;
  background: rgba(255, 77, 109, 0.12);
  color: #ff8fa3;
}

.btn-next:hover {
  background: rgba(255, 77, 109, 0.25);
}

/* Compte gratuit : Changer / Blacklister / Liker grisés + cadenas et phrase Premium */
.actions-premium-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions-zone.actions-premium-locked .actions-premium-group .btn-change,
.actions-zone.actions-premium-locked .actions-premium-group .btn-blacklist,
.actions-zone.actions-premium-locked .actions-premium-group .btn-like {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.actions-premium-lock-msg {
  width: 100%;
  margin: 12px 0 0 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #aaa;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.actions-premium-lock-msg .game-round-premium-link {
  color: #ff4d8d;
  font-weight: 600;
  text-decoration: none;
}

.actions-premium-lock-msg .game-round-premium-link:hover {
  text-decoration: underline;
  color: #ff8fa3;
}

/* Intro niveau */
.level-intro-screen {
  text-align: center;
  padding: 40px 24px;
  background: #17171c;
  border-radius: 16px;
  border: 1px solid #26262c;
}

.level-intro-title {
  margin: 0 0 12px 0;
  font-size: 1.35rem;
  color: #ff4d8d;
}

.level-intro-message {
  margin: 0 0 24px 0;
  color: #aaa;
  font-size: 1rem;
}

.btn-start-level {
  padding: 14px 28px;
  min-height: 48px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background: #ff4d8d;
  color: #fff;
  cursor: pointer;
}

.btn-start-level:hover {
  background: #ff6b88;
}

/* Fin de partie */
.end-screen {
  text-align: center;
  padding: 40px 24px;
  background: #17171c;
  border-radius: 16px;
  border: 1px solid #26262c;
}

.end-title {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #ff4d8d;
}

.end-message {
  margin: 0 0 24px 0;
  color: #ccc;
}

.end-recap {
  text-align: left;
  max-width: 280px;
  margin: 0 auto 24px;
  padding: 20px;
  background: #0f0f12;
  border-radius: 12px;
  color: #aaa;
  font-size: 0.95rem;
}

.end-recap p {
  margin: 8px 0;
}

.btn-back-play {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 14px 28px;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  background: #ff4d8d;
  color: #fff;
  text-decoration: none;
}

.btn-back-play:hover {
  background: #ff6b88;
  color: #fff;
}

.end-premium-cta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #26262c;
}

.end-premium-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #ff4d8d;
  font-weight: 600;
}

.end-premium-text {
  margin: 0 0 16px 0;
  color: #aaa;
  font-size: 0.95rem;
}

.btn-premium-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 24px;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  background: #ff4d8d;
  color: #fff;
  text-decoration: none;
}

.btn-premium-cta:hover {
  background: #ff6b88;
  color: #fff;
}

/* Chargement / erreur */
.loading-screen,
.error-screen {
  text-align: center;
  padding: 48px 24px;
}

.loading-screen p,
.error-screen p {
  color: #aaa;
  margin-bottom: 20px;
}

.error-screen .btn-back-play {
  background: #333;
}

.error-screen .btn-back-play:hover {
  background: #444;
}
