/* =========================================================
   PMI — Refonte de la modale "Félicitations" (#token-success-modal)
   Chargé APRÈS le CSS du thème (cascade : ces règles gagnent grâce
   au préfixe #token-success-modal). Aucune modification HTML requise.
   ========================================================= */


#token-success-modal {
  --pmi-red: #e10600;
  --pmi-ink: #0d0d0d;
  --pmi-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: rgba(0, 0, 0, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 16px;
  align-items: center;
  justify-content: center;
}


/* Carte */
#token-success-modal .token-modal-content {
  background: var(--pmi-ink);
  background-image: radial-gradient(120% 60% at 50% 0%, rgba(225, 6, 0, .35) 0%, rgba(225, 6, 0, 0) 60%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  padding: 28px 22px 22px;
  width: 100%;
  max-width: 360px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  color: #fff;
  font-family: var(--pmi-font);
  text-transform: none;
  letter-spacing: normal;
  text-align: center;
}


/* En-tête */
#token-success-modal .token-success-header { margin: 0 0 20px; }
#token-success-modal .success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--pmi-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 0 0 6px rgba(225, 6, 0, .18);
}
#token-success-modal .success-icon img.emoji { width: 32px !important; height: 32px !important; margin: 0 !important; }
#token-success-modal h2 {
  font-family: 'Hackney Vector', 'Hackney-Vector', Hackney, "Bebas Neue", Impact, sans-serif;
  font-size: 34px; line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: #fff;
}
#token-success-modal .token-success-header p {
  font-family: var(--pmi-font) !important;
  font-size: 15px !important;
  line-height: 1.4;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: rgba(255, 255, 255, .72);
  margin: 0;
}


/* Code gagnant : l'élément le plus important → carte blanche, 1 seule ligne */
#token-success-modal .token-display {
  background: #fff; color: var(--pmi-ink);
  border: none; border-radius: 14px;
  padding: 16px 14px 14px;
  margin: 0 0 14px;
}
#token-success-modal .token-label {
  font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--pmi-red);
  margin: 0 0 8px;
}
#token-success-modal .token-code {
  background: none;
  border: 2px dashed rgba(13, 13, 13, .25);
  border-radius: 10px;
  padding: 12px 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(17px, 5.4vw, 21px);
  font-weight: 700; letter-spacing: .04em;
  color: var(--pmi-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: none;
  margin: 0 0 8px;
  user-select: all;
  -webkit-user-select: all;
}
#token-success-modal .token-subtitle { font-size: 13px; color: #555; text-transform: none; margin: 0; }


/* Temps / date côte à côte */
#token-success-modal .token-details {
  display: flex; gap: 10px;
  background: none; border: none; padding: 0;
  margin: 0 0 18px;
}
#token-success-modal .detail-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px; margin: 0;
}
#token-success-modal .detail-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
#token-success-modal .detail-value { font-size: 15px; font-weight: 700; color: #fff; text-transform: none; white-space: nowrap; }


/* Étapes numérotées */
#token-success-modal .token-instructions { background: none; border: none; padding: 0; margin: 0 0 20px; text-align: left; }
#token-success-modal .token-instructions h3 {
  font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  margin: 0 0 10px; text-align: center;
}
#token-success-modal .token-instructions ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 8px; }
#token-success-modal .token-instructions li {
  counter-increment: s;
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; line-height: 1.35;
  color: #fff; text-transform: none;
  margin: 0; padding: 0;
}
#token-success-modal .token-instructions li::before {
  content: counter(s);
  flex: 0 0 26px; height: 26px;
  border-radius: 50%;
  background: var(--pmi-red); color: #fff;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}


/* Boutons : 1 principal, 1 secondaire, 1 lien */
#token-success-modal .token-actions { display: grid; gap: 10px; margin: 0; }
#token-success-modal .token-actions button {
  width: 100%; min-height: 48px;
  border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  letter-spacing: .02em; text-transform: none;
  cursor: pointer; margin: 0;
  transition: transform .15s, opacity .15s;
}
#token-success-modal .token-actions button:active { transform: scale(.98); }
#token-success-modal #goto-award-page { background: var(--pmi-red); color: #fff; border: none; }
#token-success-modal .token-actions .btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
#token-success-modal #close-token-modal {
  border: none; min-height: 40px;
  color: rgba(255, 255, 255, .6);
  text-decoration: underline; text-underline-offset: 3px;
}


/* Masquer le toast technique pendant la modale (navigateurs sans :has =
   le toast reste visible, sans gravité car le message est neutre) */
body:has(#token-success-modal.show) .toast-container { display: none; }
