* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    margin: 0;
    font-size: 36px;
}

.header p {
    color: #6b7280;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

label {
    font-weight: bold;
}

input {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 18px;
}

button, .btn {
    display: inline-block;
    width: 100%;
    padding: 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

button:hover, .btn:hover {
    background: #1d4ed8;
}

.result-card {
    border-left: 6px solid #2563eb;
}

.badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: bold;
}

.success {
    color: #16a34a;
    font-weight: bold;
}

.warning {
    color: #dc2626;
    font-weight: bold;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 28px;
    }
}

.toggle-btn {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
    width: auto;
}

.toggle-btn:hover {
    background: #e5e7eb;
}

.tech-info {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tech-info p {
    margin: 10px 0;
}
/* --- Page "Meilleur TRJ par match" : mise en page compacte --- */

.container-wide {
    max-width: 1500px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.filter-bar strong {
    margin-right: 4px;
}

.filter-bar label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.filter-bar input[type="checkbox"] {
    width: auto;
    margin: 0;
}

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

.match-row {
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.match-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 260px;
}

.match-meta-line {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.match-meta-line .competition {
    color: #6b7280;
}

.match-meta-line .date {
    color: #6b7280;
}

.trj-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 12px;
    white-space: nowrap;
}

.trj-badge.normal {
    background: #dcfce7;
    color: #16a34a;
}

.trj-badge.surebet {
    background: #f5b301;
    color: #1f2937;
}

.match-teams-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    color: #111827;
    flex-wrap: wrap;
}

.match-teams-line .vs-pill {
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 700;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 6px;
    text-transform: lowercase;
}

.player-odds-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.combo-match-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.player-odd-pill {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 8px;
}

.player-odd-pill strong {
    color: #1f2937;
    margin-left: 4px;
}

.odds-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.odd-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fbfbfc;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 8px 14px;
    min-width: 100px;
    position: relative;
    overflow: visible;
}

.odd-box-tagged {
    padding-top: 12px;
}

.odd-box .odd-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.odd-box .outcome-num {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
}

.odd-box .odd-value {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.odd-box .bk-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px #eef0f2;
}

.odd-box .stake-value {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
}

.odd-box-defi {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.odd-box-defi .outcome-num {
    color: #2563eb;
}

.defi-tag {
    position: absolute;
    top: -9px;
    left: 8px;
    background: #2563eb;
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.defi-tag-hedge {
    background: #e5e7eb;
    color: #4b5563;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 30px;
}

@media (max-width: 700px) {

    .container-wide {
        padding: 10px 8px;
    }

    .header h1 {
        font-size: 19px;
    }

    .header p {
        font-size: 12px;
    }

    .filter-bar {
        font-size: 12px;
        padding: 8px 10px;
        gap: 10px;
    }

    .filter-bar input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .match-list {
        gap: 6px;
    }

    .match-row {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
        gap: 6px;
        border-radius: 10px;
    }

    .match-left {
        min-width: 0;
    }

    .match-meta-line {
        flex-wrap: wrap;
        row-gap: 4px;
        font-size: 11px;
        gap: 8px;
    }

    .trj-badge {
        font-size: 11px;
        padding: 2px 7px;
    }

    .match-teams-line {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: start;
        gap: 4px;
        font-size: 14px;
        line-height: 1.15;
    }

    .match-teams-line span:first-child {
        text-align: left;
    }

    .match-teams-line span:last-child {
        text-align: right;
    }

    .match-teams-line .vs-pill {
        justify-self: center;
        margin-top: 1px;
        font-size: 9px;
        padding: 2px 6px;
    }

    .odds-row {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 4px;
    }

    .odds-row-wrap {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .odds-row-wrap .odd-box {
        flex: 1 1 calc(33.333% - 4px) !important;
        min-width: 90px;
    }

    .odd-box {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 2px;
        padding: 5px 3px;
        border-radius: 8px;
    }

    .odd-box .odd-main {
        align-items: center;
        gap: 1px;
    }

    .odd-box .outcome-num {
        font-size: 10px;
    }

    .odd-box .odd-value {
        font-size: 14px;
    }

    .odd-box .bk-logo {
        width: 16px;
        height: 16px;
    }

    .odd-box .stake-value {
        font-size: 10px;
    }

    .odd-box-tagged {
        padding-top: 9px;
    }

    .defi-tag {
        top: -7px;
        left: 4px;
        font-size: 7px;
        padding: 1px 5px;
    }
}
