*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#111;
    color:white;
    min-height:100vh;
}

.topbar{
    background:#000;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 40px;
    border-bottom:2px solid #ff6600;
}

.logo{
    font-size:24px;
    font-weight:bold;
}

nav{
    display:flex;
    gap:20px;
}

nav a{
    color:white;
    text-decoration:none;
    font-weight:bold;
    transition:0.3s;
}

nav a:hover{
    color:#ff6600;
}

.hero{
    text-align:center;
    padding:80px 20px;
    background:linear-gradient(
        135deg,
        #ff6600,
        #ff2200
    );
}

.hero h1{
    font-size:48px;
    margin-bottom:15px;
}

.hero p{
    font-size:20px;
}

.cards{
    width:90%;
    max-width:1200px;
    margin:30px auto;
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(300px,1fr));
    gap:20px;
}

.card{
    background:#1b1b1b;
    border-radius:15px;
    padding:25px;
    box-shadow:
    0 0 15px rgba(255,102,0,.2);
}

.card h2{
    margin-bottom:20px;
    color:#ff6600;
}

.player-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px;
    margin-bottom:10px;
    background:#262626;
    border-radius:10px;
}

table{
    width:100%;
    border-collapse:collapse;
}

th{
    background:#ff6600;
    padding:12px;
}

td{
    padding:12px;
    text-align:center;
    border-bottom:1px solid #333;
}

tr:hover{
    background:#222;
}

input,
select{
    width:100%;
    padding:12px;
    margin-bottom:15px;
    border:none;
    border-radius:10px;
    background:#2a2a2a;
    color:white;
}

button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:10px;
    background:#ff6600;
    color:white;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}

button:hover{
    background:#ff4400;
}

#matchStatus{
    font-size:22px;
    font-weight:bold;
    text-align:center;
}

.live{
    color:#00ff66;
}

.wait{
    color:#ffcc00;
}

#liveScore{
    text-align:center;
    font-size:36px;
    margin-bottom:20px;
}

#timeline{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.timeline-event{
    background:#222;
    padding:12px;
    border-radius:10px;
    border-left:4px solid #ff6600;
}

footer{
    text-align:center;
    padding:30px;
    margin-top:50px;
    background:#000;
    border-top:2px solid #ff6600;
}

@media(max-width:768px){

    .topbar{
        flex-direction:column;
        gap:15px;
    }

    nav{
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero h1{
        font-size:32px;
    }

}

.player-card-select {
    display: flex;
    align-items: center;
    gap: 12px;

    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 10px;

    padding: 12px;
    margin-bottom: 10px;

    cursor: pointer;
}

.player-card-select:hover {
    border-color: #ff6b00;
    background: #242424;
}

.player-card-select input {
    width: 22px;
    height: 22px;
    accent-color: #ff6b00;
    cursor: pointer;
    flex-shrink: 0;
}

.player-card-info {
    display: flex;
    flex-direction: column;
}

.player-card-info strong {
    color: #fff;
    font-size: 15px;
}

.player-card-info span {
    color: #ffb347;
    font-size: 13px;
    margin-top: 3px;
}

/* =============================== */
/* TABLEAUX RESPONSIVE MOBILE      */
/* Calendrier + Classement         */
/* =============================== */

.table-mobile {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid #4a2a12;
    background: #111;
}

.table-mobile::before {
    content: "← Glisse pour voir tout le tableau →";
    display: none;
    text-align: center;
    padding: 10px;
    color: #ffb347;
    font-size: 13px;
    font-weight: bold;
    background: #1b1b1b;
    border-bottom: 1px solid #4a2a12;
}

.table-mobile table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.table-mobile::-webkit-scrollbar {
    height: 8px;
}

.table-mobile::-webkit-scrollbar-track {
    background: #222;
    border-radius: 20px;
}

.table-mobile::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 20px;
}

/* MOBILE */

@media(max-width: 768px) {

    .table-mobile::before {
        display: block;
    }

    .card {
        overflow: hidden;
    }

    .table-mobile table {
        min-width: 680px;
    }

    th,
    td {
        font-size: 13px;
        padding: 10px;
        white-space: nowrap;
    }

    /* Classement : Pos + Équipe restent visibles */
    .classement-table th:nth-child(1),
    .classement-table td:nth-child(1) {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 50px;
        background: #1b1b1b;
    }

    .classement-table th:nth-child(2),
    .classement-table td:nth-child(2) {
        position: sticky;
        left: 50px;
        z-index: 3;
        min-width: 130px;
        text-align: left;
        background: #1b1b1b;
        box-shadow: 8px 0 15px rgba(0,0,0,0.35);
    }

    .classement-table th:nth-child(1),
    .classement-table th:nth-child(2) {
        background: #ff6600;
    }

    /* Calendrier : le match reste visible */
    .calendrier-table th:nth-child(3),
    .calendrier-table td:nth-child(3) {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 190px;
        text-align: left;
        background: #1b1b1b;
        box-shadow: 8px 0 15px rgba(0,0,0,0.35);
    }

    .calendrier-table th:nth-child(3) {
        background: #ff6600;
    }
}

/* PETITS TÉLÉPHONES */

@media(max-width: 480px) {

    .cards {
        width: 96%;
    }

    .card {
        padding: 14px;
    }

    .table-mobile table {
        min-width: 620px;
    }

    th,
    td {
        font-size: 12px;
        padding: 9px;
    }

    .classement-table th:nth-child(2),
    .classement-table td:nth-child(2) {
        min-width: 115px;
    }

    .calendrier-table th:nth-child(3),
    .calendrier-table td:nth-child(3) {
        min-width: 165px;
    }
}

/* TRÈS PETITS ÉCRANS */

@media(max-width: 360px) {

    .table-mobile table {
        min-width: 590px;
    }

    th,
    td {
        font-size: 11px;
        padding: 8px;
    }

    .classement-table th:nth-child(1),
    .classement-table td:nth-child(1) {
        min-width: 42px;
    }

    .classement-table th:nth-child(2),
    .classement-table td:nth-child(2) {
        left: 42px;
        min-width: 105px;
    }
}