/* Minimaps et défis, partie de la page (séparée de minimap-jeu.css le 2026-11-17) : macarons des modes, GG, classements,
   records du visiteur, messages d'envoi, encart « Tenter le défi ». Chargée d'office sur /defis, /defis/{slug} et Ressources › Minimaps.
   Le plateau (#mj) est dans minimap-jeu.css, chargé au premier « Jouer » juste après cette feuille (même cascade) :
   une règle qui touche la page hors du plateau va ici, une règle du plateau là-bas. */

/* ---------- Encart « Tenter le défi » de la page ---------- */

.mj-appel {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    color: #eaf6ff;
    background: #0d1729;
    border: 2px solid rgba(242, 193, 78, 0.45);
    border-radius: var(--radius-card);
    box-shadow: 0 6px 18px rgba(14, 34, 54, 0.35);
    isolation: isolate;
}

/* Fond identique à l'arène des Défis (.defi-arene de defis.css) : illustration de la minimap floutée, assombrie */
.mj-appel::before {
    content: '';
    position: absolute;
    inset: -30px;
    z-index: -2;
    background: var(--defi-fond, none) center / cover;
    filter: blur(18px) saturate(1.2);
    clip-path: inset(30px round var(--radius-card));
}

.mj-appel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(100deg, rgba(13, 23, 41, 0.96) 0%, rgba(13, 23, 41, 0.85) 55%, rgba(13, 23, 41, 0.55) 100%);
}

#arene {
    scroll-margin-top: 1rem;
}

.mj-appel-classement {
    font-weight: 700;
    color: #f2c14e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mj-appel-classement:hover {
    color: #ffe08a;
}

.mj-appel[hidden] {
    display: none;
}

.mj-appel-pions {
    display: flex;
    align-items: flex-end;
}

.mj-appel-pions img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
}

.mj-appel-pions img:first-child {
    width: 64px;
    height: 64px;
    margin-right: -0.25rem;
}

.mj-appel-pions img:nth-child(n + 2) {
    animation: mj-dandine 1.6s ease-in-out infinite;
}

.mj-appel-texte {
    flex: 1 1 14rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.92rem;
}

.mj-appel-texte strong {
    font-family: 'Grandstander', cursive;
    font-size: 1.25rem;
    color: #f2d98a;
}

.mj-appel-bouton,
.mj-bouton {
    padding: 0.7rem 1.4rem;
    font-family: 'Grandstander', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2a1c12;
    background: linear-gradient(#f6d77c, #c99a3c);
    border: 2px solid #8a6a2c;
    border-radius: 999px;
    box-shadow:
        0 4px 0 #6b4f1c,
        0 6px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
}

.mj-appel-bouton:hover,
.mj-bouton:hover {
    transform: translateY(-2px);
}

.mj-appel-bouton:active,
.mj-bouton:active {
    transform: translateY(3px);
    box-shadow:
        0 1px 0 #6b4f1c,
        0 2px 6px rgba(0, 0, 0, 0.35);
}

.mj-appel-bouton {
    animation: mj-appel 2.4s ease-in-out infinite;
}

.mj-son {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    color: var(--mj-or);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--mj-bord);
    border-radius: 50%;
    cursor: pointer;
}

.mj-son:hover {
    background: rgba(255, 255, 255, 0.18);
}

.mj-son[aria-pressed='false'] {
    color: var(--mj-texte);
    opacity: 0.55;
}

.mj-son[aria-pressed='false']::after {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
}

/* GG (points du classement général) : nombre + icône du jeu */
.mj-gg {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    vertical-align: middle;
    font-weight: 800;
    color: var(--mj-or);
}

.mj-gg img {
    width: 1.5em;
    height: 1.5em;
    object-fit: contain;
}

/* ---------- Animations ---------- */

@keyframes mj-appel {
    0%,
    100% {
        box-shadow:
            0 4px 0 #6b4f1c,
            0 0 0 0 rgba(242, 193, 78, 0.6);
    }
    50% {
        box-shadow:
            0 4px 0 #6b4f1c,
            0 0 0 10px rgba(242, 193, 78, 0);
    }
}

@keyframes mj-dandine {
    0%,
    100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg) translateY(-2px);
    }
}

@keyframes mj-apparition {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mj *,
    .mj-appel * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.mj-bouton--petit {
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
}

.mj-lien {
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--mj-or, #c99a3c);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.mj-envoi {
    margin: 0 0 1rem;
    padding: 0.6rem 0.8rem;
    font-weight: 700;
    background: rgba(242, 193, 78, 0.12);
    border: 1px solid rgba(242, 193, 78, 0.5);
    border-radius: 0.6rem;
}

.mj-envoi a {
    color: #f2c14e;
}

.mj-envoi .is-erreur {
    color: #ff8a80;
}

.mj-envoi--page {
    color: var(--texte-page);
    background: var(--beige-clair);
    border-color: var(--or);
}

.mj-envoi--page a {
    color: var(--rouille);
}

/* ---------- Badges des modes réussis (page de la minimap, vignettes de la liste) ---------- */

.mj-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
    margin: -0.5rem 0 1rem;
}

.mj-badges:empty {
    display: none;
}

/* Macaron : sceau étoilé (carré + deux carrés tournés = 12 pointes, anneau intérieur) et ruban à queues fourchues */
.mj-badge {
    --mj-sceau: 3rem;
    --mj-sceau-fond: #4fa64a;
    --mj-sceau-pointes: #3f8f3a;
    --mj-sceau-anneau: #e8f6df;
    --mj-sceau-symbole: #fff;
    --mj-ruban: #2a6a27;
    --mj-ruban-queue: #1d4d1b;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    /* Liseré blanc puis contour sombre net autour de toute la forme, puis ombre portée : lisible sur toute illustration */
    filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(1.5px 0 0 #160d05) drop-shadow(-1.5px 0 0 #160d05)
        drop-shadow(0 1.5px 0 #160d05) drop-shadow(0 -1.5px 0 #160d05) drop-shadow(0 4px 5px rgba(0, 0, 0, 0.6));
}

/* Défi : sceau violet (couleur de la pastille Défi), grande étoile dorée, ruban violet foncé */
.mj-badge--defi {
    --mj-sceau-fond: #8f5fd0;
    --mj-sceau-pointes: #7b4bb0;
    --mj-sceau-anneau: #d9c2f5;
    --mj-sceau-symbole: #ffc83d;
    --mj-ruban: #5a2596;
    --mj-ruban-queue: #3a1566;
}

.mj-badge--defi .mj-badge-sceau {
    font-size: calc(var(--mj-sceau) * 0.68);
    text-shadow:
        0 0 1px #8a5a00,
        0 1px 0 #b8860b,
        0 2px 2px rgba(40, 10, 80, 0.55);
}

/* Duel : sceau orangé, deux épées croisées, ruban orange foncé (grisé tant qu'aucun Duel Double n'est fait) */
.mj-badge--duel {
    --mj-sceau-fond: #f7a24a;
    --mj-sceau-pointes: #e0762a;
    --mj-sceau-anneau: #fff0d8;
    --mj-ruban: #d2601a;
    --mj-ruban-queue: #9a3f0c;
}

.mj-epees {
    position: relative;
    display: block;
    width: calc(var(--mj-sceau) * 0.62);
    height: calc(var(--mj-sceau) * 0.62);
}

.mj-epees::before,
.mj-epees::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -4%;
    width: 17%;
    height: 108%;
    margin-left: -8.5%;
    border-radius: 50% 50% 18% 18% / 14% 14% 18% 18%;
    /* lame argentée, garde dorée, poignée brune */
    background: linear-gradient(to bottom, #fff 0 60%, #7a8794 60% 62%, #3a2208 62% 68%, #5a3410 68% 100%);
    filter: drop-shadow(0 0 1px #3a1c04);
    transform: rotate(45deg);
}

.mj-epees::after {
    transform: rotate(-45deg);
}

.mj-badge.is-verrouille .mj-epees {
    opacity: 0.85;
}

/* Épées en petit, dans un texte (jauge « Duels remportés » des Défis) */
.mj-epees--mini {
    --mj-sceau: 1.5rem;
    display: inline-block;
    vertical-align: -0.2em;
}

/* Niveau du Duel Double battu : 1 à 3 étoiles dans le ruban (obtenues dorées, les autres ternes) */
.mj-etoiles {
    margin-left: 0.3em;
    letter-spacing: 0;
    white-space: nowrap;
}

.mj-etoiles i {
    font-size: 1.2em;
    font-style: normal;
    line-height: 1;
    vertical-align: -0.05em;
    /* étoile vide : creuse, contour sombre */
    color: rgba(0, 0, 0, 0.25);
    -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.6);
    text-shadow: none;
}

/* Étoile gagnée : couleur du niveau battu (Noob vert, Disciple bleu, Maître violet, comme les parties de référence), cernée de sombre pour ressortir sur le ruban orange */
.mj-etoiles i.is-on {
    color: #ffd44d;
    -webkit-text-stroke: 0.7px #2a1400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

[data-etoiles='1'] .mj-etoiles i.is-on {
    color: #3fe068;
}

[data-etoiles='2'] .mj-etoiles i.is-on {
    color: #4fb4ff;
}

[data-etoiles='3'] .mj-etoiles i.is-on {
    color: #b66cff;
}

/* Mode pas encore réussi : grisé, sans relief */
.mj-badge.is-verrouille {
    opacity: 0.7;
}

.mj-badge.is-verrouille .mj-badge-sceau,
.mj-badge.is-verrouille .mj-badge-ruban {
    filter: grayscale(1) brightness(0.95);
}

.mj-badge.is-verrouille .mj-badge-sceau {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: none;
}

.mj-badge-sceau {
    position: relative;
    z-index: 0;
    display: grid;
    place-items: center;
    width: var(--mj-sceau);
    height: var(--mj-sceau);
    font-size: calc(var(--mj-sceau) * 0.46);
    font-weight: 900;
    line-height: 1;
    color: var(--mj-sceau-symbole);
    background: radial-gradient(circle, transparent 0 56%, var(--mj-sceau-anneau) 57% 61%, transparent 62%), radial-gradient(circle, var(--mj-sceau-fond) 0 70%, var(--mj-sceau-pointes) 71%);
    border-radius: 3px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mj-badge-sceau::before,
.mj-badge-sceau::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--mj-sceau-pointes);
    border-radius: 3px;
    transform: rotate(30deg);
}

.mj-badge-sceau::after {
    transform: rotate(60deg);
}

.mj-badge-ruban {
    position: relative;
    z-index: 1;
    margin-top: calc(var(--mj-sceau) * -0.22);
    padding: 0.1rem 0.5rem;
    font-size: calc(var(--mj-sceau) * 0.23);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
    background: var(--mj-ruban);
    border-radius: 2px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

.mj-badge-ruban::before,
.mj-badge-ruban::after {
    content: '';
    position: absolute;
    top: 0.25em;
    z-index: -1;
    width: 0.9em;
    height: 100%;
    background: var(--mj-ruban-queue);
}

.mj-badge-ruban::before {
    left: -0.6em;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 35% 50%);
}

.mj-badge-ruban::after {
    right: -0.6em;
    clip-path: polygon(0 0, 100% 0, 65% 50%, 100% 100%, 0 100%);
}

.mj-badge.is-nouveau {
    animation: mj-apparition 0.6s cubic-bezier(0.3, 1.6, 0.6, 1);
}

/* Vignettes : en haut à droite, bien visibles */
.mj-badges--carte {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    justify-content: flex-end;
    gap: 1.1rem;
    margin: 0;
}

.mj-badges--carte .mj-badge {
    --mj-sceau: 2.6rem;
}

/* Fiche d'un défi (sur l'illustration) et encart « Jouez-la en ligne ! » : tous les modes, en haut à droite */
.mj-badges--coin {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    z-index: 2;
    justify-content: flex-end;
    margin: 0;
}

/* Encart : macarons à cheval sur le bord du haut */
.mj-appel {
    position: relative;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
}

.mj-appel .mj-badges--coin {
    top: -1.6rem;
}

.mj-appel .mj-badges--coin .mj-badge {
    --mj-sceau: 2.8rem;
}

.mj-jouable {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: #eaf6ff;
    background: #173a57;
    border: 1px solid #c99a3c;
    border-radius: 999px;
}

/* ---------- Classements (page de la minimap, liste des minimaps) : couleurs du site ---------- */

/* Un classement par mode, côte à côte (l'un sous l'autre sur un petit écran) */
.mj-classement-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1rem 1.5rem;
    margin-bottom: 0.75rem;
}

.mj-classement-liste {
    min-width: 0;
    padding: 0.75rem 0.9rem 0.5rem;
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-top: 3px solid #4f8a1f;
    border-radius: 0.75rem;
    overflow-x: auto;
}

.mj-classement-liste--defi {
    border-top-color: var(--or);
}

/* Mis en avant un instant (lien « Voir le classement ») */
.mj-classement-liste.is-repere {
    animation: mj-classement-repere 1.6s ease-out;
}

@keyframes mj-classement-repere {
    0%,
    40% {
        box-shadow:
            0 0 0 3px var(--or),
            0 0 24px rgba(242, 193, 78, 0.6);
    }
}

.mj-classement-titre {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
}

.mj-classement-mode {
    font-family: 'Grandstander', cursive;
    font-size: 1.15rem;
    font-weight: 700;
}

.mj-classement-liste--defi .mj-classement-mode span {
    color: var(--or);
}

.mj-classement-nombre {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.75;
}
/* Classement général : tableau qui défile de côté sur un petit écran (toutes les colonnes gardées) */
.mj-tableau-defile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Toutes les colonnes gardées sur téléphone : le tableau défile de côté (.mj-classement-liste, .mj-tableau-defile) */
.mj-tableau {
    width: 100%;
    min-width: max-content;
    margin-bottom: 0.5rem;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.mj-tableau th {
    padding: 0.3rem 0.4rem;
    font-size: 0.78rem;
    text-align: left;
    text-transform: uppercase;
    opacity: 0.7;
    border-bottom: 2px solid var(--beige-fonce);
}

.mj-tableau td {
    padding: 0.4rem;
    border-bottom: 1px solid var(--beige-fonce);
}

.mj-tableau tr.is-moi td {
    font-weight: 800;
    background: rgba(201, 154, 60, 0.18);
}

.mj-tableau-rang {
    width: 2.5rem;
    font-weight: 800;
    text-align: center;
}

/* Temps et PV sur une seule ligne */
.mj-tableau-nombre {
    white-space: nowrap;
}

/* Classement général : colonnes du Duel Double séparées du reste (trait vertical orangé) */
.mj-tableau .mj-tableau-duel-debut {
    padding-left: 0.8rem;
    border-left: 2px solid rgba(210, 96, 26, 0.55);
}

/* Titre « Duel » au-dessus des trois colonnes de niveaux */
.mj-tableau .mj-tableau-groupe td,
.mj-tableau .mj-tableau-groupe th {
    padding-bottom: 0;
    border-bottom: 0;
}

.mj-tableau .mj-tableau-groupe th {
    text-align: center;
    color: #d2601a;
}

/* En-têtes des niveaux du duel : étoiles dorées du macaron */
.mj-tableau th.mj-tableau-etoiles {
    color: #e0a21a;
    letter-spacing: 0;
    white-space: nowrap;
}

/* Flex sur un élément dans la cellule : une cellule en flex sortirait du tableau (ligne décalée) */
.mj-tableau-pseudo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mj-avatar {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    flex: none;
    font-weight: 800;
    color: #fff;
    background: var(--brun-cuir-clair);
    border-radius: 50%;
}

.mj-tableau-ellipse td {
    text-align: center;
    opacity: 0.6;
}

.mj-classement-invitation {
    padding: 0.6rem 0.8rem;
    background: var(--beige-clair);
    border-left: 4px solid var(--or);
    border-radius: 0.4rem;
}

.mj-classement-invitation .mj-lien {
    color: var(--rouille);
}

/* Record d'un visiteur sous le classement de son mode (jamais dedans) */
.mj-classement-perso {
    margin: 0.6rem 0 0;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    border: 1px dashed var(--or);
    border-radius: 0.4rem;
}

.mj-classement-perso .mj-lien {
    color: var(--rouille);
}

.mj-classement--general {
    max-width: 52rem;
    margin: 2.5rem auto;
}

.mj-classement--general h2 {
    text-align: center;
}

@media (max-width: 991.98px) {
    .mj-tableau {
        font-size: 0.82rem;
    }
}

.mj-envoi-ok {
    font-weight: 800;
    color: #7bd389;
}
/* ---------- Classement d'une minimap : parties de référence (Noob, Disciple, Maître), repérables sans les nommer ---------- */

.mj-tableau tr.mj-reference {
    --ref: #7bd389;
}

.mj-tableau tr.mj-reference--disciple {
    --ref: #6fc3ff;
}

.mj-tableau tr.mj-reference--maitre {
    --ref: #c99aff;
}

/* Ligne en pointillés à la couleur du niveau, fond rayé très léger, nom en italique */
.mj-tableau tr.mj-reference td {
    font-style: italic;
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ref) 10%, transparent) 0 6px, transparent 6px 12px);
    border-top: 1px dashed color-mix(in srgb, var(--ref) 70%, transparent);
    border-bottom: 1px dashed color-mix(in srgb, var(--ref) 70%, transparent);
}

.mj-tableau tr.mj-reference td:first-child {
    border-left: 3px solid var(--ref);
}

/* Tête détourée du Krosmaster à la place de l'initiale */
.mj-avatar--krosmaster {
    position: relative;
    overflow: visible;
    background: color-mix(in srgb, var(--ref) 30%, transparent);
    box-shadow: 0 0 0 2px var(--ref);
}

/* Centrée en absolu : plus grande que le rond, la grille la décalerait */
.mj-avatar--krosmaster img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 125%;
    max-width: none;
    height: 125%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Niveau en étoiles : une (Noob), deux (Disciple), trois (Maître), comme le choix de l'adversaire du duel */
.mj-reference-niveau {
    display: inline-flex;
    gap: 1px;
    margin-left: 0.15rem;
    vertical-align: middle;
}

.mj-reference-niveau svg {
    width: 0.8rem;
    height: 0.8rem;
    fill: var(--ref);
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--ref) 70%, transparent));
}
/* ---------- Classement d'une minimap : duels (Duel #1, Duel #2), niveau de l'adversaire battu en étoiles ---------- */

.mj-classement-duels {
    margin-top: 1.25rem;
}

.mj-classement-duels-titre {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-family: 'Grandstander', cursive;
    font-size: 1.3rem;
    font-weight: 700;
}

.mj-classement-duels-titre span {
    color: #c26a12;
}

.mj-classement-liste--duel {
    border-top-color: #c26a12;
}

.mj-classement-liste--duel .mj-classement-mode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.mj-classement-liste--duel .mj-classement-nombre {
    white-space: nowrap;
}

.mj-classement-liste--duel .mini-mode {
    font-family: inherit;
    font-size: 0.85rem;
}

/* Ligne : liseré à gauche à la couleur du niveau battu (mêmes couleurs que les parties de référence) */
.mj-duel-ligne,
.mj-duel-ligne--noob {
    --ref: #7bd389;
}

.mj-duel-ligne--disciple {
    --ref: #6fc3ff;
}

.mj-duel-ligne--maitre {
    --ref: #c99aff;
}

.mj-duel-niveau {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.05rem 0.35rem 0.05rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ref);
    background: color-mix(in srgb, var(--ref) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--ref) 55%, transparent);
    border-radius: 999px;
    white-space: nowrap;
}

.mj-duel-etoiles {
    display: inline-flex;
    gap: 1px;
}

.mj-duel-etoiles svg {
    width: 0.8rem;
    height: 0.8rem;
    fill: var(--ref);
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--ref) 70%, transparent));
}

/* Attente de la vérification de l'adversaire rejoué par le serveur */
.mj-points-attente {
    display: inline-flex;
    gap: 0.2rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.mj-points-attente i {
    width: 0.35rem;
    height: 0.35rem;
    background: currentColor;
    border-radius: 50%;
    animation: mj-point-attente 1.2s ease-in-out infinite;
}

.mj-points-attente i:nth-child(2) {
    animation-delay: 0.2s;
}

.mj-points-attente i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes mj-point-attente {
    0%,
    80%,
    100% {
        opacity: 0.25;
    }
    40% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mj-points-attente i {
        animation: none;
    }
}

.mj-tableau--replie [data-plus],
.mj-tableau:not(.mj-tableau--replie) .mj-replie-seul {
    display: none;
}

.mj-plus {
    margin: 0.5rem 0 0.25rem;
    text-align: center;
}

.mj-duels-principe {
    margin: 0 0 0.9rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.mj-classement-liste--duel {
    border-top-color: var(--ref);
}

.mj-score {
    font-family: 'Grandstander', cursive;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    color: #2f9e44;
}

.mj-score.is-negatif {
    color: #d64545;
}

/* Duels : un seul tableau, une grande colonne par niveau (rang au niveau, score, temps), teintée de la couleur du niveau */
.mj-tableau--duels th.mj-duel-col {
    min-width: 7.5rem;
    text-align: center;
    text-transform: none;
    opacity: 1;
    border-bottom-color: var(--ref);
}

.mj-tableau--duels th.mj-duel-col.is-repere {
    animation: mj-classement-repere 1.6s ease-out;
}

.mj-duel-col-nombre {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.7;
}

.mj-tableau--duels td.mj-duel-cellule {
    text-align: center;
    white-space: nowrap;
    background: color-mix(in srgb, var(--ref) 7%, transparent);
    border-left: 1px solid color-mix(in srgb, var(--ref) 35%, transparent);
}

.mj-tableau--duels td.mj-duel-cellule.is-vide {
    opacity: 0.4;
}

.mj-duel-rang {
    display: inline-block;
    min-width: 1.6rem;
    margin-right: 0.3rem;
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0.8;
    vertical-align: middle;
}

/* Pastilles des deux duels à gauche du temps, sous le score */
.mj-duel-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.4rem;
    margin-top: 0.15rem;
}

.mj-duel-detail .mj-manche {
    min-width: 1.8rem;
    font-size: 0.72rem;
}

.mj-duel-temps {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
}

.mj-manches {
    display: inline-flex;
    gap: 0.3rem;
}

/* Chaque manche : son écart de PV, teinté victoire / défaite / égalité (teintes translucides : lisibles dans les deux thèmes) */
.mj-manche {
    min-width: 2.1rem;
    padding: 0.05rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
    background: color-mix(in srgb, #8a8a8a 22%, transparent);
    border-radius: 0.8rem;
}

.mj-manche--victoire {
    background: color-mix(in srgb, #2f9e44 28%, transparent);
}

.mj-manche--defaite {
    background: color-mix(in srgb, #d64545 26%, transparent);
}
