/* Minecraft.fr — Carte mod inline (CurseForge & Modrinth), design "papier" */

/* ===== Wrapper paire ===== */
.mcfr-cf-cards-pair {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 24px 0;
}
@media (min-width: 1100px) {
    .mcfr-cf-cards-pair {
        grid-template-columns: 1fr 1fr;
    }
    .mcfr-cf-cards-pair .mcfr-cf-card {
        margin: 0;
    }
}

/* ===== Tokens globaux (au niveau :root pour survivre au RUCSS) ===== */
:root {
    --mcfr-bg: #fbfaf6;
    --mcfr-separator: #d8d4c2;
    --mcfr-text: #1a1a1a;
    --mcfr-text-muted: #6b6960;
    --mcfr-cta-outline: #1a1a1a;
    --mcfr-action: #5cb31c;        /* vert minecraft.fr — accent action (hover liens, boutons DL 1D, CTA fallback) */
    --mcfr-action-dark: #4a9b17;
    --mcfr-border-strong: #2a2a2a;
}

/* ===== Tokens de thème par source =====
   La carte hérite désormais d'une bordure neutre (--mcfr-border-strong). Les
   variables --mcfr-color / --mcfr-color-dark restent par source, utilisées
   uniquement pour le dot de couleur dans le badge source (seul vestige de
   l'identité CF/MR depuis la refonte v1.2.4). */
.mcfr-cf-card {
    --mcfr-color: #4caf50;
    --mcfr-color-dark: #3a8a3e;
    --mcfr-color-soft: #e8f5e1;
}
.mcfr-cf-card[data-source="curseforge"] {
    --mcfr-color: #f16436;
    --mcfr-color-dark: #c84e25;
    --mcfr-color-soft: #fde0d3;
}
.mcfr-cf-card[data-source="modrinth"] {
    --mcfr-color: #1bd96a;
    --mcfr-color-dark: #16b157;
    --mcfr-color-soft: #d9f7e3;
}

/* ===== Carte ===== */
.mcfr-cf-card {
    position: relative;
    box-sizing: border-box;
    background: var(--mcfr-bg);
    border: 2px solid var(--mcfr-border-strong);
    border-radius: 8px;
    padding: 24px 20px 20px;
    margin: 32px 0 24px;
    max-width: 100%;
    min-height: 300px;
    color: var(--mcfr-text);
    font-family: inherit;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mcfr-cf-card *,
.mcfr-cf-card *::before,
.mcfr-cf-card *::after {
    box-sizing: border-box;
}

/* ===== Badge source (haut gauche, à cheval sur le liseré) ===== */
.mcfr-cf-card__source-badge {
    position: absolute;
    top: -12px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mcfr-bg);
    border: 1px solid var(--mcfr-separator);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mcfr-text-muted);
    line-height: 1.3;
}
.mcfr-cf-card__source-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mcfr-color);
    flex-shrink: 0;
}
.mcfr-cf-card__source-name {
    font-family: inherit;
}

/* ===== Header ===== */
.mcfr-cf-card__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.mcfr-cf-card__logo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    background: #efece2;
    border: 1.5px solid #d8d4c2;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcfr-cf-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mcfr-cf-card__logo-placeholder {
    font-size: 11px;
    color: #999;
    text-transform: lowercase;
}

.mcfr-cf-card__title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.mcfr-cf-card__title {
    margin: 0 0 2px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    color: var(--mcfr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcfr-cf-card__title-link {
    color: inherit;
    cursor: pointer;
}
.mcfr-cf-card__title-link:hover { text-decoration: underline; }

.mcfr-cf-card__subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--mcfr-text-muted);
}

.mcfr-cf-card__type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e3f5d3;
    color: #3a7a14;
}
.mcfr-cf-card__type-badge--texture_pack { background: #fff2cc; color: #8a6d00; }
.mcfr-cf-card__type-badge--shader       { background: #dde7ff; color: #2b4ea8; }
.mcfr-cf-card__type-badge--map          { background: #f6dce6; color: #9c2256; }
.mcfr-cf-card__type-badge--modpack      { background: #e8e0fb; color: #5a3aa1; }
.mcfr-cf-card__type-badge--datapack     { background: #ffe0e0; color: #a13030; }
.mcfr-cf-card__type-badge--plugin       { background: #d4f1f4; color: #1f6e7c; }

.mcfr-cf-card__author-link {
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.3);
}

.mcfr-cf-card__summary {
    margin: 4px 0 0;
    color: #444;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mcfr-cf-card__stale {
    margin: 4px 0 0;
    color: #b04400;
    font-size: 12px;
    font-weight: 600;
}

/* ===== Stats (4 KPI avec séparateurs verticaux hand-drawn) ===== */
.mcfr-cf-card__stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.mcfr-cf-card__stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    min-width: 0;
}

/* Séparateur vertical hand-drawn entre stats (SVG inline) */
.mcfr-cf-card__stat + .mcfr-cf-card__stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='40' viewBox='0 0 3 40' preserveAspectRatio='none'%3E%3Cpath d='M1.5 2 Q2.4 10 1.1 20 Q2.4 30 1.5 38' stroke='%23d8d4c2' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 3px 100%;
}

.mcfr-cf-card__stat-value {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    color: var(--mcfr-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    line-height: 1.1;
}

.mcfr-cf-card__stat-label {
    font-size: 11px;
    color: var(--mcfr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mcfr-cf-card__stat-label-short { display: inline; }
.mcfr-cf-card__stat-label-full { display: none; }

/* Variante 2 lignes pour la stat « Mise à jour » : relatif + date exacte. */
.mcfr-cf-card__stat-value--stacked { white-space: normal; align-items: center; padding-bottom: 4px; }
.mcfr-cf-card__stat-value-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.mcfr-cf-card__stat-value-main { display: block; }
.mcfr-cf-card__stat-value-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--mcfr-text-muted);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

/* ===== Squiggle horizontal séparateur ===== */
.mcfr-cf-card__squiggle {
    height: 6px;
    margin: 0 -4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='6' viewBox='0 0 200 6' preserveAspectRatio='none'%3E%3Cpath d='M0 3 Q10 0 20 3 T40 3 T60 3 T80 3 T100 3 T120 3 T140 3 T160 3 T180 3 T200 3' stroke='%23d8d4c2' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
    background-size: 200px 6px;
    background-repeat: repeat-x;
    background-position: center;
}

/* ===== Compatibilité (MC + LOADER côte à côte) ===== */
.mcfr-cf-card__compat {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.mcfr-cf-card__compat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.mcfr-cf-card__compat-row + .mcfr-cf-card__compat-row {
    border-left: 1.5px solid var(--mcfr-separator);
    padding-left: 12px;
}

.mcfr-cf-card__compat-group-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mcfr-text-muted);
    font-weight: 700;
    margin-right: 2px;
}

.mcfr-cf-card__badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1.2px solid #d4d4d4;
    background: #fff;
    color: #333;
    white-space: nowrap;
}

.mcfr-cf-card__badge--mc       { border-color: #c8c8c0; color: #1f2937; }
.mcfr-cf-card__badge--mc-extra { background: #efece2; border-color: #c8c8c0; color: #555; }
.cf-obf-link.mcfr-cf-card__badge--mc { cursor: pointer; }
.cf-obf-link.mcfr-cf-card__badge--mc:hover { background: #efece2; }
.cf-obf-link.mcfr-cf-card__badge--mc-extra:hover,
.mcfr-cf-card__badge--mc-extra[role="button"]:hover { background: #e5e1d2; color: #333; }
.mcfr-cf-card__badge--mc-extra[role="button"] { cursor: pointer; }

.mcfr-cf-card__badge-version {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.mcfr-cf-card__badge-count {
    margin-left: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #8a8780;
    opacity: 0.9;
}
.mcfr-cf-card__badge--has-subs {
    cursor: pointer;
    position: relative;
    padding-right: 12px;
}
.mcfr-cf-card__badge--has-subs::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 4px;
    width: 0; height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 3px solid #b5b1a3;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.mcfr-cf-card__badge--has-subs:hover::after,
.mcfr-cf-card__badge--has-subs:focus-visible::after { opacity: 1; }
.mcfr-cf-card__badge--has-subs:hover .mcfr-cf-card__badge-count { color: #1f2937; opacity: 1; }

.mcfr-cf-card__badge--loader-forge     { border-color: #4d9b3d; color: #2a6a1f; background: #e7f5e0; }
.mcfr-cf-card__badge--loader-fabric    { border-color: #8b6b3f; color: #5a3f15; background: #f7ecda; }
.mcfr-cf-card__badge--loader-neoforge  { border-color: #f16436; color: #b13d11; background: #fde0d3; }
.mcfr-cf-card__badge--loader-quilt     { border-color: #9b6db8; color: #4d2466; background: #f1e2fa; }

/* ===== Grille de téléchargements (v2) ===== */
.mcfr-cf-card__downloads {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mcfr-cf-card__downloads-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 2px;
    color: var(--mcfr-text);
    letter-spacing: -0.01em;
}
.mcfr-cf-card__downloads-help {
    margin: 0;
    color: var(--mcfr-text-muted);
    font-style: italic;
    font-size: 13px;
}
.mcfr-cf-card__dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    align-items: start; /* chaque tuile garde sa hauteur propre quand une voisine s'ouvre */
}
.mcfr-cf-card__dl-tile {
    border: 1.5px solid var(--mcfr-border-strong);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    list-style: none;
}
.mcfr-cf-card__dl-tile-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 600;
    user-select: none;
    border-radius: 6px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background 0.15s ease;
}
.mcfr-cf-card__dl-tile-summary:hover {
    background: rgba(0, 0, 0, 0.04);
}
.mcfr-cf-card__dl-tile-summary::-webkit-details-marker { display: none; }
.mcfr-cf-card__dl-tile-summary::marker { content: ''; }
.mcfr-cf-card__dl-tile-major {
    font-size: 18px;
    color: var(--mcfr-text);
    font-variant-numeric: tabular-nums;
}
.mcfr-cf-card__dl-tile-sub {
    font-size: 12px;
    color: var(--mcfr-text-muted);
    font-variant-numeric: tabular-nums;
}
.mcfr-cf-card__dl-tile-chevron {
    margin-left: auto;
    transition: transform 0.15s ease;
    color: var(--mcfr-text-muted);
    font-size: 12px;
}
.mcfr-cf-card__dl-tile[open] .mcfr-cf-card__dl-tile-chevron { transform: rotate(180deg); }

.mcfr-cf-card__dl-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}
.mcfr-cf-card__dl-sub-label {
    font-size: 11px;
    color: var(--mcfr-text-muted);
    width: 100%;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.mcfr-cf-card__dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: pointer;
    color: #fff;
    background: var(--mcfr-action);
    transition: filter 0.15s ease, transform 0.15s ease;
}
/* Défense vs thèmes WP qui forcent `a { color: <bleu> }` plus spécifique.
   `!important` justifié : on protège la lisibilité texte blanc sur fond coloré. */
.mcfr-cf-card .mcfr-cf-card__dl-btn,
.mcfr-cf-card a.mcfr-cf-card__dl-btn,
.mcfr-cf-card a.mcfr-cf-card__dl-btn:visited,
.mcfr-cf-card a.mcfr-cf-card__dl-btn:hover,
.mcfr-cf-card a.mcfr-cf-card__dl-btn:focus,
.mcfr-cf-card a.mcfr-cf-card__dl-btn:active {
    color: #fff !important;
    text-decoration: none !important;
}
.mcfr-cf-card .mcfr-cf-card__dl-btn-label,
.mcfr-cf-card .mcfr-cf-card__dl-btn-arrow {
    color: inherit !important;
}
.mcfr-cf-card__dl-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.mcfr-cf-card__dl-btn:active { transform: translateY(0); }
.mcfr-cf-card__dl-btn-arrow { font-weight: 700; }

/* Couleurs loader — miroir manuel de MCFR_CF_Renderer::loader_palette().
   La méthode PHP est la source de vérité pour le critical CSS inline.
   Si tu ajoutes un loader, ajoute-le AUSSI dans loader_palette() pour que le
   critical CSS le couvre en cas de stripping WP Rocket.
   Hex alignés sur les border-color des chips loader (.mcfr-cf-card__badge--loader-*)
   pour cohérence visuelle entre les chips et les boutons DL. */
.mcfr-cf-card__dl-btn--fabric   { background: #7a5d36; }
.mcfr-cf-card__dl-btn--neoforge { background: #d95527; }
.mcfr-cf-card__dl-btn--forge    { background: #3d8a30; }
.mcfr-cf-card__dl-btn--quilt    { background: #835a9d; }
.mcfr-cf-card__dl-btn--iris     { background: #5b4dd1; }
.mcfr-cf-card__dl-btn--optifine { background: #2d3436; }

.mcfr-cf-card__dl-btn[data-origin="cf_page"]::after {
    content: '\2197';
    margin-left: 2px;
    opacity: 0.85;
    font-size: 11px;
}

.mcfr-cf-card__dl-tile-more {
    display: inline-block;
    margin-top: 8px;
    color: var(--mcfr-text);
    text-decoration: underline;
    font-size: 12px;
    font-style: italic;
}
.mcfr-cf-card__dl-tile-more:hover { color: var(--mcfr-action); }

.mcfr-cf-card__dl-footer {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mcfr-cf-card__dl-footer a {
    color: var(--mcfr-text);
    text-decoration: underline;
    font-size: 13px;
    font-weight: 600;
}
.mcfr-cf-card__dl-footer a:hover { color: var(--mcfr-action); }

@media (max-width: 599px) {
    .mcfr-cf-card__dl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
    .mcfr-cf-card__dl-grid { grid-template-columns: 1fr; }
}

/* ===== CTA ===== */
.mcfr-cf-card__cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.mcfr-cf-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    height: 44px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: 0.02em;
    transition: filter 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    border: 2px solid var(--mcfr-cta-outline);
    line-height: 1;
}

.mcfr-cf-card__btn--primary {
    background: var(--mcfr-action);
    color: #fff;
}

.mcfr-cf-card__btn--primary:hover,
.mcfr-cf-card__btn--primary:focus {
    background: var(--mcfr-action);
    color: #fff;
    filter: brightness(0.95);
    text-decoration: none;
}

.mcfr-cf-card__btn-label {
    white-space: nowrap;
}

.mcfr-cf-card__btn-icon {
    font-size: 1em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.mcfr-cf-card__btn-icon img {
    width: 28px;
    height: 28px;
    display: block;
    image-rendering: pixelated;
}

.mcfr-cf-card__btn-arrow {
    display: inline-block;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.15s ease;
}

.mcfr-cf-card__btn:hover .mcfr-cf-card__btn-arrow,
.mcfr-cf-card__btn:focus .mcfr-cf-card__btn-arrow {
    transform: translateX(2px);
}

.mcfr-cf-card__cta-secondary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.mcfr-cf-card__link {
    color: var(--mcfr-text);
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
}
.mcfr-cf-card__link:hover { color: var(--mcfr-action); }

.cf-obf-link { cursor: pointer; }
.cf-obf-link:focus-visible {
    outline: 2px solid var(--mcfr-color-dark);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Variant fusionnée (CurseForge + Modrinth) =====
   La bordure reste neutre (héritée de .mcfr-cf-card). La double-provenance est
   signalée par 2 mini-badges côte à côte avec leurs dots colorés respectifs. */
.mcfr-cf-card__source-badges {
    position: absolute;
    top: -12px;
    left: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}
.mcfr-cf-card__source-badges .mcfr-cf-card__source-badge {
    position: static;
    top: auto;
    left: auto;
}
/* Les variantes --cf / --mr ne portent plus que la couleur du dot.
   Bordure et texte du badge restent neutres (hérités du sélecteur de base). */
.mcfr-cf-card__source-badge--cf .mcfr-cf-card__source-dot { background: #f16436; }
.mcfr-cf-card__source-badge--mr .mcfr-cf-card__source-dot { background: #1bd96a; }
.mcfr-cf-card__source-plus {
    font-family: inherit;
    font-size: 18px;
    color: #555;
    line-height: 1;
}

/* CTA double : 2 boutons cote à cote */
.mcfr-cf-card__cta--dual {
    display: flex;
    gap: 12px;
    margin-top: auto;
}
.mcfr-cf-card__cta--dual .mcfr-cf-card__btn {
    flex: 1 1 50%;
}
.mcfr-cf-card__btn--cf,
.mcfr-cf-card__btn--mr {
    background: var(--mcfr-action);
    color: #fff;
    border: 2px solid var(--mcfr-cta-outline);
}
.mcfr-cf-card__btn--cf:hover,
.mcfr-cf-card__btn--cf:focus,
.mcfr-cf-card__btn--mr:hover,
.mcfr-cf-card__btn--mr:focus {
    background: var(--mcfr-action);
    filter: brightness(0.95);
    color: #fff;
    text-decoration: none;
}

.mcfr-cf-card__cta-tagline {
    margin: 4px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--mcfr-text-muted);
    font-style: italic;
}

@media (max-width: 599px) {
    .mcfr-cf-card__source-badges {
        gap: 4px;
        font-size: 11px;
    }
    .mcfr-cf-card__cta--dual {
        flex-direction: column;
    }
}

/* ===== Mode compact dans le pair (desktop, espace réduit) ===== */
@media (min-width: 1100px) {
    .mcfr-cf-cards-pair .mcfr-cf-card__title { font-size: 19px; }
    .mcfr-cf-cards-pair .mcfr-cf-card__stat-value { font-size: 19px; }
    .mcfr-cf-cards-pair .mcfr-cf-card__btn { font-size: 15px; }
}

/* ===== Mobile (< 600 px) — version 360 px ===== */
@media (max-width: 599px) {
    .mcfr-cf-card {
        padding: 20px 16px 16px;
        margin: 28px 0 20px;
        min-height: 0;
    }

    .mcfr-cf-card__header {
        gap: 12px;
    }

    .mcfr-cf-card__logo {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
    }

    .mcfr-cf-card__title {
        font-size: 20px;
        white-space: normal;
        line-height: 1.15;
    }

    .mcfr-cf-card__subline {
        gap: 6px;
    }

    /* Stats : 3 colonnes (DL · MAJ · TAILLE) — sur mobile on stacke
       l'icône au-dessus du texte pour libérer toute la largeur de
       la colonne et éviter les ellipsis. */
    .mcfr-cf-card__stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .mcfr-cf-card__stat-value {
        flex-direction: column;
        gap: 4px;
        font-size: 17px;
        text-align: center;
        justify-content: center;
    }
    .mcfr-cf-card__stat-icon {
        width: 28px;
        height: 28px;
    }

    /* Masquer la 4e+ version MC sur mobile (gardées dans le DOM pour le SEO) */
    .mcfr-cf-card__badge--hide-mobile {
        display: none;
    }

    /* Badges en scroll horizontal */
    .mcfr-cf-card__compat {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    /* Versions MC + loaders : wrap multi-ligne plutôt que scroll
       horizontal (qui débordait visuellement de la carte). */
    .mcfr-cf-card__compat-row {
        flex-wrap: wrap;
        overflow: visible;
        row-gap: 6px;
    }
    .mcfr-cf-card__compat-row + .mcfr-cf-card__compat-row {
        border-left: none;
        padding-left: 0;
    }

    .mcfr-cf-card__cta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .mcfr-cf-card__btn {
        width: 100%;
    }
    .mcfr-cf-card__cta-secondary {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Lien guide installation par type ===== */
.mcfr-cf-card__guide {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--mcfr-text-muted);
    line-height: 1.45;
    text-align: center;
}
.mcfr-cf-card__guide a {
    color: var(--mcfr-text);
    text-decoration: underline;
}
.mcfr-cf-card__guide a:hover {
    color: var(--mcfr-action);
}

/* ===== Loaders linkés (Forge / NeoForge / Fabric) ===== */
a.mcfr-cf-card__badge--loader {
    text-decoration: none;
    cursor: pointer;
}
a.mcfr-cf-card__badge--loader:hover {
    filter: brightness(0.95);
}

/* ===== Override des liens hérités du thème (minecraft.fr force `a { color: green }`) ===== */
/* Boutons CTA : texte blanc forcé sur fond coloré, peu importe la couleur de lien du thème */
.mcfr-cf-card a.mcfr-cf-card__btn,
.mcfr-cf-card a.mcfr-cf-card__btn:hover,
.mcfr-cf-card a.mcfr-cf-card__btn:focus,
.mcfr-cf-card a.mcfr-cf-card__btn:visited,
.mcfr-cf-card a.mcfr-cf-card__btn:active {
    color: #fff;
    text-decoration: none;
}

/* Lien secondaire « ↗ Modrinth » : couleur source dark */
.mcfr-cf-card a.mcfr-cf-card__link,
.mcfr-cf-card a.mcfr-cf-card__link:visited {
    color: var(--mcfr-color-dark);
}

/* Lien guide en bas de carte : même couleur source dark */
.mcfr-cf-card .mcfr-cf-card__guide a,
.mcfr-cf-card .mcfr-cf-card__guide a:visited {
    color: var(--mcfr-color-dark);
}

/* Loaders linkés : on garde la couleur du badge (texte coloré sur fond clair) */
.mcfr-cf-card a.mcfr-cf-card__badge--loader,
.mcfr-cf-card a.mcfr-cf-card__badge--loader:visited {
    color: inherit;
}

/* ===== Icônes SVG (stats + CTA) — pixel-art rendering ===== */
.mcfr-cf-card__stat-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    image-rendering: pixelated;
}

/* ===== Popover « sous-versions / extras » ===== */
.mcfr-cf-card__popover {
    position: absolute;
    z-index: 20;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    padding: 12px 14px;
    min-width: 180px;
    max-width: 280px;
    font-family: inherit;
    color: #1f2937;
}
.mcfr-cf-card__popover[hidden] { display: none; }

.mcfr-cf-card__popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ece8d8;
    gap: 8px;
}
.mcfr-cf-card__popover-title {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}
.mcfr-cf-card__popover-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #6b6960;
    padding: 0 4px;
}
.mcfr-cf-card__popover-close:hover { color: #1f2937; }

.mcfr-cf-card__popover-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}
.mcfr-cf-card__popover-list li { margin: 0; padding: 0; }
.mcfr-cf-card__popover-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    color: #1f2937;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.mcfr-cf-card__popover-list a:hover,
.mcfr-cf-card__popover-list a:focus-visible {
    background: #efece2;
    outline: none;
}
.mcfr-cf-card__popover-list a::after {
    content: '\2197';
    color: #8a8780;
    font-size: 11px;
    margin-left: 8px;
}

@media (max-width: 599px) {
    .mcfr-cf-card__popover {
        position: fixed;
        bottom: 16px;
        top: auto !important;
        left: 8px !important;
        right: 8px;
        max-width: none;
    }
    .mcfr-cf-card__popover-list {
        max-height: 50vh;
    }
}
