/* ============================================
   STRUCTURE COMMUNE (Résultats + Calendrier)
   ============================================ */

.fff-results-container,
.fff-calendar-container {
    padding: 10px 0;
    width: 100%;
}

/* Navigation par mois */
.fff-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.fff-month-nav button {
    background: #3a3a3a;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    color: #ffffff;
    transition: background 0.2s ease;
}

.fff-month-nav button:hover:not(:disabled) {
    background: #672068;
}

.fff-month-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fff-current-month {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
}

/* Liste des résultats / calendrier */
.fff-results-list,
.fff-calendar-list {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

/* Cartes de match */
.fff-match-card {
    background: transparent;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #3a3a3a;
    width: 100%;
}

.fff-match-card:last-child {
    border-bottom: none;
}

/* ========== DESKTOP (>= 769px) ========== */
@media (min-width: 769px) {
    .fff-match-desktop {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .fff-match-desktop > div {
        display: table-cell;
        vertical-align: middle;
    }
    
    .fff-team-home {
        width: 40%;
        text-align: left;
    }
    
    .fff-score-container {
        width: 20%;
        text-align: center;
    }
    
    .fff-team-away {
        width: 40%;
        text-align: right;
    }
    
    .fff-team-home .fff-team-content {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }
    
    .fff-team-away .fff-team-content {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
    }
    
    .fff-match-logo {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: contain;
    }
    
    .fff-team-name {
        font-size: 16px;
        font-weight: 500;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }
    
    .fff-our-team {
        font-weight: 700;
    }
}

/* ========== STYLES COMMUNS TOUS ÉCRANS ========== */
.fff-match-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
}

.fff-team-name {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.fff-our-team {
    font-weight: 700;
    color: #ffffff;
}

/* Badge de score */
.fff-score-badge {
    font-size: 18px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    background: #3a3a3a;
    display: inline-block;
    color: #ffffff;
}

.fff-score-badge.win {
    background: #2c5a2c;
}

.fff-score-badge.loss {
    background: #8b3a3a;
}

.fff-score-badge.draw {
    background: #8b6b3a;
}

.fff-score-badge.no-score {
    background: #5a5a5a;
    color: #cccccc;
    font-size: 12px;
}

/* Badge de date (calendrier) */
.fff-date-badge {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    background: #3a3a3a;
    display: inline-block;
    color: #ffffff;
}

.fff-match-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

.fff-match-date {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

.fff-no-matchs {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

/* ========== MOBILE (<= 768px) ========== */
.fff-match-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .fff-match-desktop {
        display: none;
    }
    
    .fff-match-mobile {
        display: flex;
    }
    
    .fff-team-home-mobile,
    .fff-team-away-mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .fff-team-home-mobile .fff-match-logo,
    .fff-team-away-mobile .fff-match-logo {
        width: 30px;
        height: 30px;
        border-radius: 50%;
    }
    
    .fff-score-container-mobile {
        text-align: center;
    }
    
    .fff-month-nav {
        padding: 10px 15px;
        max-width: 95%;
    }
    
    .fff-results-list,
    .fff-calendar-list {
        max-width: 95%;
    }
    
    .fff-month-nav button {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .fff-current-month {
        font-size: 14px;
    }
    
    .fff-team-name {
        font-size: 14px;
    }
    
    .fff-score-badge,
    .fff-date-badge {
        font-size: 14px;
        padding: 5px 12px;
    }
}

/* ============================================
   CLASSEMENT
   ============================================ */

.fff-standings-container {
    overflow-x: auto;
    margin-bottom: 60px;
}

.fff-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Bordure sur chaque cellule */
.fff-standings-table th,
.fff-standings-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #3a3a3a;
}

.fff-standings-table th {
    background: #2a2a2a;
    font-weight: 600;
    color: #ddd;
}

.fff-standings-table .fff-team {
    text-align: left;
}

.fff-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 50%;
}

.fff-row.fff-our-team {
    font-weight: 700;
}

.fff-row[data-row-color="odd"] {
    background: #2a2a2a;
}

.fff-row[data-row-color="even"] {
    background: #252525;
}

@media (max-width: 768px) {
    .fff-standings-table th,
    .fff-standings-table td {
        padding: 8px 4px;
        font-size: 11px;
    }
    .fff-team-logo {
        width: 18px;
        height: 18px;
        margin-right: 4px;
    }
}

/* Force le centrage du message de coupe sur mobile */
@media (max-width: 768px) {
    .fff-eliminated-message {
        text-align: center !important;
        padding: 15px !important;
        margin: 20px auto !important;
        width: 90% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .fff-eliminated-message p {
        text-align: center !important;
        font-size: 14px !important;
        margin: 0 !important;
    }
}

