/* ===================================================
   KURO ARCANA — Profils (profils.js)
   Classes préfixées .pf-* ; variables :root de style.css.
   =================================================== */

/* ---------- MÉDAILLON ---------- */
.pf-medaillon {
  --pf-taille: 84px;
  --pf-cadre: var(--or-pale);
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: var(--pf-taille);
  height: var(--pf-taille);
}

.pf-taille-entete { --pf-taille: 40px; }
.pf-taille-boutique { --pf-taille: 84px; }
.pf-taille-grand { --pf-taille: 150px; }

.pf-disque {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: calc(var(--pf-taille) * 0.05 + 1px) solid var(--pf-cadre);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--violet-royal), var(--noir-teinte-rouge) 70%);
}

.pf-disque img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.pf-initiales {
  font-family: 'Cinzel', serif;
  font-size: calc(var(--pf-taille) * 0.36);
  font-weight: 700;
  color: var(--or-dore);
  text-shadow: 0 0 8px var(--glow-or);
}

.pf-vide .pf-disque,
.pf-vide {
  border-radius: 50%;
}

.pf-vide {
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(218, 165, 32, 0.5);
  background: rgba(26, 10, 10, 0.8);
}

.pf-vide .pf-initiales {
  color: rgba(255, 255, 255, 0.5);
  text-shadow: none;
}

/* Cadres selon le palier */
.pf-cadre-secondaire { --pf-cadre: var(--or-pale); }
.pf-cadre-principal { --pf-cadre: var(--violet-orchidee); }
.pf-cadre-principal .pf-disque { box-shadow: inset 0 0 0 2px var(--or-pale); }
.pf-cadre-tete { --pf-cadre: var(--or-dore); }
.pf-cadre-tete .pf-disque { box-shadow: inset 0 0 0 2px var(--rouge-crimson), 0 0 0 2px var(--rouge-sang); }
.pf-cadre-exclusif { --pf-cadre: var(--rouge-vif); }
.pf-cadre-exclusif .pf-disque { box-shadow: inset 0 0 0 2px var(--or-dore); background: radial-gradient(circle at 35% 30%, var(--rouge-sang), var(--noir-extreme) 75%); }

/* ---------- EFFETS ---------- */
.pf-aura {
  position: absolute;
  inset: calc(var(--pf-taille) * -0.12);
  border-radius: 50%;
  pointer-events: none;
}

/* Principal : aura fixe */
.pf-effet-principal .pf-aura {
  background: radial-gradient(circle, rgba(153, 50, 204, 0.55) 45%, rgba(255, 215, 0, 0.25) 60%, transparent 72%);
}

/* Tête d'affiche : aura animée (anneau tournant) + particules */
.pf-effet-tete .pf-aura {
  background: conic-gradient(from 0deg, var(--or-dore), var(--rouge-vif), var(--violet-orchidee), var(--or-dore));
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%, #000 68%, transparent 71%);
  mask: radial-gradient(circle, transparent 58%, #000 60%, #000 68%, transparent 71%);
  filter: drop-shadow(0 0 6px var(--glow-or));
  animation: pf-tourne 4s linear infinite;
}

.pf-effet-tete::before {
  content: "";
  position: absolute;
  inset: calc(var(--pf-taille) * -0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.35) 40%, transparent 70%);
  animation: pf-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.pf-particules {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pf-particules i {
  position: absolute;
  bottom: 10%;
  width: calc(var(--pf-taille) * 0.06 + 2px);
  height: calc(var(--pf-taille) * 0.06 + 2px);
  border-radius: 50%;
  background: var(--or-lumineux);
  box-shadow: 0 0 6px var(--or-dore);
  opacity: 0;
  animation: pf-monte 2.8s ease-in infinite;
}

.pf-particules i:nth-child(1) { left: 8%; animation-delay: 0s; }
.pf-particules i:nth-child(2) { left: 30%; animation-delay: 0.6s; background: var(--rouge-lumineux); }
.pf-particules i:nth-child(3) { left: 55%; animation-delay: 1.2s; }
.pf-particules i:nth-child(4) { left: 78%; animation-delay: 1.8s; background: #e2b8ff; }
.pf-particules i:nth-child(5) { left: 92%; animation-delay: 2.3s; }

@keyframes pf-tourne {
  to { transform: rotate(360deg); }
}

@keyframes pf-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes pf-monte {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--pf-taille) * -1.1)) scale(1); }
}

/* ---------- BOUTIQUE ---------- */
.pf-intro {
  max-width: 760px;
  margin: 0 auto 18px;
  font-family: 'Raleway', sans-serif;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.pf-titre-palier {
  margin: 26px 0 12px;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--or-dore);
}

.pf-compte {
  margin-left: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.pf-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pf-tuile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 14px;
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 12px;
  background: rgba(26, 10, 10, 0.75);
  text-align: center;
}

.pf-tuile-principal { border-color: rgba(153, 50, 204, 0.55); }
.pf-tuile-tete { border-color: var(--or-pale); box-shadow: 0 0 14px var(--glow-or); }
.pf-tuile-exclusif { border-color: rgba(255, 23, 68, 0.5); }
.pf-tuile-equipe { border-color: var(--or-dore); box-shadow: 0 0 18px var(--glow-or); }

.pf-tuile .pf-medaillon {
  margin-bottom: 6px;
}

.pf-tuile-nom {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.pf-tuile-univers {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.pf-bouton {
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--or-pale);
  border-radius: 8px;
  background: rgba(10, 5, 5, 0.8);
  color: var(--or-lumineux);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pf-bouton:focus-visible {
  outline: 2px solid var(--or-dore);
  outline-offset: 2px;
}

.pf-bouton-acheter {
  border-color: var(--rouge-crimson);
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.35), rgba(107, 0, 128, 0.25));
}

.pf-bouton-equiper {
  border-color: var(--violet-orchidee);
}

.pf-bouton-equipe {
  border-color: var(--or-dore);
  color: var(--or-dore);
  cursor: default;
}

.pf-bouton:disabled:not(.pf-bouton-equipe) {
  cursor: not-allowed;
  opacity: 0.45;
}

.pf-verrou {
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- EN-TÊTE ---------- */
.pf-entete {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-entete-bouton {
  display: inline-flex;
  padding: 4px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.pf-entete-bouton:focus-visible {
  outline: 2px solid var(--or-dore);
  outline-offset: 2px;
}

/* Titre de profil (titres.js) sous le médaillon de l'en-tête */
.pf-entete-bouton {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pf-titre-entete {
  max-width: 96px;
  overflow: hidden;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--or-lumineux);
  text-shadow: 0 0 6px var(--glow-or);
}

/* ---------- PAGE PROFIL ---------- */
.pf-page {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 10px auto 30px;
  padding: 30px 20px;
}

.pf-page-nom {
  margin: 0 0 6px;
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--or-dore);
  text-shadow: 0 0 12px var(--glow-or);
}

.pf-page-titre {
  margin: 0 0 6px;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--or-lumineux);
}

.pf-page-detail {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- CONFIRMATION ---------- */
.pf-calque {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.78);
}

.pf-calque[hidden] {
  display: none;
}

.pf-calque-boite {
  width: min(420px, 100%);
  padding: 26px 20px 20px;
  border: 2px solid var(--or-pale);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--noir-fonce), var(--noir-teinte-rouge) 55%, rgba(75, 0, 130, 0.5));
  box-shadow: 0 0 30px var(--glow-violet);
  text-align: center;
}

.pf-calque-titre {
  margin: 14px 0 6px;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--or-dore);
}

.pf-calque-texte {
  margin: 0 0 16px;
  font-family: 'Raleway', sans-serif;
  color: rgba(255, 255, 255, 0.85);
}

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

.pf-bouton-secondaire {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .pf-taille-entete { --pf-taille: 32px; }
  .pf-taille-grand { --pf-taille: 116px; }
  .pf-taille-boutique { --pf-taille: 70px; }
  .pf-entete { gap: 8px; }
  .pf-grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pf-page {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .pf-page-nom { font-size: 1.3rem; }
  .pf-calque-actions .pf-bouton { flex: 1 1 100%; }
}

/* ---------- MOUVEMENT RÉDUIT : aura fixe, sans particules ---------- */
@media (prefers-reduced-motion: reduce) {
  .pf-effet-tete .pf-aura,
  .pf-effet-tete::before {
    animation: none;
  }
  .pf-particules {
    display: none;
  }
}
