/* ===================================================
   KURO ARCANA — Porte-clés (porte-cles.js)
   Classes préfixées .pc-* ; variables :root de style.css.
   =================================================== */

/* ---------- BRELOQUE ---------- */
.pc-breloque {
  display: block;
  flex: 0 0 auto;
  height: var(--pc-hauteur, 120px);
  width: auto;
  aspect-ratio: 1 / 2;
  overflow: visible;
}

.pc-taille-entete { --pc-hauteur: 40px; }
.pc-taille-boutique { --pc-hauteur: 120px; }
.pc-taille-grand { --pc-hauteur: 170px; }

.pc-anneau {
  fill: none;
  stroke: var(--or-dore);
  stroke-width: 3;
}

.pc-maillon {
  fill: none;
  stroke: var(--or-pale);
  stroke-width: 2;
}

.pc-pendentif {
  stroke: var(--or-dore);
  stroke-width: 2.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.45));
}

.pc-pendentif-exclusif {
  stroke: var(--rouge-vif);
  filter: drop-shadow(0 0 5px var(--glow-rouge));
}

.pc-reflet {
  fill: rgba(255, 255, 255, 0.18);
}

.pc-embleme {
  fill: var(--or-lumineux);
  stroke: var(--or-lumineux);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

/* Léger balancement dans la boutique et sur la page Profil */
.pc-taille-boutique,
.pc-taille-grand {
  transform-origin: 50% 9%;
  animation: pc-balance 3.2s ease-in-out infinite;
}

@keyframes pc-balance {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

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

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

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

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

.pc-tuile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 14px;
  border: 1px solid var(--or-pale);
  border-radius: 12px;
  background: rgba(26, 10, 10, 0.75);
  box-shadow: 0 0 12px var(--glow-or);
  text-align: center;
}

.pc-tuile-exclusif {
  border-color: rgba(255, 23, 68, 0.5);
  box-shadow: none;
}

.pc-tuile-equipe {
  border-color: var(--or-dore);
  box-shadow: 0 0 20px var(--glow-or), 0 0 30px var(--glow-violet);
}

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

.pc-tuile-effet {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.pc-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;
}

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

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

.pc-bouton-equiper { border-color: var(--violet-orchidee); }
.pc-bouton-retirer { border-color: var(--or-dore); color: var(--or-dore); }

.pc-bouton:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

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

/* ---------- EN-TÊTE ---------- */
.pc-entete {
  display: inline-flex;
}

.pc-entete[hidden] {
  display: none;
}

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

.pc-page-nom {
  margin: 0 0 6px;
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--or-dore);
}

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

/* ---------- CONFIRMATION ---------- */
.pc-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);
}

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

.pc-calque-boite {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(420px, 100%);
  padding: 22px 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;
}

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

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

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

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .pc-taille-entete { --pc-hauteur: 32px; }
  .pc-taille-boutique { --pc-hauteur: 100px; }
  .pc-taille-grand { --pc-hauteur: 130px; }
  .pc-grille {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pc-page {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .pc-calque-actions .pc-bouton { flex: 1 1 100%; }
}

/* ---------- MOUVEMENT RÉDUIT ---------- */
@media (prefers-reduced-motion: reduce) {
  .pc-taille-boutique,
  .pc-taille-grand {
    animation: none;
  }
}
