/* ============================================
   DUAL EMPIRES - Carte Héros dynamique (Stade 1 / Stade 2)
   ============================================
   Styles du composant partagé js/carte-heros.js (lot F3-G1, issus du
   prototype validé F3-E à F3-F ter). Chargé par le plateau (lot F3-G2A),
   la Collection et le Deck Builder (lot F3-G2B). Polices officielles du jeu (mêmes fichiers que css/style.css,
   redéclarées ici pour les pages qui ne chargent pas style.css, comme le
   plateau). Toutes les tailles sont exprimées en cqw (pour cent de la
   largeur de la carte). */

@font-face {
  font-family: "Cinzel";
  src: url("../assets/fonts/cinzel-latin-wght.woff2") format("woff2-variations"),
    url("../assets/fonts/cinzel-latin-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-wght.woff2") format("woff2-variations"),
    url("../assets/fonts/cormorant-garamond-latin-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

.carte-heros {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  container-type: inline-size;
  user-select: none;
  --carte-encre: #120502;
}

.carte-heros__base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Panneau des capacités : centré, deux capacités séparées par un léger écart. */
.carte-heros__panneau {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(0.55cqw * var(--echelle-texte, 1));
  overflow: hidden;
  text-align: center;
  color: var(--carte-encre);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: calc(3.4cqw * var(--echelle-texte, 1));
  line-height: 1.16;
  text-wrap: balance;
  hyphens: none;
  /* Chiffres alignés, comme sur les cartes imprimées (Cormorant utilise
     par défaut des chiffres bas-de-casse : « +1 » deviendrait « +ı »). */
  font-variant-numeric: lining-nums;
}

.carte-heros__capacite {
  margin: 0;
}

.carte-heros__capacite-nom {
  font-weight: 700;
}

/* Valeurs des statistiques, centrées dans leur écusson. */
.carte-heros__stat {
  position: absolute;
  transform: translate(-50%, -53%);
  color: var(--carte-encre);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 7.6cqw;
  line-height: 1;
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Contour extérieur blanc du Stade 2 (lot F3-F ter) : couche SVG au repère du
   master, débordant un peu de la carte quand le cadre touche le bord de
   l'image ; le masque du composant la limite à l'extérieur du cadre doré. */
.carte-heros__contour {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.carte-heros__contour svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.carte-heros__contour-eclat {
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 22;
}
.carte-heros__contour-trait {
  fill: none;
  stroke: #fff;
  stroke-width: 8;
  stroke-linejoin: round;
}

/* Insigne « STADE 2 » : petite plaque dorée, dans l'esprit des bandeaux.
   F3-F ter : contraste renforcé (encre plus sombre, liseré sombre extérieur
   qui détache la plaque des dorures voisines, relief clair du texte). */
.carte-heros__insigne {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4cqw;
  border-radius: 0.7cqw;
  border: 0.32cqw solid #3a2204;
  background: linear-gradient(180deg, #fff3c6 0%, #f1d37f 42%, #d3a443 74%, #996716 100%);
  box-shadow:
    inset 0 0 0 0.25cqw rgba(255, 246, 210, 0.6),
    inset 0 -0.4cqw 0.6cqw rgba(74, 46, 8, 0.4),
    0 0 0 0.2cqw rgba(24, 12, 0, 0.75),
    0 0.35cqw 0.9cqw rgba(0, 0, 0, 0.6);
  color: #1c0d00;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 800;
  font-size: 2.7cqw;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 0.1cqw 0 rgba(255, 248, 220, 0.85);
}

.carte-heros__insigne::before,
.carte-heros__insigne::after {
  content: "◆";
  font-size: 1.1cqw;
  color: #5a3708;
  letter-spacing: 0;
}
