/* defi-du-jour.php — règles propres à cette page.
   L'habillage commun vient de fichiers-partages-des-jeux/css/jeu.css. */

/* Habillage commun (body, #app, top-bar, boutons, info-bar, overlay,
   classement) : fichiers-partages-des-jeux/css/jeu.css.
   Ici, uniquement ce qui est propre a ce jeu. */
#app {
  position: relative;
  z-index: 1;
  padding: 32px 24px 24px;
  max-width: 800px;
}

h1 {
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--texte-doux);
  margin-bottom: 20px;
}

.status-bar {
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--texte);
  font-weight: 600;
}

.info-bar {
  font-size: 0.82rem;
}

.info-item span {
  color: var(--color-light);
  font-weight: 700;
}

.grille {
  display: inline-grid;
  gap: 1px;
  background: var(--surface-2);
  border: 2px solid var(--line-forte);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.grille-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--texte-faible);
  background: var(--surface-2);
}

.cell {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  background: var(--surface-1);
  user-select: none;
}

.cell:hover {
  background: var(--surface-2);
}

.cell.eau {
  background: #1e3550;
  color: #7fb0dd;
}

.cell.touche {
  background: #9c333c;
  color: #ffdcdc;
}

.cell.coule {
  background: #47141a;
  color: #ff9a9a;
  box-shadow: inset 0 0 0 2px #c4545e;
}

.cell.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Tir parti, verdict pas encore revenu du serveur. Le battement dit « c'est en cours »
   sans annoncer de résultat, que le client ne connait pas. */
.cell.en-attente {
  background: var(--surface-2);
  color: var(--texte-faible);
  cursor: progress;
  box-shadow: inset 0 0 0 2px var(--color-light);
  animation: bn-tir-attente 0.9s ease-in-out infinite;
}

@keyframes bn-tir-attente {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-voir-defis {
  text-decoration: none;
  display: inline-block;
}

.overlay-card {
  background: var(--surface-1);
  border: 1px solid var(--line-forte);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.overlay-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.overlay-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--font-display);
  color: #f0f3f6;
}

.overlay-stats {
  font-size: 0.9rem;
  color: var(--texte-doux);
  margin-bottom: 20px;
  line-height: 1.6;
}

.overlay-stats span {
  color: var(--color-light);
  font-weight: 700;
}

.back-link {
  margin-top: 16px;
}

.deja-joue {
  padding: 30px;
}

.deja-joue .resultat {
  font-size: 1.2rem;
  font-weight: 700;
  color: #64ab7c;
  margin: 16px 0;
}

/* Classement : bloc grisé pour bien délimiter l'ensemble du classement du jour */
.classement-cta-compte {
  color: var(--texte-doux);
  font-size: 0.82rem;
  margin-top: 10px;
}

.texte-doux {
  color: var(--texte-doux);
}

.zone-start-intro {
  margin-bottom: 16px;
}

.podium {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.podium-item {
  text-align: center;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  min-width: 80px;
}

.podium-item:first-child {
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(255, 215, 0, 0.05);
}

.podium-rang {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.podium-pseudo {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--texte);
}

.podium-info {
  font-size: 0.7rem;
  color: var(--texte-doux);
  margin-top: 2px;
}

.grille {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 480px) {

  .cell {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }

  .grille-header {
    font-size: 0.6rem;
  }

  #app {
    padding: 24px 8px 16px;
  }
}

@media (max-width: 360px) {

  .cell {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }
}
