:root {
    --bg: #0B1020;
    --panel: #131A2E;
    --panel-soft: #18213A;
    --panel-border: rgba(255,255,255,.08);
    --text: #F8FAFC;
    --muted: #94A3B8;
    --blue: #3B82F6;
    --green: #22C55E;
    --orange: #F59E0B;
    --red: #EF4444;
    --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.22), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(34,197,94,.10), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.mh-app {
    min-height: 100vh;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.mh-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mh-switch-discipline {
    min-width: 64px;
    height: 40px;
    padding: 0 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--panel-border);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.035),
        0 8px 20px rgba(0,0,0,.18);
}

.mh-switch-discipline:active {
    transform: translateY(1px);
}

.mh-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mh-logo {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), #7C3AED);
    font-weight: 900;
    letter-spacing: -.06em;
    box-shadow: 0 12px 30px rgba(59,130,246,.28);
}

.mh-title { font-weight: 850; font-size: 18px; letter-spacing: -.03em; }
.mh-subtitle { color: var(--muted); font-size: 11px; margin-top: 1px; }

.mh-menu {
    width: 42px;
    height: 42px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    color: var(--text);
    font-size: 20px;
}

.mh-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border-radius: 18px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--panel-border);
}

.mh-tab {
    text-align: center;
    padding: 12px 0;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .08em;
    font-size: 13px;
}

.mh-tab.is-active {
    color: var(--text);
    background: var(--panel-soft);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.mh-datebar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mh-date-pill,
.mh-calendar select {
    border: 1px solid var(--panel-border);
    background: rgba(19,26,46,.82);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.mh-date-pill.is-disabled { opacity: .4; }

.mh-calendar select {
    appearance: none;
    padding-right: 28px;
}

.mh-main {
    flex: 1;
    min-height: 0;
}

.mh-course-stage {
    position: relative;
    min-height: calc(100vh - 190px);
}

.mh-carousel {
    position: relative;
    min-height: calc(100vh - 190px);
    overflow: hidden;
}

.mh-card,
.mh-status-card {
    min-height: calc(100vh - 190px);
    border-radius: 30px;
    padding: 22px;
    background: linear-gradient(180deg, rgba(19,26,46,.98), rgba(14,20,38,.98));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.mh-card {
    display: none;
    flex-direction: column;
    gap: 18px;
}

.mh-card.is-active { display: flex; }

.mh-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.mh-course-label {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mh-card h1,
.mh-mixer h2,
.mh-status-card h1 {
    margin: 6px 0 0;
    font-size: clamp(22px, 7vw, 34px);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.mh-playability {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: rgba(255,255,255,.08);
}

.play-good, .play-value { color: var(--green); }
.play-playable, .play-observe { color: #FDE68A; }
.play-risk { color: var(--orange); }
.play-nobet { color: var(--red); }

.mh-section {
    padding-top: 16px;
    border-top: 1px solid var(--panel-border);
}

.mh-section h2 {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.mh-horse-list {
    display: grid;
    gap: 9px;
}

.mh-horse {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 15px;
    background: rgba(255,255,255,.045);
    font-size: 15px;
    font-weight: 720;
}

.mh-horse-list.is-muted .mh-horse {
    color: #CBD5E1;
    background: rgba(255,255,255,.028);
}

.mh-number {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(59,130,246,.18);
    color: #BFDBFE;
    font-weight: 900;
}

.mh-horse.is-hit,
.mh-arrival-row.is-selected {
    outline: 1px solid rgba(34,197,94,.55);
}

.mh-horse.is-winner .mh-number,
.mh-arrival-row.is-winner .mh-number {
    color: var(--green);
}

.mh-arrival {
    display: grid;
    gap: 7px;
}

.mh-arrival-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 13px;
    color: #CBD5E1;
    background: rgba(255,255,255,.028);
    font-size: 13px;
}

.mh-arrival-row .mh-number {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 10px;
}

.mh-empty {
    margin: 0;
    color: var(--muted);
}

.mh-nav-arrows {
    position: absolute;
    right: 12px;
    bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(11,16,32,.82);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(14px);
}

.mh-nav-arrows button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 900;
}

.mh-nav-arrows span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.mh-status-card {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(59,130,246,.95), rgba(37,99,235,.75));
}

.mh-status-card p {
    max-width: 28rem;
    color: rgba(255,255,255,.82);
}

.mh-status-orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    box-shadow: 0 0 80px rgba(255,255,255,.28);
    margin-bottom: 14px;
}

.mh-floating-mix {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 30;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    background: var(--blue);
    color: white;
    font-weight: 900;
    box-shadow: 0 18px 50px rgba(59,130,246,.35);
}

.mh-mixer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    border-radius: 28px;
    padding: 20px;
    background: rgba(19,26,46,.96);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    transform: translateY(calc(100% + 24px));
    transition: transform .28s ease;
    backdrop-filter: blur(18px);
}

.mh-mixer.is-open { transform: translateY(0); }

.mh-mixer-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.mh-mixer-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.mh-mixer h2 {
    font-size: 24px;
}

.mh-close-sheet {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    font-size: 22px;
}

.mh-slider-group {
    display: grid;
    gap: 10px;
}

.mh-slider {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 46px;
    align-items: center;
    column-gap: 8px;
    margin: 0;
    color: #CBD5E1;
    font-size: 13px;
    font-weight: 750;
}

.mh-slider span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
}

.mh-slider b {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 24px;
    padding: 0;

    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.35);

    color: var(--muted);
    background: rgba(148,163,184,.06);

    font-size: 11px;
    font-weight: 900;

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.mh-slider b.is-positive {
    border-color: rgba(34,197,94,.65);
    color: #86efac;
    background: rgba(34,197,94,.08);
}

.mh-slider b.is-negative {
    border-color: rgba(245,158,11,.70);
    color: #fbbf24;
    background: rgba(245,158,11,.09);
}

.mh-slider b.is-neutral {
    border-color: rgba(148,163,184,.35);
    color: var(--muted);
    background: rgba(148,163,184,.06);
}

.mh-slider input {
    width: 100%;
    min-width: 0;
    margin: 0;
    height: 2px !important;
    accent-color: var(--blue);
}

.mh-save {
    display: block;
    width: min(240px, 100%);
    margin: 16px auto 0;
    border: 0;
    border-radius: 15px;
    padding: 12px 14px;
    background: var(--blue);
    color: white;
    font-weight: 900;
}

@media (min-width: 760px) {
    .mh-app {
        max-width: 1180px;
        margin: 0 auto;
        padding: 22px;
    }

    .mh-main {
        display: grid;
        grid-template-columns: 330px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }

    .mh-mixer {
        position: sticky;
        top: 18px;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        min-height: calc(100vh - 190px);
        display: flex;
        flex-direction: column;
        padding: 18px;
    }

    .mh-mixer-header {
        margin-bottom: 12px;
    }

    .mh-mixer h2 {
        margin-top: 4px;
        font-size: 22px;
    }

    .mh-slider-group {
        gap: 9px;
    }

    .mh-close-sheet,
    .mh-floating-mix { display: none; }

    .mh-course-stage,
    .mh-carousel,
    .mh-card,
    .mh-status-card {
        min-height: calc(100vh - 190px);
    }
}

@media (min-width: 1024px) {
    .mh-app {
        padding-top: 28px;
    }

    .mh-tabs {
        max-width: 360px;
    }

    .mh-card,
    .mh-status-card {
        padding: 26px;
    }

    .mh-card {
        gap: 14px;
    }

    .mh-section {
        padding-top: 12px;
    }

    .mh-section h2 {
        margin-bottom: 9px;
    }

    .mh-horse-list {
        gap: 7px;
    }

    .mh-horse {
        min-height: 34px;
        padding: 7px 9px;
    }
}

.mh-arrival-row {
    padding: 6px 8px;
    font-size: 12px;
}

.mh-empty {
    font-size: 12px;
    margin: 0;
}
.mh-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mh-selection-col {
    margin-top: 0;
}

.mh-selection-col h2 {
    font-size: 10px;
    margin-bottom: 7px;
}

.mh-selection-col .mh-horse {
    min-height: 28px;
    padding: 6px 7px;
    font-size: 12px;
    gap: 6px;
}

.mh-selection-col .mh-number {
    width: 22px;
    height: 22px;
    font-size: 10px;
    border-radius: 8px;
}



/* =========================
   MOBILE CARD FIT
========================= */

@media (max-width: 720px) {

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    .mh-app {
        width: 100%;
        max-width: 100%;
        padding-left: 8px;
        padding-right: 8px;
        overflow-x: hidden;
    }

    .mh-header,
    .mh-datebar,
    .mh-main,
    .mh-course-stage,
    .mh-carousel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .mh-card,
    .mh-status-card {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 24px;
        padding-left: 10px;
        padding-right: 10px;
        overflow: hidden;
    }

    .mh-selection-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px;
    }

    .mh-selection-col,
    .mh-selection-col .mh-horse-list,
    .mh-selection-col .mh-horse {
        min-width: 0;
    }

    .mh-selection-col .mh-horse {
        padding: 5px 6px;
        gap: 5px;
        font-size: 11px;
    }

    .mh-selection-col .mh-horse span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mh-selection-col .mh-number {
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}


/* =========================
   MOBILE MIXER
========================= */

@media (max-width: 720px) {

    .mh-main {
        display: block;
    }

    .mh-course-stage {
        min-height: auto;
        height: auto;
        padding-top: 70px;
    }

    .mh-card {
        min-height: unset;
        height: auto;
        justify-content: flex-start;
        gap: 12px;
        padding: 16px;
        padding-bottom: 62px;
    }

    .mh-card-top h1 {
        font-size: 18px;
    }

    .mh-mixer {
        position: fixed;

        left: 0 !important;
        right: 0 !important;

        top: 2px !important;
        bottom: auto !important;

        border-radius: 0 0 22px 22px;

        padding: 10px 14px 4px !important;

        max-height: 41vh !important;
        overflow-y: auto;

        z-index: 50;

        transform: translateY(-130%) !important;
        transition: transform .25s ease;

        background: rgba(19,26,46,.98);
    }

    .mh-mixer.is-open {
        transform: translateY(0) !important;
    }

    .mh-mixer-kicker {
        display: none;
    }

    .mh-mixer h2 {
        margin: 0;
        font-size: 12px;
        line-height: 1.15;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .mh-mixer-header {
        margin-bottom: 8px;
        align-items: center;
    }

    .mh-close-sheet {
        display: block;

        width: 26px;
        height: 26px;

        font-size: 18px;
    }

    .mh-slider-group {
        gap: 8px;
    }

    .mh-slider {
        display: grid;

        /* Libellé compact + slider large + valeur courte à droite */
        grid-template-columns: 92px minmax(150px, 1fr) 46px;

        align-items: center;

        column-gap: 8px;

        margin: 0;

        font-size: 13px;

        color: #CBD5E1;
    }

    .mh-slider span {
        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;

        font-size: 13px;

        font-weight: 700;
    }

    .mh-slider b {
        display: inline-flex;

        align-items: center;
        justify-content: center;

        width: 46px;
        min-width: 46px;
        max-width: 46px;

        height: 24px;

        padding: 0;

        border-radius: 8px;

        font-size: 11px;
        font-weight: 900;

        transition:
            background .18s ease,
            border-color .18s ease,
            color .18s ease;

        border: 1px solid rgba(148,163,184,.35);

        color: var(--muted);

        background: rgba(148,163,184,.06);
    }

    .mh-slider b.is-positive {
        border-color: rgba(34,197,94,.65);

        color: #86efac;

        background: rgba(34,197,94,.08);
    }

    .mh-slider b.is-negative {
        border-color: rgba(245,158,11,.70);

        color: #fbbf24;

        background: rgba(245,158,11,.09);
    }

    .mh-slider b.is-neutral {
        border-color: rgba(148,163,184,.35);

        color: var(--muted);

        background: rgba(148,163,184,.06);
    }

    .mh-slider input {
        width: 100%;

        min-width: 0;

        margin: 0;

        height: 2px !important;
    }

    .mh-save {
        margin-top: 12px;
        margin-bottom: 0;

        padding: 9px 12px;

        border-radius: 13px;

        font-size: 12px;
    }

    .mh-floating-mix {
        display: flex;
    }

    .mh-nav-arrows {
        bottom: 5px;
    }

    .mh-carousel {
        min-height: auto !important;
        height: auto !important;
    }

    .mh-results {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

.mh-brand-logo {
    height: 140px;
    width: auto;
    display: block;
}

@media (max-width: 720px) {
    .mh-brand-logo {
        height: 120px;
    }
}


/* =========================
   PREMIUM DATE PICKER
========================= */

.mh-date-picker {
    position: relative;
}

.mh-calendar-button {
    min-width: 110px;
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,.055);
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.035),
        0 8px 20px rgba(0,0,0,.18);
}

.mh-calendar-current-date {
    color: #BFDBFE;
    letter-spacing: .03em;
}

.mh-calendar-button:active {
    transform: translateY(1px);
}

.mh-calendar-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(330px, calc(100vw - 16px));
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--panel-border);
    background: rgba(19,26,46,.98);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    z-index: 80;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(.98);
    transition: opacity .18s ease, transform .18s ease;
}

.mh-date-picker.is-open .mh-calendar-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.mh-calendar-head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mh-calendar-head strong {
    text-align: center;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mh-calendar-head button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: rgba(255,255,255,.045);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.mh-calendar-weekdays,
.mh-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.mh-calendar-weekdays {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: center;
}

.mh-calendar-day {
    height: 34px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: rgba(248,250,252,.38);
    font-size: 12px;
    font-weight: 800;
}

.mh-calendar-day.is-available {
    color: var(--text);
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.055);
}

.mh-calendar-day.is-selected {
    color: white;
    background: linear-gradient(135deg, var(--blue), #2563EB);
    box-shadow: 0 8px 22px rgba(59,130,246,.30);
}

.mh-calendar-day.is-empty {
    visibility: hidden;
}

@media (max-width: 720px) {
    .mh-calendar-panel {
        position: fixed;
        top: 76px;
        right: 8px;
        left: 8px;
        width: auto;
    }

    .mh-calendar-button {
        width: 40px;
        height: 40px;
    }
}


/* =========================
   MONEYHORSE COMMERCIAL V2 — JOUABILITÉ
========================= */

.mh-playability {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(255,255,255,.10);
}

.mh-playability strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mh-playability.play-premium {
    background: rgba(245,158,11,.15);
    border-color: rgba(245,158,11,.40);
    color: #FDE68A;
}

.mh-playability.play-favorable {
    background: rgba(34,197,94,.13);
    border-color: rgba(34,197,94,.34);
    color: #BBF7D0;
}

.mh-playability.play-jouable {
    background: rgba(59,130,246,.14);
    border-color: rgba(59,130,246,.35);
    color: #BFDBFE;
}

.mh-playability.play-observation {
    background: rgba(148,163,184,.12);
    border-color: rgba(148,163,184,.30);
    color: #E2E8F0;
}

.mh-playability.play-risque {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.30);
    color: #FDBA74;
}

.mh-playability.play-no_bet {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.34);
    color: #FCA5A5;
}

.mh-playability.is-locked,
.mh-playability-locked {
    color: #CBD5E1;
    background: rgba(148,163,184,.10);
    border-color: rgba(148,163,184,.22);
}


/* =========================
   ARRIVÉE COMMERCIALE — 2 COLONNES
   1er-4e à gauche, 5e-8e à droite
========================= */

.mh-arrival-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.mh-arrival-col {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.mh-arrival-two-cols .mh-arrival-row {
    min-width: 0;
}

.mh-arrival-two-cols .mh-arrival-row span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .mh-arrival-two-cols {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px;
    }

    .mh-arrival-col {
        gap: 6px;
    }

    .mh-arrival-two-cols .mh-arrival-row {
        padding-left: 6px;
        padding-right: 6px;
        gap: 6px;
    }
}


/* =========================
   MONEYHORSE COMMERCIAL COUNTERS
   Remplace visuellement les sliders par des compteurs premium
========================= */

.mh-counter-control {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 10px !important;
}

.mh-counter-control .mh-slider-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-slider-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mh-counter {
    display: grid;
    grid-template-columns: 34px minmax(64px, 1fr) 34px;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.mh-counter-button {
    width: 34px;
    height: 30px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.045);
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.025),
        0 8px 18px rgba(0,0,0,.16);
    user-select: none;
    touch-action: manipulation;
}

.mh-counter-button:active {
    transform: translateY(1px);
    background: rgba(59,130,246,.16);
}

.mh-counter-value {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 64px !important;
    max-width: none !important;
    height: 30px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(59,130,246,.36) !important;
    background: rgba(59,130,246,.10) !important;
    color: #BFDBFE !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    letter-spacing: .03em !important;
    text-align: center !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.mh-counter-value.is-negative {
    border-color: rgba(239,68,68,.62) !important;
    background: rgba(239,68,68,.10) !important;
    color: #FCA5A5 !important;
}

.mh-counter-value.is-neutral {
    border-color: rgba(59,130,246,.48) !important;
    background: rgba(59,130,246,.12) !important;
    color: #BFDBFE !important;
}

.mh-counter-value.is-positive {
    border-color: rgba(34,197,94,.62) !important;
    background: rgba(34,197,94,.10) !important;
    color: #86EFAC !important;
}

@media (max-width: 720px) {
    .mh-counter-control {
        grid-template-columns: 88px minmax(0, 1fr) !important;
        column-gap: 8px !important;
    }

    .mh-counter {
        grid-template-columns: 32px minmax(58px, 1fr) 32px;
        gap: 6px;
    }

    .mh-counter-button {
        width: 32px;
        height: 28px;
    }

    .mh-counter-value {
        min-width: 58px !important;
        height: 28px !important;
        font-size: 11px !important;
        padding: 0 8px !important;
    }
}

/* =========================
   MONEYHORSE AUTH — TRIAL / LOGIN
   Porte d'entrée premium MoneyHorse
========================= */

.mh-auth-cta {
    height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), #2563EB);
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .04em;
    box-shadow: 0 12px 30px rgba(59,130,246,.28);
    white-space: nowrap;
}

.mh-auth-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 4%, rgba(59,130,246,.34), transparent 30rem),
        radial-gradient(circle at 16% 86%, rgba(211,158,43,.10), transparent 24rem),
        radial-gradient(circle at 88% 76%, rgba(37,99,235,.16), transparent 28rem),
        var(--bg);
}

.mh-auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,.62), transparent 72%);
}

.mh-auth-shell {
    min-height: 100vh;
    width: min(560px, calc(100vw - 28px));
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 28px 0;
}

.mh-auth-card {
    position: relative;
    width: 100%;
    border-radius: 36px;
    padding: clamp(24px, 4vw, 34px);
    background:
        linear-gradient(180deg, rgba(19,26,46,.94), rgba(10,15,30,.97));
    border: 1px solid rgba(255,255,255,.10);
    box-shadow:
        0 30px 90px rgba(0,0,0,.44),
        inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(22px);
    isolation: isolate;
    animation: mhAuthEnter .72s ease both;
}

.mh-auth-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 35px;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, rgba(59,130,246,.17), transparent 38%);
    z-index: -1;
}

.mh-auth-logo-link {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.mh-auth-logo-link::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 320px;
    max-width: 82vw;
    height: 140px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(59,130,246,.24), transparent 66%);
    filter: blur(14px);
    pointer-events: none;
    z-index: -1;
}

.mh-auth-logo {
    width: min(310px, 84vw);
    height: auto;
    display: block;
    margin: 0 auto 14px;
    filter: drop-shadow(0 18px 36px rgba(0,0,0,.28));
}

.mh-auth-copy {
    text-align: center;
    display: grid;
    gap: 14px;
    margin: 0 auto 24px;
    animation: mhAuthRise .72s ease .08s both;
}

.mh-auth-slogan {
    margin: 0;
    color: #D39E2B;
    font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(21px, 4.8vw, 29px);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: .01em;
    text-align: center;
}

.mh-auth-slogan strong {
    font: inherit;
    color: inherit;
}

.mh-auth-copy p {
    margin: 0 auto;
    max-width: 30rem;
    color: #AEBBD0;
    font-size: clamp(13px, 2.5vw, 15px);
    line-height: 1.55;
    font-weight: 720;
}

.mh-auth-form {
    display: grid;
    gap: 12px;
    animation: mhAuthRise .72s ease .15s both;
}

.mh-google-button,
.mh-auth-primary,
.mh-auth-login button {
    min-height: 50px;
    border-radius: 17px;
    border: 1px solid var(--panel-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .025em;
}

.mh-google-button {
    position: relative;
    background: rgba(255,255,255,.065);
    color: var(--text);
    opacity: .88;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.03),
        0 12px 28px rgba(0,0,0,.18);
}

.mh-google-button small {
    position: absolute;
    right: 12px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mh-google-mark {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.94);
    color: #111827;
    font-weight: 1000;
}

.mh-auth-separator {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 2px 0;
}

.mh-auth-separator span {
    height: 1px;
    background: rgba(148,163,184,.18);
}

.mh-auth-field {
    display: grid;
    gap: 7px;
}

.mh-auth-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mh-auth-field input {
    height: 50px;
    width: 100%;
    border-radius: 17px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(255,255,255,.045);
    color: var(--text);
    padding: 0 15px;
    font-size: 14px;
    font-weight: 800;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.mh-auth-field input::placeholder {
    color: rgba(148,163,184,.68);
}

.mh-auth-field input:focus {
    border-color: rgba(59,130,246,.66);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 0 4px rgba(59,130,246,.13);
}

.mh-auth-primary {
    width: 100%;
    border: 0;
    margin-top: 2px;
    background: linear-gradient(135deg, #3B82F6, #2563EB 56%, #1D4ED8);
    color: #fff;
    box-shadow:
        0 18px 42px rgba(59,130,246,.34),
        inset 0 1px 0 rgba(255,255,255,.18);
    cursor: pointer;
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}

.mh-auth-primary:hover {
    filter: brightness(1.04);
    box-shadow:
        0 22px 52px rgba(59,130,246,.40),
        inset 0 1px 0 rgba(255,255,255,.18);
}

.mh-auth-primary:active {
    transform: translateY(1px);
}

.mh-auth-primary-link {
    text-decoration: none;
}

.mh-auth-login {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    animation: mhAuthRise .72s ease .2s both;
}

.mh-auth-login p {
    margin: 0;
}

.mh-auth-login button {
    min-height: 36px;
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: #BFDBFE;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.mh-auth-login button:hover {
    background: rgba(59,130,246,.12);
    color: #DBEAFE;
}

.mh-auth-note {
    margin: 18px auto 0;
    max-width: 29rem;
    color: rgba(148,163,184,.86);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    animation: mhAuthRise .72s ease .25s both;
}

.mh-auth-success {
    text-align: center;
}

.mh-auth-success-orb {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.38);
    color: #86EFAC;
    font-size: 28px;
    font-weight: 1000;
    box-shadow: 0 0 50px rgba(34,197,94,.18);
}

@keyframes mhAuthEnter {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mhAuthRise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .mh-auth-shell {
        width: min(100% - 18px, 560px);
        padding: 12px 0;
        place-items: center;
    }

    .mh-auth-card {
        padding: 22px;
        border-radius: 30px;
    }

    .mh-auth-logo {
        width: min(270px, 82vw);
        margin-bottom: 12px;
    }

    .mh-auth-copy {
        gap: 12px;
        margin-bottom: 20px;
    }

    .mh-auth-copy p {
        font-size: 13px;
    }

    .mh-google-button,
    .mh-auth-primary,
    .mh-auth-field input {
        min-height: 48px;
        height: 48px;
    }

    .mh-auth-login {
        flex-direction: column;
        gap: 8px;
    }
}


/* =========================
   MONEYHORSE AUTH — PREMIUM FINAL POLISH
   Signature bicolore + bouton doré
========================= */

.mh-auth-shell {
    padding: 18px 0;
}

.mh-auth-card {
    padding-top: clamp(20px, 3.2vw, 30px);
    padding-bottom: clamp(22px, 3.4vw, 32px);
}

.mh-auth-logo-link {
    margin-bottom: 2px;
}

.mh-auth-logo {
    width: min(310px, 84vw);
    margin: 0 auto 6px;
}

.mh-auth-copy {
    gap: 12px;
    margin-bottom: 20px;
}

.mh-auth-slogan {
    margin: 0;
    font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(27px, 5.2vw, 42px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.025em;
    text-align: center;
    color: #D39E2B;
}

.mh-auth-slogan-line {
    display: block;
}

.mh-auth-slogan-gold,
.mh-auth-horse {
    color: #D39E2B;
}

.mh-auth-money {
    color: #0066FF;
}

.mh-auth-copy p {
    max-width: 32rem;
    color: #AEBBD0;
    font-size: clamp(13px, 2.35vw, 15px);
    line-height: 1.52;
    font-weight: 650;
}

.mh-auth-copy p strong,
.mh-auth-copy p b {
    color: #D39E2B;
    font-weight: 750;
}

.mh-google-button {
    background: linear-gradient(180deg, #FFFFFF, #F4F7FB);
    color: #101827;
    border-color: rgba(255,255,255,.72);
    opacity: 1;
    box-shadow:
        0 18px 42px rgba(0,0,0,.24),
        inset 0 1px 0 rgba(255,255,255,.82);
}

.mh-google-button:disabled {
    cursor: not-allowed;
}

.mh-auth-primary {
    position: relative;
    overflow: hidden;
    min-height: 54px;
    border: 1px solid rgba(255,226,128,.58);
    background:
        linear-gradient(135deg, #E9C452 0%, #D39E2B 45%, #F2CE63 100%);
    color: #07111F;
    font-size: 15px;
    box-shadow:
        0 18px 46px rgba(211,158,43,.30),
        0 0 0 1px rgba(255,255,255,.035),
        inset 0 1px 0 rgba(255,255,255,.48),
        inset 0 -1px 0 rgba(83,50,6,.18);
}

.mh-auth-primary::before {
    content: "";
    position: absolute;
    top: -45%;
    bottom: -45%;
    width: 72px;
    left: -35%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.58), transparent);
    transform: skewX(-24deg);
    opacity: .72;
    animation: mhGoldSweep 4.8s ease-in-out infinite;
    pointer-events: none;
}

.mh-auth-primary::after {
    content: "→";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    color: rgba(7,17,31,.88);
    transition: transform .18s ease;
}

.mh-auth-primary:hover {
    filter: brightness(1.03) saturate(1.04);
    transform: translateY(-2px);
    box-shadow:
        0 24px 58px rgba(211,158,43,.40),
        0 0 26px rgba(242,206,99,.18),
        inset 0 1px 0 rgba(255,255,255,.58),
        inset 0 -1px 0 rgba(83,50,6,.16);
}

.mh-auth-primary:hover::after {
    transform: translate(4px, -52%);
}

.mh-auth-primary:active {
    transform: translateY(0);
}

.mh-auth-login button {
    color: #0066FF;
}

.mh-auth-login button:hover {
    color: #3B82F6;
}

@keyframes mhGoldSweep {
    0%, 52% { left: -36%; opacity: 0; }
    62% { opacity: .72; }
    78% { left: 118%; opacity: 0; }
    100% { left: 118%; opacity: 0; }
}

@media (max-width: 560px) {
    .mh-auth-shell {
        width: min(100% - 16px, 560px);
        padding: 8px 0;
    }

    .mh-auth-card {
        padding: 16px 18px 18px;
        border-radius: 28px;
    }

    .mh-auth-logo-link::before {
        height: 96px;
        width: 250px;
    }

    .mh-auth-logo {
        width: min(228px, 72vw);
        margin-bottom: 2px;
    }

    .mh-auth-copy {
        gap: 8px;
        margin-bottom: 14px;
    }

    .mh-auth-slogan {
        font-size: clamp(25px, 7.1vw, 34px);
        line-height: 1.08;
    }

    .mh-auth-copy p {
        font-size: 12.5px;
        line-height: 1.42;
    }

    .mh-auth-form {
        gap: 9px;
    }

    .mh-auth-separator {
        padding: 0;
    }

    .mh-google-button,
    .mh-auth-primary,
    .mh-auth-field input {
        min-height: 46px;
        height: 46px;
    }

    .mh-auth-primary {
        min-height: 50px;
    }

    .mh-auth-login {
        margin-top: 10px;
    }

    .mh-auth-note {
        margin-top: 12px;
        font-size: 10.5px;
    }
}


/* =========================
   MONEYHORSE AUTH / COMMERCIAL — CORRECTIONS GUEST
   - bouton commercial guest = S'inscrire
   - header mobile sans débordement
   - bouton visiteur sur l'écran auth
========================= */

.mh-header {
    gap: 12px;
}

.mh-header-actions {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.mh-auth-cta {
    min-width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.mh-save.is-locked {
    background: rgba(148,163,184,.10);
    color: #CBD5E1;
    border: 1px solid rgba(148,163,184,.22);
    box-shadow: none;
}

.mh-auth-visitor {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    border-radius: 17px;
    border: 1px solid rgba(0,102,255,.62);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #0066FF;
    background: rgba(0,102,255,.035);
    font-size: 14px;
    font-weight: 950;
    letter-spacing: .01em;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.02),
        0 14px 30px rgba(0,0,0,.16);
    transition: transform .14s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.mh-auth-visitor:hover {
    transform: translateY(-1px);
    color: #3B82F6;
    background: rgba(0,102,255,.07);
    border-color: rgba(59,130,246,.78);
}

@media (max-width: 720px) {
    .mh-header {
        gap: 8px;
    }

    .mh-header-actions {
        gap: 6px;
    }

    .mh-brand-logo {
        height: 70px;
        max-width: 92px;
        object-fit: contain;
    }

    .mh-auth-cta,
    .mh-switch-discipline,
    .mh-calendar-button {
        height: 36px;
        padding: 0 9px;
        border-radius: 13px;
        font-size: 10.5px;
        letter-spacing: .035em;
    }

    .mh-calendar-button {
        min-width: 92px;
    }

    .mh-auth-cta {
        max-width: 82px;
    }

    .mh-switch-discipline {
        min-width: 58px;
    }

    .mh-header-actions .mh-date-picker {
        flex: 0 1 auto;
        min-width: 0;
    }
}

@media (max-width: 380px) {
    .mh-brand-logo {
        height: 60px;
        max-width: 78px;
    }

    .mh-header-actions {
        gap: 4px;
    }

    .mh-auth-cta,
    .mh-switch-discipline,
    .mh-calendar-button {
        height: 34px;
        padding: 0 7px;
        font-size: 10px;
    }

    .mh-calendar-button {
        min-width: 86px;
    }

    .mh-switch-discipline {
        min-width: 52px;
    }
}

/* =========================
   MONEYHORSE AUTH — MOBILE HEIGHT TIGHTENING
   Réduction ciblée des espaces verticaux sur l'écran d'inscription.
========================= */

@media (max-width: 560px) {
    .mh-auth-shell {
        padding: 2px 0 !important;
        min-height: 100svh;
    }

    .mh-auth-card {
        padding: 10px 18px 12px !important;
        border-radius: 26px;
    }

    .mh-auth-logo-link {
        margin-bottom: -8px !important;
    }

    .mh-auth-logo-link::before {
        width: 220px !important;
        height: 78px !important;
        filter: blur(12px);
    }

    .mh-auth-logo {
        width: min(218px, 68vw) !important;
        margin: 0 auto -10px !important;
    }

    .mh-auth-copy {
        gap: 4px !important;
        margin-bottom: 10px !important;
    }

    .mh-auth-slogan {
        font-size: clamp(23px, 6.55vw, 31px) !important;
        line-height: 1.05 !important;
    }

    .mh-auth-copy p {
        font-size: 12px !important;
        line-height: 1.32 !important;
        margin-top: 2px !important;
    }

    .mh-auth-form {
        gap: 7px !important;
    }

    .mh-auth-separator {
        padding: 0 !important;
    }

    .mh-google-button,
    .mh-auth-field input {
        min-height: 44px !important;
        height: 44px !important;
    }

    .mh-auth-primary {
        min-height: 48px !important;
        height: 48px !important;
    }

    .mh-auth-field {
        gap: 5px !important;
    }

    .mh-auth-login {
        margin-top: 7px !important;
        gap: 6px !important;
    }

    .mh-auth-login button {
        min-height: 32px !important;
    }

    .mh-auth-visitor {
        min-height: 40px !important;
        margin-top: 6px !important;
        border-radius: 15px;
        font-size: 13px;
    }

    .mh-auth-note {
        margin-top: 7px !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
    }
}

@media (max-width: 380px) {
    .mh-auth-card {
        padding: 8px 14px 10px !important;
    }

    .mh-auth-logo {
        width: min(198px, 64vw) !important;
        margin-bottom: -12px !important;
    }

    .mh-auth-slogan {
        font-size: clamp(21px, 6.25vw, 28px) !important;
    }

    .mh-auth-copy p {
        font-size: 11.5px !important;
    }
}

/* Résultat Couplé Placé dans la sélection :
   [numéro] [nom extensible] [médaille fixe à droite]. */
.mh-horse-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mh-result-medal {
    flex: 0 0 20px;
    width: 20px;
    margin-left: auto;
    text-align: center;
    font-size: 13px;
    line-height: 1;
}

/* =========================
   SÉLECTIONS — ARRIVÉE 4e / 5e
========================= */
.mh-horse.is-near-hit,
.mh-horse.near-hit {
    outline: 2px solid rgba(245,158,11,.92);
    box-shadow: 0 0 10px rgba(245,158,11,.30);
}

