:root {
    --gp-orange: #eb6029;
    --gp-orange-dark: #c84d1d;
    --gp-bg-card: rgba(255,255,255,.06);
    --gp-bg-card-2: rgba(255,255,255,.04);
    --gp-border: rgba(255,255,255,.10);
    --gp-border-2: rgba(255,255,255,.14);
    --gp-text: rgba(255,255,255,.95);
    --gp-text-soft: rgba(255,255,255,.70);
    --gp-dark: #091113;
    --gp-dark-2: #0d1719;
    --gp-light-panel: #cfdcdb;
    --gp-light-text: #0f2326;
    --gp-radius-lg: 22px;
    --gp-radius-md: 16px;
    --gp-radius-sm: 12px;
    --gp-topbar-h: 72px;
    --shadow-soft: 0 14px 36px rgba(0,0,0,.22);
    --shadow-strong: 0 24px 60px rgba(0,0,0,.35);
}

/* =========================
   PAGE
   ========================= */
.defisPage {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 0;
}

.defCard,
.defHero {
    width: 100%;
    box-sizing: border-box;
}

/* =========================
   HERO
   ========================= */
.defHero {
    border-radius: 20px;
    border: 1px solid var(--gp-border);
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
    box-shadow: var(--shadow-soft);
    padding: 10px;
    position: relative;
    overflow: hidden;
}

    .defHero::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(260px 180px at 18% 8%, rgba(110,231,255,.10), transparent 60%), radial-gradient(220px 160px at 100% 0%, rgba(235,96,41,.08), transparent 60%);
    }

.defHeroTop {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 12px;
    align-items: center;
}

.defHeroHeadText {
    min-width: 0;
}

.defHeroKpi__value {
    font-family: "Black Ops One", system-ui, sans-serif;
    font-size: clamp(32px, 8vw, 44px);
    line-height: .95;
    color: var(--gp-orange);
    letter-spacing: .4px;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.defHeroPhoto {
    width: 96px;
    height: 108px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--gp-border);
    background: radial-gradient(120px 120px at 50% 35%, rgba(255,255,255,.10), transparent 65%), linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    display: grid;
    place-items: center;
    justify-self: end;
}

.defHeroPhotoImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: drop-shadow(0 16px 28px rgba(0,0,0,.26));
    user-select: none;
    pointer-events: none;
}

.defHeroPhotoPlaceholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.35);
}
.defHeroPhotoPlaceholder svg {
    width: 52px;
    height: 52px;
}

/* =========================
   PROGRESSION
   ========================= */
.prog {
    width: min(100%, 220px);
}

/* Barre de progression déplacée juste au-dessus des défis : pleine largeur. */
.prog--challenges {
    width: 100%;
    margin: 4px 0 12px;
    padding: 0.3em;
}

/* Toggle segmenté « Stats globales / Stats par match ». */
.defStatToggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-top: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.defStatToggle__btn {
    flex: 1 1 0;
    padding: 9px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255,255,255,.72);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.defStatToggle__btn.is-active {
    background: linear-gradient(90deg, var(--gp-orange-dark), var(--gp-orange));
    color: #fff;
}

.prog__label {
    font-family: "Antonio", system-ui, sans-serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.1;
    color: rgba(255,255,255,.86);
    margin-bottom: 6px;
}

.prog__bar {
    position: relative;
    height: 18px;
    border-radius: 999px;
    background: #081113;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
    overflow: hidden;
}

.prog__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gp-orange-dark), var(--gp-orange));
    border-radius: 999px;
    transition: width .3s ease;
}

.prog__badge {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #111;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0,0,0,.16);
}

/* =========================
   BOUTON "STATS PAR MATCH"
   ========================= */
.defMatchBtn {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    align-items: center;
    text-align: left;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    border: 1px solid rgba(235,96,41,.32);
    background: linear-gradient(135deg, rgba(235,96,41,.18), rgba(0,0,0,.22));
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    touch-action: manipulation;
    transition: background .15s, border-color .15s, transform .1s;
}

.defMatchBtn:active {
    transform: scale(.992);
    background: linear-gradient(135deg, rgba(235,96,41,.26), rgba(0,0,0,.24));
}

.defMatchBtn__ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(235,96,41,.30), rgba(0,0,0,.26));
    border: 1px solid rgba(235,96,41,.34);
}

.defMatchBtn__ico .ico {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.defMatchBtn__txt {
    min-width: 0;
}

.defMatchBtn__title {
    display: block;
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .2px;
    color: rgba(255,255,255,.97);
}

.defMatchBtn__sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.62);
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.defMatchBtn__arrow {
    font-size: 20px;
    font-weight: 300;
    color: rgba(235,96,41,.7);
    line-height: 1;
}

.defMatchBtn.is-open {
    border-color: rgba(235,96,41,.55);
    background: linear-gradient(135deg, rgba(235,96,41,.26), rgba(0,0,0,.24));
}

/* Liste déroulante "stats par match" */
.defMatchPicker {
    position: relative;
    z-index: 60;            /* au-dessus de .statGrid (z-index:1) sinon la liste est cliquée à travers */
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.defMatchSelect {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.30);
    color: var(--gp-text, rgba(255,255,255,.95));
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23eb6029' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.defMatchSelect:focus {
    outline: none;
    border-color: rgba(235,96,41,.55);
}

.defMatchPickerMsg {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    line-height: 1.45;
    padding: 4px 2px;
}

.defMatchPickerCaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255,255,255,.72);
    padding: 0 2px;
}

.defMatchPickerScore {
    color: var(--gp-orange, #eb6029);
    white-space: nowrap;
}

/* Placeholder de chargement du sélecteur "Stats par match" (évite le flash "Aucun match"). */
.defMatchSkeleton {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(90deg,
        rgba(255,255,255,.05) 25%,
        rgba(255,255,255,.12) 37%,
        rgba(255,255,255,.05) 63%);
    background-size: 400% 100%;
    animation: defMatchShimmer 1.2s ease-in-out infinite;
}

@keyframes defMatchShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* ── Dropdown custom "Stats par match" (remplace le <select> natif moche) ── */
.defMatchDD { position: relative; width: 100%; }

.defMatchDD__btn {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.30);
    color: rgba(255,255,255,.95);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.defMatchDD__btn:active { transform: scale(.997); }

.defMatchDD__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.defMatchDD__chev {
    flex: 0 0 auto;
    color: var(--gp-orange, #eb6029);
    font-size: 12px;
    transition: transform .15s ease;
}
.defMatchDD.is-open .defMatchDD__chev { transform: rotate(180deg); }

.defMatchDD__scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: transparent;
}

.defMatchDD__list {
    position: absolute;
    z-index: 41;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #0e1719;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    overflow: hidden auto;
    max-height: 264px;
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
}

.defMatchDD__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    background: transparent;
    color: rgba(255,255,255,.85);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    /* libellé court (« vs ADVERSAIRE · date ») : on autorise le retour à la ligne
       pour les adversaires aux noms longs plutôt que de tronquer. */
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
}
.defMatchDD__item:last-child { border-bottom: 0; }
.defMatchDD__item:hover { background: rgba(255,255,255,.06); }
.defMatchDD__item.is-sel {
    background: linear-gradient(90deg, var(--gp-orange-dark, #c44a1f), var(--gp-orange, #eb6029));
    color: #fff;
    font-weight: 800;
}

/* =========================
   STATS
   ========================= */
.statGrid {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

/* Animation d'apparition des tuiles à chaque changement de mode / de match.
   Déclenchée via @key sur .statGrid (Blazor recrée le bloc → l'anim se rejoue).
   Cascade : chaque tuile entre légèrement après la précédente. */
.statGrid--anim .statTile {
    animation: statTileIn .34s cubic-bezier(.22,.61,.36,1) both;
}
.statGrid--anim .statTile:nth-child(1) { animation-delay: 0ms; }
.statGrid--anim .statTile:nth-child(2) { animation-delay: 45ms; }
.statGrid--anim .statTile:nth-child(3) { animation-delay: 90ms; }
.statGrid--anim .statTile:nth-child(4) { animation-delay: 135ms; }
.statGrid--anim .statTile:nth-child(5) { animation-delay: 180ms; }
.statGrid--anim .statTile:nth-child(6) { animation-delay: 225ms; }

@keyframes statTileIn {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* La valeur chiffrée "pulse" légèrement quand elle change. */
.statGrid--anim .statTileVal {
    animation: statValPop .42s ease both;
}
@keyframes statValPop {
    0%   { transform: scale(.82); opacity: .4; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .statGrid--anim .statTile,
    .statGrid--anim .statTileVal { animation: none; }
}

.statTile {
    min-width: 0;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--gp-border);
    background: rgba(0,0,0,.22);
    overflow: hidden;
}

.statTileTop {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.statTileTitle {
    min-width: 0;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--gp-text);
    letter-spacing: .2px;
}

.statTileLine {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

    .statTileLine + .statTileLine {
        margin-top: 6px;
    }

.statTileVal {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    color: var(--gp-text);
    white-space: nowrap;
}

.statTileSub {
    font-size: 11px;
    font-weight: 800;
    color: var(--gp-text-soft);
    white-space: nowrap;
}

.statTile.is-score {
    background: rgba(255,70,70,.14);
    border-color: rgba(255,70,70,.18);
}

.statTile.is-3pt {
    background: rgba(110,231,255,.12);
    border-color: rgba(110,231,255,.18);
}

.statTile.is-ft {
    background: rgba(255,211,110,.12);
    border-color: rgba(255,211,110,.18);
}

.statTile.is-lf {
    background: rgba(235,96,41,.12);
    border-color: rgba(235,96,41,.18);
}

.statTile.is-time {
    background: rgba(255,160,70,.12);
    border-color: rgba(255,160,70,.18);
}

.statTile.is-foul {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.10);
}

.ico {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    filter: brightness(0) invert(1) drop-shadow(0 6px 14px rgba(0,0,0,.2));
}

/* =========================
   LISTE CATÉGORIES
   ========================= */

.defCard {
    border-radius: 20px;
    padding-top: 12px;
    height: auto;
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.badgeList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px 4px 10px;
    /* pas de max-height ni overflow : scroll naturel de la page */
}

.badgeRow {
    width: 100%;
    border: 1px solid rgba(255,255,255,.11);
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
    box-shadow: 0 3px 12px rgba(0,0,0,.22);
    border-radius: 16px;
    padding: 9px 10px 9px 10px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 46px 18px;
    gap: 10px;
    align-items: center;
    text-align: left;
    position: relative;
    overflow: hidden;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
    cursor: pointer;
    box-sizing: border-box;
    touch-action: manipulation;
    min-height: 56px;
    transition: background .15s, border-color .15s, transform .1s;
}

.badgeRow::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(200px 100px at 0% 0%, rgba(110,231,255,.06), transparent 55%);
}

.badgeRow:active {
    transform: scale(.992);
    background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
}

.badgeRowIco {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(235,96,41,.20), rgba(0,0,0,.28));
    border: 1px solid rgba(235,96,41,.28);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(235,96,41,.12);
    flex-shrink: 0;
}

.badgeRowIco .ico {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    filter: brightness(0) invert(1) drop-shadow(0 2px 5px rgba(235,96,41,.45));
}

.badgeRowBody {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.badgeRowTitle {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    color: rgba(255,255,255,.97);
    text-transform: uppercase;
    letter-spacing: .15px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.badgeRowSubtitle {
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,.60);
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.badgeRowMeta {
    position: relative;
    z-index: 1;
    text-align: right;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.badgeRowChevron {
    font-size: 20px;
    font-weight: 300;
    color: rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
    line-height: 1;
    flex-shrink: 0;
}

.badgeRowCount {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    color: var(--gp-orange);
    white-space: nowrap;
}

.badgeRowCountTotal {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.35);
}

/* Earned : tout complété */
.badgeRow.is-earned {
    border-color: rgba(80,200,140,.22);
    background: linear-gradient(145deg, rgba(30,70,55,.85), rgba(20,50,40,.85));
}

.badgeRow.is-earned .badgeRowIco {
    background: linear-gradient(135deg, rgba(40,180,140,.28), rgba(0,0,0,.20));
    border-color: rgba(40,180,140,.38);
    box-shadow: 0 3px 10px rgba(40,180,140,.16);
}

.badgeRow.is-earned .badgeRowCount {
    color: #4ade80;
}

.badgeRow.is-earned .badgeRowChevron {
    color: rgba(80,200,140,.5);
}

.badgeRow.is-locked {
    opacity: 1;
}

/* =========================
   MODAL
   ========================= */
/* =========================
   ANIMATIONS
   ========================= */

/* 1. Overlay : fondu */
@keyframes gpOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* 2. Sheet : glisse du haut vers le bas (top → bottom) */
@keyframes gpSheetDrop {
    from { transform: translateY(-28px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* 3. Contenu : entre depuis la droite (navigation forward) */
@keyframes gpSlideInRight {
    from { transform: translateX(52px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* 4. Contenu : entre depuis la gauche (navigation back) */
@keyframes gpSlideInLeft {
    from { transform: translateX(-52px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

/* 5. Contenu : premier affichage, glisse de haut en bas */
@keyframes gpSlideInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ---- Application des keyframes ---- */
.gpModal {
    position: fixed;
    top: var(--gp-topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,.46);
    backdrop-filter: blur(3px);
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    animation: gpOverlayIn .18s ease both;
}

.gpModal__sheet {
    width: 100%;
    height: 100%;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-strong);
    max-width: 760px;
    margin: 0 auto;
    animation: gpSheetDrop .28s cubic-bezier(.22,.68,0,1.08) both;
}

/* ---- Wrapper de step animé ---- */
.gpStepWrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Premier affichage (ouverture modal) : glisse haut → bas */
.gpStepWrap--enter {
    animation: gpSlideInDown .24s cubic-bezier(.25,.46,.45,.94) both;
}

/* Navigation vers un sous-menu : entre par la droite */
.gpStepWrap--forward {
    animation: gpSlideInRight .22s cubic-bezier(.25,.46,.45,.94) both;
}

/* Retour : entre par la gauche */
.gpStepWrap--back {
    animation: gpSlideInLeft .22s cubic-bezier(.25,.46,.45,.94) both;
}

    .gpModal__sheet.is-step1 {
        background: var(--gp-light-panel);
        color: var(--gp-light-text);
    }

    .gpModal__sheet.is-step2,
    .gpModal__sheet.is-step3 {
        background: linear-gradient(180deg, #0b1416, #0a1214);
        color: rgba(255,255,255,.94);
    }

.gpModal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 8px;
    flex: 0 0 auto;
}

.gpModal__logo {
    font-weight: 900;
    letter-spacing: .3px;
}

.gpModal__x,
.gpBack {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    cursor: pointer;
    font-weight: 900;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.gpModal__sheet.is-step1 .gpModal__x,
.gpModal__sheet.is-step1 .gpBack {
    background: rgba(0,0,0,.06);
    color: var(--gp-light-text);
    border-color: rgba(15,35,38,.08);
}

.gpModal__sheet.is-step2 .gpModal__x,
.gpModal__sheet.is-step2 .gpBack,
.gpModal__sheet.is-step3 .gpModal__x,
.gpModal__sheet.is-step3 .gpBack {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.94);
    border-color: rgba(255,255,255,.10);
}

.gpModal__header {
    padding: 0 14px 6px;
    flex: 0 0 auto;
}

.gpModal__h1 {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: clamp(28px, 8vw, 42px);
    font-weight: 700;
    line-height: .95;
    text-transform: uppercase;
    color: var(--gp-orange);
    letter-spacing: .2px;
}

.gpModal__sub {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    opacity: .86;
}

.gpModal__row2 {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 14px 10px;
    flex: 0 0 auto;
}

.gpModal__row2Text {
    min-width: 0;
}

.gpModal__h2 {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
    color: rgba(255,255,255,.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gpModal__subLine {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.64);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gpModal__kpi {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: .95;
    color: var(--gp-orange);
    white-space: nowrap;
}

.gpModal__content {
    flex: 1 1 auto;
    min-height: 0;
}

.gpModal__content--scroll {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 14px 18px;
}

/* =========================
   MENUS INTERNES
   ========================= */
.gpMenuList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gpMenuBtn {
    width: 100%;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    background: rgba(0,0,0,.10);
    color: inherit;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    font-family: inherit;
    font-size: inherit;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

    .gpMenuBtn:active {
        transform: scale(.995);
    }

.gpModal__sheet.is-step1 .gpMenuBtn {
    background: rgba(15,35,38,.08);
    border-color: rgba(15,35,38,.08);
}

.gpModal__sheet.is-step2 .gpMenuBtn,
.gpModal__sheet.is-step3 .gpMenuBtn {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.10);
}

.gpMenuBtn__text {
    min-width: 0;
}

.gpMenuBtn__title {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: clamp(20px, 5.4vw, 28px);
    font-weight: 700;
    line-height: .95;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpMenuBtn__sub {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    opacity: .7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpMenuBtn__arrow {
    font-size: 28px;
    font-weight: 400;
    opacity: .7;
}

.gpMenuBtn__kpi {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--gp-orange);
    white-space: nowrap;
    text-align: right;
}

.gpMenuBtn__unit {
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--gp-text-soft);
    line-height: 1.2;
    margin-top: 2px;
}

/* Mini barre de progression dans la liste des scopes */
.gpScopePctBar {
    margin-top: 6px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    overflow: hidden;
}

.gpScopePctFill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gp-orange-dark), var(--gp-orange));
    transition: width .3s ease;
}

/* =========================
   NIVEAUX
   ========================= */
.gpLevels {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.gpLevelRow {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

    .gpLevelRow.is-todo {
        opacity: .42;
    }

.gpBallWrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpBall {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.22);
    background: transparent;
}

    .gpBall.is-on {
        background: var(--gp-orange);
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(235,96,41,.28);
    }

.gpLevelTxt {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: clamp(24px, 7vw, 34px);
    line-height: .95;
    font-weight: 700;
    letter-spacing: .2px;
    color: rgba(255,255,255,.96);
    word-break: break-word;
}

/* =========================
   TABLET / LARGE MOBILE
   ========================= */
@media (min-width: 420px) {
    .defHeroTop {
        grid-template-columns: minmax(0, 1fr) 110px;
    }

    .defHeroPhoto {
        width: 110px;
        height: 120px;
    }

    .statGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .badgeRow {
        grid-template-columns: 46px minmax(0,1fr) 50px 20px;
        min-height: 60px;
    }

    .badgeRowIco {
        width: 46px;
        height: 46px;
    }
}

@media (min-width: 620px) {
    .defisPage {
        gap: 14px;
    }

    .defHero {
        padding: 14px;
    }

    .defHeroTop {
        grid-template-columns: minmax(0, 1fr) 130px;
    }

    .defHeroPhoto {
        width: 130px;
        height: 140px;
    }

    .statGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gpModal {
        padding: 18px;
    }

    .gpModal__sheet {
        border-radius: 24px;
    }

    .gpModal__content--scroll {
        padding-left: 18px;
        padding-right: 18px;
        padding-bottom: 22px;
    }
}

/* =========================
   PETITS ÉCRANS
   ========================= */
@media (max-width: 359px) {
    .badgeRow {
        grid-template-columns: 38px minmax(0,1fr) 42px 16px;
        gap: 7px;
        padding: 8px 8px 8px 8px;
        min-height: 50px;
    }

    .badgeRowIco {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .badgeRowCount {
        font-size: 16px;
    }

    .badgeRowCountTotal {
        font-size: 11px;
    }

    .badgeRowChevron {
        font-size: 17px;
    }

    .badgeRowTitle {
        font-size: 17px;
    }

    .badgeRowSubtitle {
        font-size: 11px;
    }

    .gpMenuBtn,
    .gpLevelRow {
        gap: 10px;
    }

    .gpModal__row2 {
        gap: 8px;
    }
}

/* =========================
   XP BADGES (paliers défis)
   ========================= */
.gpLevelXp {
    margin-left: auto;
    flex-shrink: 0;
}

.gpXpBadge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 99px;
    white-space: nowrap;
    letter-spacing: .02em;
}

.gpXpBadge--claimed {
    background: rgba(80, 200, 80, .15);
    color: #5cd65c;
    border: 1px solid rgba(80, 200, 80, .35);
}

.gpXpBadge--pending {
    background: rgba(235, 96, 41, .15);
    color: var(--gp-orange, #eb6029);
    border: 1px solid rgba(235, 96, 41, .35);
}

.gpXpBadge--locked {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .35);
    border: 1px solid rgba(255, 255, 255, .1);
}

/* =========================
   HERO TITLE ROW + INFO BTN
   ========================= */
.defHeroTitleRow {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 10px;
}

.defHeroKpi__value {
    margin-bottom: 0 !important;
}

.defInfoBtn {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    align-self: center;
    margin-top: 4px;
    transition: background .15s, border-color .15s;
}

.defInfoBtn:active {
    background: rgba(235,96,41,.25);
    border-color: rgba(235,96,41,.5);
}

/* =========================
   SNACKBAR DÉFIS
   ========================= */
/* Fenêtre d'info centrale (remplace l'ancienne snackbar du bas).
   Overlay sombre plein écran + carte centrée ; reste jusqu'à fermeture. */
.defInfoOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: defInfoFade .18s ease;
}

.defInfoCard {
    position: relative;
    background: rgba(20, 26, 28, 0.98);
    color: rgba(255,255,255,.92);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.5;
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(235, 96, 41, .45);
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
    max-width: min(92vw, 380px);
    width: 100%;
    text-align: left;
    animation: defInfoPop .22s cubic-bezier(.22,.68,0,1.08) both;
}

.defSnackText {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    display: block;
    padding-right: 1.75rem;
}

.defSnackClose {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.65);
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    margin-top: 1px;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.defSnackClose:active {
    background: rgba(235,96,41,.30);
    color: #fff;
}

/* Dans la fenêtre centrale, le ✕ est ancré en haut à droite de la carte. */
.defInfoCard .defSnackClose {
    position: absolute;
    top: .6rem;
    right: .6rem;
    margin-top: 0;
}

@keyframes defInfoFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes defInfoPop {
    from { opacity: 0; transform: scale(.92) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================
   MODALE STATS PAR MATCH
   ========================= */
.mhSheet {
    background: linear-gradient(180deg, #0b1416, #0a1214);
    color: rgba(255,255,255,.94);
    animation: gpSheetDrop .28s cubic-bezier(.22,.68,0,1.08) both;
}

.mhSheet .gpModal__logo {
    font-family: "Black Ops One", system-ui, sans-serif;
    color: var(--gp-orange);
    letter-spacing: .3px;
}

.mhEmpty {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: rgba(255,255,255,.62);
    padding: 24px 18px;
}

.mhList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mhCard {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    padding: 12px;
}

.mhCardHead {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.mhResult {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-family: "Black Ops One", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1;
    border: 1px solid rgba(255,255,255,.12);
}

.mhResult.is-win {
    background: rgba(40,180,140,.20);
    border-color: rgba(40,180,140,.40);
    color: #4ade80;
}

.mhResult.is-loss {
    background: rgba(255,70,70,.16);
    border-color: rgba(255,70,70,.34);
    color: #ff8a8a;
}

.mhResult.is-draw {
    background: rgba(255,211,110,.16);
    border-color: rgba(255,211,110,.34);
    color: #ffd36e;
}

.mhResult.is-none {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.45);
}

.mhCardOpp {
    min-width: 0;
}

.mhOppName {
    font-family: "Antonio", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: .15px;
    color: rgba(255,255,255,.96);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mhScore {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,.68);
}

.mhDate {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
}

.mhStats {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.mhStat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px;
    border-radius: 10px;
    background: rgba(0,0,0,.24);
    border: 1px solid rgba(255,255,255,.07);
}

.mhStat--gm {
    background: rgba(235,96,41,.16);
    border-color: rgba(235,96,41,.30);
}

.mhStatVal {
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,.96);
}

.mhStat--gm .mhStatVal {
    color: var(--gp-orange);
}

.mhStatLbl {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .3px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    white-space: nowrap;
}

.mhQt {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.mhQtLbl {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}

.mhQtVals {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255,255,255,.84);
    letter-spacing: .5px;
}

/* 7 colonnes serrées sur petits écrans → 4 colonnes */
@media (max-width: 400px) {
    .mhStats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

