/* Éditeur de carte de profil (outils/editeur-carte.php, js/pages/editeur-carte.js), par-dessus outils.css.
   Interface en variables (le mode sombre suit) ; la carte elle-même : css/modules/carte-recto.css. */

.edc-page {
    max-width: 1280px;
}

/* Carte à gauche, formulaire à droite */
.edc-app {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.edc-colonne-apercu {
    position: sticky;
    top: 1rem;
    order: -1;
}

.edc-apercu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.edc-apercu .carte-recto-cadre {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.edc-alerte {
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.75rem;
    color: var(--rouge-banni);
    font-size: 0.88rem;
    background: var(--beige-clair);
    border: 1px solid var(--rouge-banni);
    border-radius: 0.6rem;
}

.edc-sauvegarde {
    margin: 0;
    color: var(--brun-cuir-clair);
    font-size: 0.85rem;
    text-align: center;
}

.edc-sauvegarde.is-erreur::after {
    content: ' ⚠';
    color: var(--rouge-banni);
}

/* Carte enregistrée dans le compte (Mes cartes custom) : enregistrée, modifiée depuis, erreur d'enregistrement */
.edc-compte {
    margin: 0;
    color: var(--brun-cuir);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.edc-compte:empty {
    display: none;
}

.edc-compte.is-erreur {
    color: var(--rouge-banni);
}

/* Carte enregistrée : statut en vert, lien vers Mes cartes custom à la ligne */
.edc-compte-ok {
    color: #2f7d3a;
}

/* Modifications d'une carte du compte : l'enregistrement l'écrasera */
.edc-compte.is-attention {
    color: var(--rouge-banni);
}

.edc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Boutons */
.edc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.2rem;
    padding: 0.35rem 0.9rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

/* Désactivé : rien à enregistrer (grisé) ; en cours d'enregistrement : attente */
.edc-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.6);
}

.edc-btn.is-en-cours:disabled {
    cursor: wait;
    opacity: 0.7;
    filter: none;
}

.edc-btn--primaire {
    min-height: 2.6rem;
    padding: 0.5rem 1.4rem;
    color: var(--brun-nuit);
    background: var(--or);
}

.edc-btn--primaire:hover:not(:disabled) {
    background: var(--or-clair);
}

.edc-btn--secondaire {
    color: var(--brun-cuir);
    background: var(--beige-clair);
    border-color: var(--beige-fonce);
}

.edc-btn--secondaire:hover {
    border-color: var(--or);
}

/* Écraser la carte du compte : rouge */
.edc-btn--ecraser {
    min-height: 2.6rem;
    padding: 0.5rem 1.2rem;
    color: var(--white);
    background: var(--rouge-banni);
}

.edc-btn--ecraser:hover:not(:disabled) {
    background: #8f1a1a;
}

/* Garder la carte du compte et enregistrer une copie : vert */
.edc-btn--nouvelle {
    color: var(--white);
    background: #2f7d3a;
}

.edc-btn--nouvelle:hover:not(:disabled) {
    background: #24642d;
}

.edc-btn-ico {
    flex-shrink: 0;
}

/* Commander : lien vers la fiche de l'article d'impression, sous les boutons */
.edc-commander {
    text-decoration: none;
}

.edc-btn--discret {
    color: var(--brun-cuir-clair);
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
}

.edc-btn:focus-visible,
.edc-lien:focus-visible,
.edc-ajouter:focus-visible,
.edc-retirer:focus-visible,
.edc-outil:focus-visible {
    outline: 2px solid var(--brun-cuir);
    outline-offset: 2px;
}

.edc-lien {
    padding: 0;
    color: var(--rouille);
    font: inherit;
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.edc-depart {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Sections du formulaire */
.edc-formulaire {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.edc-section {
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-card);
}

/* Section Figurine survolée par un fichier glissé */
.edc-section.is-depot {
    outline: 2px dashed var(--rouille);
    outline-offset: 2px;
}

.edc-section > summary {
    padding: 0.6rem 1rem;
    color: var(--brun-nuit);
    font-family: 'Grandstander', cursive;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
}

/* Masquer / afficher l'histoire sur la carte : en haut à droite de la section */
/* Polices de l'éditeur : mention sous l'éditeur */
.edc-polices {
    max-width: 60rem;
    margin: 1.5rem auto 0;
    color: var(--brun-cuir-clair);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}

/* Fenêtre de confirmation (remplace confirm() / alert()) */
.edc-confirmation {
    width: min(26rem, calc(100vw - 2rem));
    padding: 0;
    color: var(--encre);
    background: var(--beige-clair);
    border: 2px solid var(--or);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.edc-confirmation.is-danger {
    border-color: var(--rouge-banni);
}

.edc-confirmation::backdrop {
    background: rgba(28, 17, 10, 0.55);
}

.edc-confirmation-contenu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.4rem;
}

.edc-confirmation h2 {
    margin: 0;
    color: var(--brun-nuit);
    font-family: 'Grandstander', cursive;
    font-size: 1.2rem;
}

.edc-confirmation.is-danger h2 {
    color: var(--rouge-banni);
}

.edc-confirmation p {
    margin: 0;
    line-height: 1.45;
}

.edc-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.edc-section-bascule {
    float: right;
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.2rem 0.6rem;
    color: var(--brun-cuir);
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 999px;
    cursor: pointer;
}

.edc-section-bascule:hover {
    border-color: var(--or);
}

.edc-section-bascule.is-masquee {
    color: var(--rouge-banni);
    border-color: var(--rouge-banni);
}

.edc-section-bascule:focus-visible {
    outline: 2px solid var(--brun-cuir);
    outline-offset: 2px;
}

/* Histoire masquée : champs atténués */
.edc-section.is-masquee .edc-section-corps {
    opacity: 0.55;
}

.edc-section-corps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem 0.9rem;
}

.edc-aide {
    margin: 0;
    color: var(--brun-cuir-clair);
    font-size: 0.8rem;
    line-height: 1.4;
}

.edc-message {
    margin: 0;
    font-size: 0.85rem;
}

.edc-message.is-erreur {
    color: var(--rouge-banni);
}

.edc-vide {
    margin: 1rem 0;
    color: var(--brun-cuir-clair);
    text-align: center;
}

/* Ligne : libellé à gauche, champs à droite (le libellé passe au-dessus quand la place manque) */
.edc-ligne {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
    align-items: flex-start;
}

.edc-ligne-libelle {
    flex: 0 0 7.5rem;
    padding-top: 0.45rem;
    color: var(--brun-cuir);
    font-size: 0.85rem;
    font-weight: 700;
}

.edc-ligne-champs {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    min-width: 0;
}

.edc-ligne-champs > .edc-champ-texte {
    flex: 1 1 12rem;
}

.edc-ligne-champs > .edc-liste {
    flex: 1 1 100%;
}

.edc-ligne--nom .edc-select {
    flex: 0 0 auto;
    width: auto;
}

/* Champs */
.edc-champ-texte,
.edc-select,
.edc-nombre input,
.edc-po {
    width: 100%;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    color: var(--encre);
    font: inherit;
    font-size: 0.95rem;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.5rem;
}

textarea.edc-champ-texte {
    resize: vertical;
}

.edc-champ-texte:focus,
.edc-select:focus,
.edc-nombre input:focus,
.edc-po:focus {
    border-color: var(--or);
    outline: 2px solid var(--or-clair);
    outline-offset: 0;
}

.edc-select {
    width: auto;
    max-width: 100%;
    padding-right: 1.8rem;
    cursor: pointer;
}

[data-affichage='version'] {
    max-width: 7rem;
}

/* Petits nombres : icône + champ */
.edc-nombres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
}

.edc-nombre {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
}

.edc-nombre input {
    width: 3rem;
    padding: 0.35rem 0.2rem;
    text-align: center;
}

.edc-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Portée : types en tuiles (carré de portée des cartes), PO min et max sur la même ligne */
.edc-ligne--portee .edc-tuiles {
    margin-right: 0.4rem;
}


.edc-po-groupe {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    color: var(--brun-cuir-clair);
}

.edc-po {
    width: 3rem;
    padding: 0.35rem 0.2rem;
    text-align: center;
}

.edc-po:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

/* Mini-éditeur des textes (effets, pouvoirs, légende) */
.edc-riche-bloc {
    display: flex;
    flex: 1;
    gap: 0.3rem;
    align-items: flex-start;
    min-width: 0;
}

.edc-riche {
    flex: 1;
    min-height: 2.25rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    cursor: text;
}

.edc-riche:empty::before {
    content: attr(data-placeholder);
    color: var(--brun-cuir-clair);
    opacity: 0.7;
    pointer-events: none;
}

.edc-riche b {
    font-weight: 800;
}

.edc-riche-ico {
    width: auto;
    height: 1.25em;
    margin: 0 0.1em;
    vertical-align: -0.25em;
}

/* Retour à la ligne forcé (effets d'un sort) : flèche « entrée », puis la suite sur la ligne suivante comme sur la carte */
.edc-riche-retour {
    margin: 0 0.15em;
    padding: 0 0.2em;
    color: var(--rouille);
    font-weight: 700;
    background: var(--beige-fonce);
    border-radius: 0.25rem;
    cursor: default;
    user-select: none;
}

.edc-riche-retour::after {
    content: '\A';
    white-space: pre;
}

.edc-outils-texte {
    display: flex;
    flex-shrink: 0;
    gap: 0.25rem;
}

.edc-outil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.25rem;
    padding: 0;
    color: var(--brun-cuir);
    font: inherit;
    font-size: 0.95rem;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.4rem;
    cursor: pointer;
}

.edc-outil:hover {
    border-color: var(--or);
}

.edc-outil[aria-pressed='true'] {
    background: var(--beige-fonce);
    border-color: var(--or);
}

.edc-outil-ico {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.edc-palette {
    position: absolute;
    z-index: 1060;
    display: grid;
    grid-template-columns: repeat(8, 36px);
    gap: 4px;
    max-width: calc(100vw - 16px);
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.edc-palette[hidden] {
    display: none;
}

.edc-palette button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--beige-clair);
    border: 1px solid transparent;
    border-radius: 0.4rem;
    cursor: pointer;
}

.edc-palette button:hover,
.edc-palette button:focus-visible {
    border-color: var(--or);
}

.edc-palette-ico {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* Autocomplétion des pouvoirs */
.edc-suggestions {
    position: absolute;
    z-index: 1060;
    max-height: 18rem;
    margin: 0;
    padding: 0.25rem;
    overflow-y: auto;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.edc-suggestions[hidden] {
    display: none;
}

.edc-suggestions li {
    padding: 0.35rem 0.6rem;
    color: var(--encre);
    border-radius: 0.35rem;
    cursor: pointer;
}

.edc-suggestions li:hover,
.edc-suggestions li[aria-selected='true'] {
    background: var(--beige-clair);
}

/* Listes (traits, effets, pouvoirs, légende) */
.edc-liste {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.edc-liste-ligne {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
}

.edc-liste-ligne > .edc-champ-texte {
    flex: 1;
}

.edc-retirer {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin-top: 0.12rem;
    padding: 0;
    color: var(--brun-cuir);
    font-size: 1.05rem;
    line-height: 1;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 50%;
    cursor: pointer;
}

.edc-retirer:hover {
    color: var(--rouge-banni);
    border-color: var(--rouge-banni);
}

.edc-ajouter {
    align-self: flex-start;
    padding: 0.25rem 0.7rem;
    color: var(--rouille);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    background: transparent;
    border: 1px dashed var(--beige-fonce);
    border-radius: 999px;
    cursor: pointer;
}

.edc-ajouter:hover {
    border-color: var(--rouille);
}

/* Tuiles d'élément : icônes seules, libellé en infobulle */
.edc-tuiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.edc-tuile {
    position: relative;
    display: flex;
    margin: 0;
    padding: 0.15rem;
    background: var(--white);
    border: 2px solid var(--beige-fonce);
    border-radius: 50%;
    cursor: pointer;
}

.edc-tuile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.edc-tuile:hover {
    border-color: var(--or-terne);
}

.edc-tuile:has(input:checked) {
    border-color: var(--or);
    box-shadow: 0 0 0 2px var(--or);
}

.edc-tuile:has(input:focus-visible) {
    outline: 2px solid var(--brun-cuir);
    outline-offset: 2px;
}

.edc-tuiles .edc-tuile--carre {
    border-radius: 0.3rem;
}

.edc-tuile-ico {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Sorts : bord gauche à la couleur du type (couleurs de la carte, en dur) */
.edc-sort {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
    padding: 0.5rem 0.85rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-left: 6px solid #000;
    border-radius: 0.75rem;
}

.edc-sort--bleu {
    border-left-color: #167da6;
}

.edc-sort--rouge {
    border-left-color: #d30b22;
}

.edc-sort--violet {
    border-left-color: #913c8d;
}

.edc-sort-titre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.edc-sort legend {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    color: var(--brun-nuit);
    font-size: 1rem;
    font-weight: 700;
}

.edc-sort-actions {
    display: flex;
    gap: 0.3rem;
}

.edc-sort .edc-retirer {
    margin-top: 0;
}

/* Figurine : vignette et boutons empilés à côté, puis aide et curseurs */
.edc-figurine {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.edc-figurine-tete {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.edc-figurine-vignette {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 80px;
    height: 108px;
    overflow: hidden;
    color: var(--brun-cuir-clair);
    font-size: 0.8rem;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.6rem;
}

.edc-figurine-vignette img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.edc-figurine-choix {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.edc-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.edc-boutons--pile {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.3rem;
}

.edc-btn--petit {
    min-height: 1.8rem;
    padding: 0.2rem 0.75rem;
    font-size: 0.85rem;
}

.edc-boutons--pile .edc-btn--discret {
    padding-inline: 0.25rem;
}

.edc-fichier {
    margin: 0;
    cursor: pointer;
}

.edc-fichier:has(input:focus-visible) {
    outline: 2px solid var(--brun-cuir);
    outline-offset: 2px;
}

.edc-curseurs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.4rem 1rem;
    align-items: end;
}

.edc-curseurs[hidden] {
    display: none;
}

.edc-curseur {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    color: var(--brun-cuir);
    font-size: 0.8rem;
    font-weight: 700;
}

.edc-curseur input {
    width: 100%;
    accent-color: var(--or);
}

/* Fenêtre de choix : carte de départ, figurine */
.edc-dialogue {
    width: min(920px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    color: var(--encre);
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-card);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.edc-dialogue::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.edc-dialogue-contenu {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
}

.edc-dialogue-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem 0.5rem;
}

.edc-dialogue-entete h2 {
    margin: 0;
    color: var(--brun-nuit);
    font-size: 1.25rem;
}

.edc-fermer {
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    color: var(--brun-cuir);
    font-size: 1.5rem;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.edc-fermer:hover {
    background: var(--beige-fonce);
}

.edc-dialogue-outils {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.25rem 0.75rem;
}

.edc-dialogue-outils .edc-champ-texte {
    flex: 1;
    min-width: 180px;
}

.edc-dialogue-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
}

.edc-dialogue-saison,
.edc-dialogue-liste > .edc-vide,
.edc-dialogue-liste > .edc-message {
    grid-column: 1 / -1;
}

.edc-dialogue-saison {
    margin: 0.5rem 0 0;
    color: var(--brun-cuir);
    font-size: 0.95rem;
}

.edc-profil {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.4rem;
    color: var(--encre);
    font: inherit;
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.6rem;
    cursor: pointer;
}

.edc-profil:hover,
.edc-profil:focus-visible {
    border-color: var(--or);
    outline: none;
    box-shadow: 0 0 0 1px var(--or);
}

.edc-profil img {
    width: 100%;
    height: 110px;
    object-fit: contain;
}

/* Petite carte flottante (téléphone, tablette) quand l'aperçu est hors de l'écran */
.edc-mini {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1040;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.edc-mini[hidden] {
    display: none;
}

.edc-mini .carte-recto-cadre {
    display: block;
    border-radius: 6px;
}

@media (max-width: 991.98px) {
    .edc-app {
        grid-template-columns: minmax(0, 1fr);
    }

    .edc-colonne-apercu {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .edc-section-corps {
        padding: 0 0.6rem 0.75rem;
    }

    .edc-ligne-libelle {
        flex-basis: 100%;
        padding-top: 0;
    }

    .edc-palette {
        grid-template-columns: repeat(6, 36px);
    }
}

/* Aide sous un champ unique (traits, effets, pouvoirs) */
.edc-ligne-champs > .edc-aide--champ,
.edc-section-corps > .edc-aide--champ {
    flex-basis: 100%;
}

.edc-ligne-champs > .edc-riche-bloc {
    flex: 1 1 100%;
}

/* Nom et caractéristiques + figurine sur une même rangée, même hauteur */
.edc-rangee {
    display: grid;
    gap: 0.6rem;
}

@media (min-width: 1200px) {
    .edc-rangee {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        align-items: stretch;
    }

    .edc-rangee .edc-ligne-libelle {
        flex-basis: 6.5rem;
    }
}

.edc-curseurs--colonne {
    grid-template-columns: minmax(0, 1fr);
}

/* Pouvoirs : toujours en gras, comme sur la carte */
.edc-riche--gras {
    font-weight: 700;
}

/* Légende : masquée tant qu'aucune n'est ajoutée (seul le bouton reste) */
.edc-legende.is-vide .edc-ligne-libelle,
.edc-legende.is-vide .edc-aide--champ {
    display: none;
}

/* Élément et dégâts sur une ligne */
.edc-ligne--element .edc-tuiles {
    margin-right: 0.4rem;
}

/* Coût impossible avec ceux déjà saisis */
.edc-nombre.is-indisponible {
    opacity: 0.35;
    filter: grayscale(1);
    cursor: not-allowed;
}

/* Élément choisi bien visible ; les autres atténués */
.edc-tuile:not(:has(input:checked)) .edc-tuile-ico {
    opacity: 0.5;
    filter: grayscale(0.7);
}

.edc-tuile:not(:has(input:checked)):hover .edc-tuile-ico {
    opacity: 0.85;
    filter: none;
}

.edc-tuile:has(input:checked) {
    border-color: var(--rouille);
    box-shadow:
        0 0 0 2px var(--rouille),
        0 2px 8px rgba(0, 0, 0, 0.25);
    transform: scale(1.12);
}

/* Les 5 caractéristiques sur une ligne à côté de la figurine */
.edc-rangee .edc-nombres {
    gap: 0.4rem 0.45rem;
}

.edc-rangee .edc-nombre input {
    width: 2.5rem;
}
