/* ==========================================================================
   EnchèreMax — Révélation du Prix Réel & Ticket Thermique
   ========================================================================== */

.reveal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 12, 0.88);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  animation: fade-in 300ms ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal-ticket-container {
  width: 100%;
  max-width: 520px;
  margin: auto;
  display: flex;
  justify-content: center;
}

/* Ticket Thermique Imprimé */
.thermal-receipt {
  background: #fdfbf7;
  color: #1a1a1a;
  font-family: var(--font-mono);
  width: 100%;
  padding: 1.5rem 1.4rem;
  border-radius: 2px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.1);
  position: relative;
  animation: print-roll 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes print-roll {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 1200px;
  }
}

/* Bords dentelés du ticket thermique */
.receipt-cut-edge {
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: radial-gradient(circle, transparent, transparent 50%, #fdfbf7 50%, #fdfbf7 100%);
  background-size: 12px 12px;
}

.receipt-cut-edge.bottom {
  top: auto;
  bottom: -6px;
  transform: rotate(180deg);
}

.receipt-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.receipt-logo {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.receipt-sub {
  font-size: 0.7rem;
  color: #555;
}

.receipt-date {
  font-size: 0.65rem;
  color: #777;
  margin-top: 0.2rem;
}

.receipt-divider {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  margin: 0.6rem 0;
  overflow: hidden;
}

.receipt-item-block {
  text-align: center;
  padding: 0.4rem 0;
}

.receipt-item-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}

.receipt-item-val {
  font-size: 0.8rem;
  color: #444;
  margin-top: 0.2rem;
}

/* Tampon Énorme du Prix Réel */
.receipt-price-reveal {
  background: #111;
  color: #fff;
  padding: 0.8rem;
  margin: 0.6rem 0;
  text-align: center;
  border-radius: 4px;
}

.price-reveal-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #aaa;
}

.price-reveal-amount {
  font-family: var(--font-vfd);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--vfd-green);
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

/* Tableau des Estimations */
.receipt-standings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.standings-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px dashed #aaa;
  padding-bottom: 0.2rem;
}

.standing-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.standing-row.winner {
  background: rgba(16, 185, 129, 0.12);
  font-weight: 600;
}

.standing-row.is-player-row {
  border: 1px solid #111;
  background: #f1f5f9;
}

.standing-row.disqualified {
  opacity: 0.6;
  text-decoration: line-through;
  background: rgba(239, 68, 68, 0.1);
}

.standing-rank {
  font-size: 0.9rem;
}

.standing-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.you-tag {
  font-weight: 700;
  color: #2563eb;
  margin-left: 2px;
}

.tag-disqualified {
  font-size: 0.65rem;
  color: #dc2626;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-left: 4px;
}

.standing-bid {
  font-weight: 700;
}

.standing-diff {
  font-size: 0.68rem;
  color: #555;
}

.standing-pts {
  font-weight: 700;
  color: #059669;
}

/* Bloc d'Éducation Financière */
.pedagogical-box {
  background: #f3f4f6;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.8rem;
  margin: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pedago-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pedago-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  color: #1e293b;
}

.pedago-stat-pill {
  background: #e2e8f0;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border-left: 3px solid #2563eb;
  font-size: 0.78rem;
}

.pill-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
}

.pill-value {
  font-weight: 700;
  color: #1e293b;
}

.pedago-body {
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pedago-player-eval {
  font-size: 0.7rem;
  background: #e2e8f0;
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
  color: #334155;
}

/* Bouton Manche Suivante */
.receipt-footer {
  margin-top: 0.8rem;
}

.btn-next-round {
  width: 100%;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.9rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  transition: transform var(--trans-fast), background-color var(--trans-fast);
}

.btn-next-round:hover {
  background: #1f2937;
  transform: translateY(-2px);
}

.btn-next-round .btn-text {
  font-family: var(--font-vfd);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-next-round .btn-subtext {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #9ca3af;
}

/* ==========================================================================
   Ticket de Révélation — Version Mobile
   ========================================================================== */
@media (max-width: 480px) {
  .reveal-overlay { padding: 0.6rem; }
  .thermal-receipt { padding: 1.1rem 0.9rem; }
  .receipt-item-title { font-size: 0.98rem; }
  .price-reveal-amount { font-size: 1.9rem; }
  .pedagogical-box { padding: 0.6rem; }
  .pedago-title { font-size: 0.76rem; }

  /* Grille 4 colonnes trop serrée en portrait : on la réorganise en 2 lignes
     (rang/nom/mise puis écart/points) pour garder tout le texte lisible. */
  .standing-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "rank name bid"
      "diff diff pts";
    row-gap: 0.2rem;
  }

  .standing-rank { grid-area: rank; }
  .standing-name { grid-area: name; }
  .standing-bid { grid-area: bid; font-size: 0.78rem; }
  .standing-diff { grid-area: diff; font-size: 0.66rem; }
  .standing-pts { grid-area: pts; font-size: 0.72rem; text-align: right; }
}
