/* Les six cadres de cartes. Les codes correspondent au catalogue SQL. */
.rarete-commune { --couleur-rarete: #b9bdca; --fond-rarete: #f0f0f4; }
.rarete-peu_commune { --couleur-rarete: #79d8a1; --fond-rarete: #e3f7eb; }
.rarete-rare { --couleur-rarete: #79bff1; --fond-rarete: #e4f2fc; }
.rarete-epique { --couleur-rarete: #b68bea; --fond-rarete: #f0e5fc; }
.rarete-legendaire { --couleur-rarete: #f3cd63; --fond-rarete: #fff4cf; }
.rarete-ultra_secrete { --couleur-rarete: #f6a9d1; --fond-rarete: #fce8f3; }

.carte { position: relative; display: flex; flex-direction: column; aspect-ratio: 63 / 88; border: 3px solid var(--encre); border-radius: 15px; padding: 9px; background: var(--couleur-rarete, #b9bdca); box-shadow: 4px 4px 0 var(--encre); color: var(--encre); overflow: hidden; text-align: left; transform-style: preserve-3d; }
.carte-entete { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 4px 2px 8px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.carte-illustration { position: relative; display: grid; place-items: center; overflow: hidden; flex: 1; min-height: 0; border: 2px solid var(--encre); border-radius: 8px; background: var(--fond-rarete, #f0f0f4); }
.carte-illustration img, .carte-illustration > svg { width: 100%; height: 100%; object-fit: contain; }
.carte-illustration img { position: absolute; inset: 0; }
.image-indisponible { padding: 12px; font-size: 12px; text-align: center; }
.catalogue-cartes .carte { width: 100%; }
.catalogue-cartes .carte-entete { min-height: 44px; font-size: 13px; }
.catalogue-cartes .carte-description { min-height: 61px; }
.catalogue-suite { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-block: 35px 60px; }
.lien-catalogue { display: inline-block; margin-top: 18px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.carte-description { padding: 10px 3px 7px; font-size: 11px; line-height: 1.35; min-height: 48px; }
.carte-pied { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10px; font-weight: 500; border-top: 1px solid #24203755; padding: 7px 2px 0; }
.carte-signe { font-size: 13px; }
.carte-quantite, .carte-nouvelle { position: absolute; z-index: 3; border: 2px solid var(--encre); border-radius: 99px; background: var(--jaune); color: var(--encre); padding: 3px 9px; font-size: 11px; font-weight: 600; }
.carte-quantite { right: 8px; bottom: 28px; }
.carte-nouvelle { left: 8px; top: 37px; transform: rotate(-7deg); }

/* Fond gris et silhouette : aucune carte inconnue n'est dévoilée. */
.carte-inconnue { background: #e5e1e9; border-color: #a49bab; box-shadow: 3px 3px 0 #b5acbf; color: #787081; }
button.carte-inconnue { width: 100%; transition: transform .18s ease, box-shadow .18s ease; }
button.carte-inconnue:hover { transform: translateY(-4px); box-shadow: 3px 7px 0 #b5acbf; }
.carte-inconnue .carte-entete { color: #716978; }
.carte-inconnue .carte-illustration { position: relative; border: 2px solid #b8aebf; background: #d7d0de; }
.silhouette { position: relative; width: 60%; height: 64%; margin-top: 15%; background: #b7aebe; border-radius: 48% 48% 35% 35%; }
.silhouette::before, .silhouette::after { content: ''; position: absolute; top: -11%; width: 40%; height: 35%; background: #b7aebe; border-radius: 50%; }
.silhouette::before { left: 0; }
.silhouette::after { right: 0; }
.point-interrogation { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; font-size: 45px; color: #f6f3f8; font-weight: 600; }
.carte-inconnue .carte-description { font-size: 11px; text-align: center; min-height: auto; }
.carte-inconnue .carte-pied { border-color: #b8aebf; }
.carte-dos { justify-content: center; align-items: center; background: var(--violet-clair); border: 2px solid var(--encre); box-shadow: 3px 3px 0 var(--encre); padding: 8px; }
.carte-dos::before { content: ''; position: absolute; inset: 8px; border: 2px dashed var(--violet); border-radius: 8px; }
.carte-dos img { width: 50%; margin-bottom: 10px; }
.carte-dos span { font-weight: 600; font-size: clamp(9px,1.5vw,16px); }
.carte-ultra-apercu { background: linear-gradient(135deg,#ffc3df,#ffe88a,#b8f0de,#badbff,#d0b3f4,#ffc3df); }
.carte-ultra-apercu .carte-illustration { background: #fff9ed; }
.carte-ultra-apercu .carte-illustration img { width: 70%; height: 70%; object-fit: contain; }
.carte-ultra-apercu .carte-description { background: #fff9ed99; border-radius: 7px; margin-top: 5px; }

/* Reflet holo : repli transparent si mix-blend-mode n'est pas disponible. */
.carte-reflet { position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit; background: linear-gradient(115deg,transparent 25%,#fff9edbb 48%,transparent 65%); }
.carte[data-holo] .carte-reflet { opacity: .3; }
@supports (mix-blend-mode: screen) { .carte-reflet { mix-blend-mode: screen; } }
.carte.rarete-epique { box-shadow: 4px 4px 0 var(--encre), inset 0 0 0 2px #fff7; }
.carte.rarete-legendaire { box-shadow: 4px 4px 0 var(--encre), inset 0 0 0 3px #ffeaa1; }
@media (prefers-reduced-motion: no-preference) {
  .carte.rarete-ultra_secrete { background: linear-gradient(135deg,#ffb0c9,#ffe36c,#b7efcf,#bce8fd,#d1b4ff,#ffb0c9); background-size: 220% 220%; animation: arc-en-ciel 8s linear infinite; }
  @keyframes arc-en-ciel { 0%,100% { background-position: 0 0; } 50% { background-position: 100% 100%; } }
}
@media (max-width: 600px) {
  .carte { padding: 7px; border-radius: 12px; }
  .carte-entete { font-size: 12px; padding-bottom: 5px; }
  .carte-description { font-size: 10px; min-height: 42px; padding-block: 6px; }
  .carte-pied { font-size: 9px; padding-top: 5px; }
  .carte-signe { font-size: 10px; }
  .carte-hero .carte-description { font-size: 9px; }
  .carte-hero .carte-pied { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { button.carte-inconnue:hover { transform: none; } }
