@media (max-width: 767.98px) {
    .zone-scroll {
        scrollbar-width: thin;
        scrollbar-color: #ccc #f8f9fa;
        padding-bottom: 2px;
        scroll-behavior: smooth;
    }
    .zone-scroll::-webkit-scrollbar {
        height: 6px;
    }
    .zone-scroll::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    .zone-scroll::-webkit-scrollbar-track {
        background: #f8f9fa;
    }
}
@media (min-width: 768px) {
    .zone-scroll {
        display: none !important;
    }
    #zoneSidebarList {
        display: block !important;
    }
}
/* Affichage du poste sous le nom du joueur sur mobile */
@media (max-width: 576px) {
    .player-name-position {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .player-name-position .player-position-mobile {
        font-size: 0.90em;
        color: #888;
        margin-top: -2px;
        margin-bottom: 2px;
        line-height: 1;
    }
}
/* Styles personnalisés pour NiataNiataSports */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bg-purple {
    background-color: #6f42c1 !important;
    color: #fff;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.match-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    margin-left: 0;
    padding: 0;
    user-select: none;
    transition: box-shadow 0.2s, border 0.2s;
    cursor: pointer;
}

.match-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    border-color: #b6b6b6;
}

.match-card-header {
    background: #f7f7fa;
    border-bottom: 1px solid #ececec;
    border-radius: 14px 14px 0 0;
    padding: 4px 18px;
    font-weight: 300;
    font-size: 1.03rem;
    color: #444;
    display: flex;
    align-items: center;
    min-height: 38px;
}

.match-card-header-mobile-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-card-header > div {
    min-width: 0;
}

.match-card-header .match-competition {
    font-weight: 600;
    line-height: 1.2;
}

.match-card-header .match-date-mobile {
    color: #555;
    font-size: 0.92rem;
}

.match-card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    padding: 5px 3px 3px 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e5e7eb;
}
.match-line-meta {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}
.match-stadium {
    font-size: 0.9rem;
    color: #444;
}
.team {
    display: flex;
    align-items: center;
    min-width: 0;
}
.team-logo-mobile {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex-shrink: 0;
    display: block;
    background: #f3f3f3;
    border-radius: 7px;
    border: 1px solid #e0e0e0;
    object-fit: contain !important;
}
.match-card-body-mobile-1row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
}
.match-card-body-mobile-1row .team-logo-mobile {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
}
.team-name-text-mobile {
    font-size: 0.80rem;
    max-width: 90px;
    min-width: 0;
    width: auto;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
    font-weight: 700;
    text-transform: uppercase;
    color: #222;
    flex: 0 1 90px;
    min-width: 0;
    max-width: 90px;
}
.team-name-text-mobile.left {
    text-align: right;
    margin-right: 2px;
    flex: 1;
}
.team-name-text-mobile.right {
    text-align: left;
    margin-left: 2px;
    flex: 1;
}
.match-mobile-1row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 4px;
    flex-wrap: nowrap;
}
.team-mobile-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    max-width: 110px;
    gap: 4px;
}
.team-mobile-home {
    text-align: right;
}
.team-mobile-away {
    text-align: left;
}
.match-mobile-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    max-width: 140px;
    width: auto;
    gap: 2px;
    padding: 0 4px;
}
.match-card-body-mobile-1row .team-name-text-mobile.left,
.match-card-body-mobile-1row .team-name-text-mobile.right {
    flex: 0 1 90px;
    max-width: 90px;
}
.match-card-body-mobile-1row .match-mobile-center {
    min-width: 56px;
    max-width: 140px;
    width: auto;
}
.match-score {
    font-size: 1.25rem;
    color: #222;
    margin-bottom: 2px;
}
.match-hour {
    font-size: 1.1rem;
    color: #444;
    font-weight: 500;
}
.match-date {
    font-size: 0.98rem;
    color: #888;
    margin-top: 2px;
}
.badge-live {
    background: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 6px;
    padding: 2px 10px;
    margin: 4px 0 2px 0;
    letter-spacing: 0.5px;
    animation: badge-blink 1.1s infinite;
    display: inline-block;
}
@keyframes badge-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
.match-period-badge {
    margin-top: 2px;
    font-size: 0.93rem;
    font-weight: 500;
    display: inline-block;
}
.match-status-row-finished {
    justify-content: center;
}
.match-finished-text {
    font-size: 0.55rem;
    font-weight: 400;
    color: #413838;
    display: inline-block;
}
.match-zone-name {
    display: inline-block;
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 8px;
}
.chrono-badge {
    background: #222;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    border-radius: 5px;
    padding: 2px 8px;
    margin-left: 4px;
    letter-spacing: 0.5px;
}
.badge-finished {
    background: #6c757d;
    color: #fff;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
}

@media (max-width: 600px) {
    .match-card-body {
        width: 100%;
    }
    .match-card-body-mobile-1row {
        width: 100%;
        flex-direction: column;
        gap: 6px;
    }
    .match-line-status,
    .match-line-meta {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .match-status-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        width: 100%;
        max-width: 260px;
    }
    .match-status-row .badge,
    .match-status-row .match-period-badge {
        font-size: 0.72rem !important;
        padding: 2px 6px !important;
        border-radius: 6px !important;
        min-width: 0 !important;
        line-height: 1.1 !important;
        display: inline-block !important;
    }
    .match-status-row .badge-live {
        background: #fa8e8e !important;
        color: #fff !important;
    }
    .match-status-row .chrono-badge {
        background: #222 !important;
        color: #fff !important;
        padding: 2px 6px !important;
        font-weight: 700 !important;
        border-radius: 5px !important;
        margin-left: 0 !important;
    }
    .match-status-row .match-period-badge {
        background: #e9ecef !important;
        color: #444 !important;
        font-weight: 600 !important;
        margin-top: 0 !important;
        max-width: 120px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .match-stadium {
        font-size: 0.78rem;
        color: #444;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
        display: inline-block;
    }
    .match-mobile-center .match-score {
        font-size: 1.02rem !important;
    }
    .match-mobile-center .match-hour {
        font-size: 0.92rem !important;
    }
    .match-mobile-center .badge-live {
        background: #fa8e8e !important;
        color: #fff !important;
        font-weight: 600 !important;
        font-size: 0.78rem !important;
        padding: 2px 8px !important;
        border-radius: 7px !important;
        min-width: 0 !important;
        line-height: 1.1 !important;
        display: inline-block !important;
    }
    .match-mobile-center .chrono-badge {
        background: #222 !important;
        color: #fff !important;
        font-weight: 700 !important;
        font-size: 0.78rem !important;
        padding: 2px 6px !important;
        border-radius: 5px !important;
        margin-left: 4px !important;
        letter-spacing: 0.5px !important;
        display: inline-block !important;
    }
    .match-card-header-mobile-flex .badge {
        padding: 2px 6px !important;
        font-size: 0.72rem !important;
    }
    .match-mobile-center .match-period-badge {
        font-size: 0.78rem !important;
        margin-top: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 140px !important;
    }
    .match-shootout-score {
        font-size: 0.75rem;
        color: #6c757d;
        font-weight: 600;
        margin-top: 2px;
    }
    .team-name-text-mobile.left {
        text-align: right;
        margin-right: 2px;
        flex: 1;
    }
    .team-name-text-mobile.right {
        text-align: left;
        margin-left: 2px;
        flex: 1;
    }
    .match-mobile-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 56px;
        max-width: 140px;
        width: auto;
        padding: 0 4px;
    }
    .team-name-text-mobile.left,
    .team-name-text-mobile.right {
        flex: 0 1 90px;
        max-width: 90px;
    }
    .match-hour-date-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 2px;
    }
    .match-hour-date-row .match-date {
        margin-top: 0;
    }
    .match-mobile-date-row {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 2px;
    }
}

@media (max-width: 575.98px) {
    .match-card {
        padding: 1rem;
    }
    .match-card .text-center {
        min-width: 110px;
    }
}

.match-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
}

.match-status-live {
    background-color: #dc3545;
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.team-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.player-card {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.player-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.ranking-table th {
    background-color: #343a40;
    color: white;
}

.ranking-table tr:hover {
    background-color: #f1f1f1;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.filters-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Onglets scrollables sur mobile --- */
@media (max-width: 768px) {
  .nav-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .nav-tabs-scroll .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
    .match-card .row {
        flex-direction: column;
        text-align: center;
    }
    
    .match-card .col-md-2,
    .match-card .col-md-7,
    .match-card .col-md-3 {
        margin-bottom: 10px;
    }
}