/* ===================================================
   KURO ARCANA — Contours des cartes (cadres-cartes.js), classes .cc-*
   .cc-carte = toile du contour (5:7) ; la carte tient dans l'ouverture du contour (cadres-geometrie.js).
   Coins de l'image arrondis au rayon de l'ouverture.
   =================================================== */

.cc-carte {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  container-type: inline-size;
}

.cc-fond {
  position: absolute;
  /* Place et coins fixés par contour (style en ligne, cadres-geometrie.js) */
  inset: 6%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(75, 0, 130, 0.45), transparent 70%),
    linear-gradient(170deg, #1d0a14, #07030a);
}

.cc-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Le nom ne s'affiche que sans image */
.cc-nom {
  display: none;
  padding: 0 10%;
  font-family: 'Cinzel', serif;
  font-size: 12cqw;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: rgba(255, 236, 190, 0.92);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  overflow-wrap: break-word;
  hyphens: auto;
}

.cc-sans-image .cc-nom { display: block; }

.cc-contour {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

/* Halo extérieur léger : Rare et au-dessus */
.cc-halo .cc-contour {
  filter: drop-shadow(0 0 2.5cqw var(--cc-halo));
}

/* Petite carte (passe) : pas de place pour le nom */
@container (max-width: 90px) {
  .cc-nom { display: none !important; }
}

/* Carte du passe (case de récompense) */
.ps-case-carte { display: block; width: 46px; line-height: 0; }

/* Carte non possédée */
.cc-manquante { filter: grayscale(0.85) brightness(0.5); }

/* ---------- HÔTES : les anciens cadres disparaissent au profit du contour ---------- */
.booster-card-placeholder.cc-hote {
  height: auto;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.carte-item.cc-hote,
.carte-item.cc-hote:hover,
.carte-item.cc-hote.possedee {
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
}

/* ---------- DÉTAIL D'UNE CARTE ---------- */
.cc-calque {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 2, 4, 0.85);
}

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

.cc-detail {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 20px;
  background: linear-gradient(180deg, #1a0710, #0c0408);
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

.cc-grande { flex: none; width: min(360px, 70vw); }

.cc-detail-infos { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.cc-detail-nom {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--or-dore);
}

.cc-detail-ligne { margin: 0; font-size: 1rem; color: rgba(255, 255, 255, 0.85); }

.cc-detail-fermer {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--or-dore);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rouge-sang), var(--violet-royal));
  color: var(--or-dore);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.cc-detail-fermer:focus-visible { outline: 2px solid var(--or-dore); outline-offset: 2px; }

/* ---------- PLANCHE DE CONTRÔLE (kuroCartes.planche()) ---------- */
.cc-planche {
  position: fixed;
  inset: 0;
  z-index: 9600;
  overflow-y: auto;
  padding: 20px 16px;
  background: #120610;
}

.cc-planche-boite { max-width: 1240px; margin: 0 auto; }

.cc-planche-grille {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.cc-planche-case { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.cc-planche-nom {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

@media (max-width: 768px) {
  .cc-planche-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cc-detail { flex-direction: column; gap: 14px; }
  .cc-grande { width: min(260px, 64vw); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-halo .cc-contour { filter: none; }
}
