* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
.header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-name {
    font-weight: bold;
}

/* Style pour le clic sur le profil */
.user-avatar,
.user-name {
    cursor: pointer;
    transition: opacity 0.3s;
}

.user-avatar:hover,
.user-name:hover {
    opacity: 0.8;
}

/* Styles pour le classement avec avatars */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.leaderboard-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
}

.leaderboard-table tr:hover {
    background: #f8f9fa;
}

.rank-number {
    font-weight: bold;
    width: 80px;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e0a878 100%);
}

.rank-1 .leaderboard-username,
.rank-2 .leaderboard-username,
.rank-3 .leaderboard-username {
    font-weight: bold;
}

.user-cell {
    padding: 8px 12px;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-avatar-container {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-username {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.points-cell {
    font-weight: bold;
    color: #667eea;
    text-align: right;
    width: 100px;
}

.points-cell strong {
    font-size: 18px;
}

/* Version responsive pour mobile */
@media (max-width: 768px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }

    .rank-number {
        width: 60px;
        font-size: 14px;
    }

    .leaderboard-avatar-container {
        width: 32px;
        height: 32px;
    }

    .leaderboard-avatar,
    .leaderboard-initial {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .leaderboard-username {
        font-size: 14px;
    }

    .points-cell {
        width: 70px;
    }

    .points-cell strong {
        font-size: 14px;
    }
}

/* Animation au survol */
.leaderboard-avatar,
.leaderboard-initial {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.leaderboard-user:hover .leaderboard-avatar,
.leaderboard-user:hover .leaderboard-initial {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    padding: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e0e0e0;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.match-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.match-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.competition {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 5px;
}

.match-status {
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: bold;
}

.status-upcoming {
    background: #28a745;
    color: white;
}

.status-live {
    background: #ffc107;
    color: #333;
}

.status-finished {
    background: #dc3545;
    color: white;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
}

.team {
    flex: 1;
    text-align: center;
}

.team-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.vs {
    font-size: 20px;
    color: #666;
    margin: 0 20px;
}

.match-score {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    color: #667eea;
}

.pronostic-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.score-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.score-inputs input {
    width: 70px;
    padding: 8px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.score-inputs span {
    font-size: 20px;
    font-weight: bold;
}

.btn-submit {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #5a67d8;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pronostic-made {
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-align: center;
    margin-top: 10px;
}

/* Tableau classement */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.leaderboard-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
}

.leaderboard-table tr:hover {
    background: #f8f9fa;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    font-weight: bold;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e0a878 100%);
}

/* Messages */
.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .match-teams {
        flex-direction: column;
        gap: 15px;
    }

    .vs {
        margin: 10px 0;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-tabs {
        flex-direction: column;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    animation: slideIn 0.3s ease;
}

.notification.hide {
    animation: slideOut 0.3s ease;
}

/* Styles pour le classement avec statistiques */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.leaderboard-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
    position: sticky;
    top: 0;
}

.leaderboard-table tr:hover {
    background: #f8f9fa;
}

.rank-number {
    font-weight: bold;
    width: 60px;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e0a878 100%);
}

.user-cell {
    min-width: 180px;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-avatar-container {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leaderboard-username {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.points-cell {
    font-weight: bold;
    color: #667eea;
    text-align: center;
    width: 80px;
}

.stats-cell {
    text-align: center;
    width: 100px;
}

.stats-value {
    font-weight: bold;
    font-size: 14px;
}

.stats-bar {
    width: 60px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.stats-bar-fill {
    height: 100%;
    background: #28a745;
    border-radius: 3px;
    transition: width 0.3s;
}

.stats-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.stats-badge.good {
    background: #d4edda;
    color: #155724;
}

.stats-badge.excellent {
    background: #c3e6cb;
    color: #155724;
}

.stats-badge.perfect {
    background: #28a745;
    color: white;
}

/* Version responsive */
@media (max-width: 768px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .rank-number {
        width: 40px;
    }

    .leaderboard-avatar-container {
        width: 32px;
        height: 32px;
    }

    .leaderboard-avatar,
    .leaderboard-initial {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .leaderboard-username {
        font-size: 12px;
    }

    .points-cell {
        width: 60px;
    }

    .stats-cell {
        width: 70px;
    }

    .stats-value {
        font-size: 11px;
    }

    .loading {
        text-align: center;
        padding: 40px;
        color: #666;
        font-style: italic;
    }

    .error {
        color: #dc3545;
        text-align: center;
        padding: 20px;
    }

    .error button {
        background: #667eea;
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 5px;
        cursor: pointer;
        margin-left: 10px;
    }
}

/* Styles pour le modal des pronostics */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.btn-view-pronostics {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    width: 100%;
    transition: background 0.3s;
}

.btn-view-pronostics:hover {
    background: #5a67d8;
}

/* Tableau des pronostics */
.pronostics-table {
    width: 100%;
    border-collapse: collapse;
}

.pronostics-table th,
.pronostics-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pronostics-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
}

.pronostics-table tr:hover {
    background: #f8f9fa;
}

.pronostic-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pronostic-avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.pronostic-score {
    font-weight: bold;
    text-align: center;
}

.pronostic-points {
    text-align: center;
    font-weight: bold;
}

.pronostic-points.exact {
    color: #28a745;
}

.pronostic-points.correct {
    color: #ffc107;
}

.pronostic-points.incorrect {
    color: #dc3545;
}

.match-score-info {
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .pronostics-table th,
    .pronostics-table td {
        padding: 8px;
        font-size: 12px;
    }

    .pronostic-avatar-small {
        width: 24px;
        height: 24px;
    }
}

/* Style pour la date des pronostics */
.pronostic-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* Responsive pour la date */
@media (max-width: 768px) {
    .pronostic-date {
        font-size: 10px;
        white-space: normal;
    }
}
