/* ============================================================
   Recto d'une carte d'invocation au style « krosmoz » (cartes 4.x), version web : rendu de js/modules/carte-invocation.js,
   repris de KrosMiniCarte (style.css : #carte_recto, #sort_container…). Les styles communs aux cartes de profil
   (polices, nom, stats, sort, mise en forme des textes, pied) sont dans carte-recto.css, à charger avant : ici, la mise
   en page de la petite carte seulement (744 × 520 px, réduite par transform dans .carte-recto-cadre--invocation ;
   l'image web fait 400 px de large). Couleurs en dur, identiques dans les deux thèmes (rien dans theme-sombre.css) :
   c'est une image.
   ============================================================ */

.carte-recto-cadre--invocation {
    height: calc(520px * var(--echelle));
    border-radius: calc(24px * var(--echelle));
}

.carte-recto-cadre > .carte-invocation {
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(var(--echelle));
    transform-origin: 0 0;
}

.carte-invocation {
    --cr-condense: 'Carte Heros Cn', 'Arial Narrow', sans-serif;
    --cr-fort: 'Carte Heros', Helvetica, Arial, sans-serif;
    --cr-texte: 'Carte Roboto', Roboto, Arial, sans-serif;
    --cr-titre: 'Carte Mitr', 'Berlin Sans FB Demi', 'Arial Black', sans-serif;
    position: relative;
    width: 744px;
    height: 520px;
    overflow: hidden;
    color: #000;
    font-family: var(--cr-texte);
    text-align: left;
    background-color: #000;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

.carte-invocation [hidden] {
    display: none !important;
}

/* Cadre : fond krosmoz (répété comme KrosMiniCarte, décalé de 50 px) */
.carte-invocation .ci-cadre {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 696px;
    height: 472px;
    overflow: hidden;
    border-radius: 24px;
    background: url(../../images/carte/invocation/fond-krosmoz.webp) 0 50px;
}

/* Mention du site dans le bandeau noir du bas (version web) : centrée à 12 px du bas */
.carte-invocation .cr-mention {
    bottom: -1px;
}

/* En-tête long : nom, type, bulle de l'illustration, puissance */
.carte-invocation .ci-entete {
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 272px;
    border-radius: 24px;
    background: url(../../images/carte/invocation/entete.webp) 0 0 no-repeat;
}

.carte-invocation .cr-figurine {
    right: 134px;
    bottom: 22px;
    width: 210px;
    height: 230px;
}

.carte-invocation .cr-nom {
    width: 440px;
    transform-origin: 0 50%;
}

.carte-invocation .cr-traits {
    top: 66px;
    left: 123px;
    transform-origin: 0 50%;
}

.carte-invocation .ci-puissance {
    position: absolute;
    top: 0;
    right: 4px;
    z-index: 2;
    width: 85px;
    height: 85px;
}

.carte-invocation .ci-puissance img {
    width: 85px;
    height: 85px;
    filter: drop-shadow(1px 1px 2px #6e9493) drop-shadow(-1px -1px 2px #6e9493) drop-shadow(0 0 2px #6e9493) drop-shadow(1px 0 2px #6e9493);
}

.carte-invocation .ci-puissance-valeur {
    position: absolute;
    top: 15px;
    right: -4px;
    width: 90px;
    height: 60px;
    color: #fff;
    font-family: var(--cr-fort);
    font-size: 44px;
    font-weight: 700;
    line-height: 60px;
    text-align: center;
    -webkit-text-stroke: thin #fff;
    text-shadow:
        4px 4px 4px #772d1a,
        -4px -4px 4px #772d1a,
        0 4px 4px #772d1a,
        -4px 4px 4px #772d1a,
        4px -4px 4px #772d1a,
        4px 0 4px #772d1a,
        0 -4px 4px #772d1a,
        -4px 0 4px #772d1a;
}

/* Stats : PM, PV, PA */
.carte-invocation .ci-stats {
    position: absolute;
    top: 98px;
    left: 5px;
    z-index: 3;
    width: 430px;
    height: 150px;
}

.carte-invocation .ci-icone {
    top: 14px;
    z-index: 0;
}

.carte-invocation .ci-icone--PM {
    left: 15px;
}

.carte-invocation .ci-icone--PV {
    top: 19px;
    left: 150px;
}

.carte-invocation .ci-icone--PA {
    left: 286px;
}

.carte-invocation .cr-stat {
    top: 30px;
    z-index: 1;
    width: 134px;
}

.carte-invocation .cr-unite {
    top: 117px;
    z-index: 1;
}

.carte-invocation .cr-stat--PM,
.carte-invocation .cr-unite--PM {
    left: 8px;
}

.carte-invocation .cr-stat--PV,
.carte-invocation .cr-unite--PV {
    left: 145px;
}

.carte-invocation .cr-stat--PA,
.carte-invocation .cr-unite--PA {
    left: 284px;
}

/* PV verts (Stèle) */
.carte-invocation.is-pv-vert .cr-stat--PV,
.carte-invocation.is-pv-vert .cr-unite--PV {
    filter: drop-shadow(0 0 4px #1a681a) drop-shadow(0 0 4px #1a681a) drop-shadow(0 0 4px #1a681a);
}

/* Sort : un seul, texte sur 2 lignes au plus */
.carte-invocation .ci-sort {
    position: absolute;
    top: 243px;
    left: 8px;
    z-index: 4;
    width: 680px;
    height: 108px;
}

.carte-invocation .cr-sort {
    position: absolute;
    inset: 0;
    height: 108px;
    min-height: 0;
}

.carte-invocation .cr-portee {
    margin: 4px;
}

.carte-invocation .cr-portee-valeur {
    top: 73px;
    left: 4px;
}

.carte-invocation .cr-sort-entete {
    top: 4px;
    width: 445px;
}

.carte-invocation .cr-sort-ombre {
    width: 445px;
}

.carte-invocation .cr-couts {
    top: 0;
}

.carte-invocation .cr-element {
    top: 4px;
    right: 4px;
}

.carte-invocation .cr-effets {
    position: absolute;
    top: 60px;
    left: 115px;
    width: 460px;
    height: 35px;
    margin: 0;
    font-size: 27px;
    line-height: 35px;
    transform-origin: 0 50%;
}

.carte-invocation .cr-effets .cr-bloc-gauche,
.carte-invocation .cr-effets .cr-bloc-droite {
    display: none;
}

/* 2 lignes centrées entre le bandeau du nom et le bas du cadre */
.carte-invocation .cr-effets.is-compact {
    z-index: 10;
    width: 470px;
    margin: -9px 0 0;
    font-size: 25px;
    line-height: 25px;
}

/* Histoire : à la place du sort, titre sur une ligne, texte sur 2 lignes au plus */
.carte-invocation .ci-histoire {
    position: absolute;
    top: 243px;
    left: 8px;
    z-index: 5;
    width: 680px;
    height: 108px;
    overflow: hidden;
    background: #fff;
    border-radius: 3px 40px 3px 3px;
    box-shadow: #000 0 0 5px 1px;
}

.carte-invocation .cr-histoire-titre {
    height: 38px;
    margin: 4px 4px 0;
    font-size: 35px;
    line-height: 38px;
    background: url(../../images/carte/invocation/histoire-fond.webp) 0 0 / cover no-repeat;
}

.carte-invocation .ci-histoire-titre-texte {
    display: inline-block;
    transform-origin: 0 50%;
}

.carte-invocation .cr-histoire-texte {
    margin: 1px 8px;
    color: #8f9f9b;
    font-size: 26px;
    text-align: left;
    transform-origin: 0 0;
}

/* Pouvoirs */
.carte-invocation .ci-pouvoirs {
    position: absolute;
    top: 356px;
    left: 8px;
    z-index: 2;
    width: 680px;
    height: 83px;
    background: #fff;
    border-radius: 3px;
    box-shadow: #000 0 0 5px 1px;
}

.carte-invocation .cr-pouvoirs-liste {
    position: absolute;
    top: 46px;
    left: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    line-height: 37px;
    white-space: nowrap;
    transform-origin: 0 50%;
}

/* Pied de carte */
.carte-invocation .cr-pied {
    bottom: 4px;
    height: 28px;
    line-height: 28px;
}

.carte-invocation .cr-pied-decor {
    height: 32px;
}
