/* Couleurs pour la différence buts (marqués - encaissés) */
.goal-average {
    font-weight: 600;
}
.goal-average.positive {
    color: #16a34a; /* vert */
}
.goal-average.negative {
    color: #dc2626; /* rouge */
}
.goal-average.neutral {
    color: #6b7280; /* gris */
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    transition: background 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Thèmes dynamiques basés sur l'équipe en tête */
body.theme-ficha {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.theme-bycommute {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

body.theme-astriis {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

body.theme-countact {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

body.theme-other {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

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

/* Sous-navigation pour les types de classements */
.ranking-type-subnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.subnav-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subnav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.subnav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.subnav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
    background: #fafafa;
}

.subnav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.subnav-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.subnav-text {
    font-weight: 600;
}

/* Responsive subnav */
@media (max-width: 768px) {
    .ranking-type-subnav {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .subnav-label {
        font-size: 0.85rem;
    }
    
    .subnav-buttons {
        width: 100%;
        gap: 8px;
    }
    
    .subnav-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.85rem;
        justify-content: center;
    }
    
    .subnav-text {
        display: block;
    }
}

@media (max-width: 480px) {
    .subnav-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .subnav-btn {
        width: 100%;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Carrousel de statistiques de la semaine */
.weekly-stats-carousel {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    margin: 10px auto 15px auto;
    max-width: 500px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: slideDown 0.4s ease-out;
    position: relative;
    touch-action: pan-x;
    user-select: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
    transition: all 0.5s ease-in-out;
}

.carousel-icon {
    font-size: 1.2rem;
    color: #f59e0b;
    transition: all 0.3s ease;
}

.carousel-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.carousel-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.carousel-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
}

.carousel-stats {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    transition: all 0.3s ease;
}

/* Indicateurs de diapositives */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    background: rgba(0, 0, 0, 0.05);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #f59e0b;
    transform: scale(1.2);
}

.dot:hover {
    background: #94a3b8;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .weekly-stats-carousel {
        margin: 10px 10px 15px 10px;
        border-radius: 6px;
    }
    
    .carousel-content {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .carousel-icon {
        font-size: 1rem;
    }
    
    .carousel-name {
        font-size: 0.9rem;
    }
    
    .carousel-stats {
        font-size: 0.75rem;
    }
    
    .carousel-dots {
        padding: 6px 0;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    background: #e9ecef;
}

.nav-tab.active {
    background: white;
    border-bottom-color: #667eea;
    color: #667eea;
    box-shadow: inset 0 -3px 0 0 #667eea;
}

/* Content Area */
.content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 600px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Match Entry Styles */
.match-type-toggle {
    display: flex;
    margin-top: 32px;
    margin-bottom: 25px;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ranking-type-toggle {
    display: flex;
    margin-bottom: 25px;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ranking-type-toggle {
    margin: 20px 0;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.toggle-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.monthly-badge {
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.monthly-header td {
    border-radius: 8px 8px 0 0;
}

.monthly-header-cell {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Alignement à gauche sur mobile pour les en-têtes de mois */
@media (max-width: 768px) {
    .monthly-header-cell {
        text-align: left !important;
        font-size: 1rem;
        padding: 12px;
    }
    
    /* Également pour les podiums des mois précédents */
    .monthly-header td {
        text-align: left !important;
        font-size: 1rem;
        padding: 12px;
    }
}

/* Animation de transition pour la navigation vers classement mensuel */
.ranking-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.95) 0%, rgba(251, 146, 60, 0.95) 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.ranking-transition-overlay.active {
    opacity: 1;
    transform: scale(1);
}

.ranking-transition-overlay.fade-out {
    opacity: 0;
    transform: scale(1.1);
}

.transition-content {
    text-align: center;
    color: white;
    animation: slideUpFade 0.5s ease;
}

.transition-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: iconBounce 0.6s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.transition-text {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: textSlide 0.5s ease 0.2s both;
}

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

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-20px) rotate(-10deg);
    }
    50% {
        transform: translateY(0) rotate(10deg);
    }
    75% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

@keyframes textSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.last-month-player {
    opacity: 0.8;
    background: #fef3c7 !important;
}

.last-month-player:hover {
    opacity: 1;
    background: #fde68a !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.team-section {
    background: rgba(248, 249, 250, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(233, 236, 239, 0.8);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.team-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.player-input {
    margin-bottom: 15px;
    position: relative;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

/* Styles harmonisés pour les badges joueur (ELO, Rang, Chance) */
.player-elo,
.player-rank,
.player-chance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    margin-left: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.01em;
}

.player-elo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.player-elo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.35);
}

.player-rank {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.player-rank:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.autocomplete-container {
    position: relative;
    width: 100%;
}

.player-search {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.player-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 500;
    color: #333;
}

.suggestion-company {
    color: #6c757d;
    font-size: 0.9rem;
}

.create-player-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}

.create-player-btn:hover {
    background: #218838;
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    max-width: 500px;
}

.popup-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.popup-content .form-group {
    margin-bottom: 20px;
}

.popup-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.popup-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.popup-content input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.popup-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-buttons .btn-save {
    background: #28a745;
    color: white;
}

.popup-buttons .btn-save:hover {
    background: #218838;
}

.popup-buttons .btn-cancel {
    background: #6c757d;
    color: white;
}

.popup-buttons .btn-cancel:hover {
    background: #5a6268;
}

/* Badges styles */
.badges-container {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}



.badge-nocturne {
    background: linear-gradient(135deg, #4a4a4a, #2c2c2c);
    color: #ffffff;
    border: 1px solid #666666;
}

.badge-addict {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: #ffffff;
    border: 1px solid #e74c3c;
}

/* Badge meilleure différence de buts */
.badge-goalavg {
    background: linear-gradient(135deg, #fbbf24, #f59e0b); /* doré/orangé */
    color: #1f2937;
    border: 1px solid #d97706;
}

/* Badge meilleur pourcentage de victoire */
.badge-winrate {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6); /* violet */
    color: #ffffff;
    border: 1px solid #7c3aed;
}

/* Celebration styles */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.celebration-overlay.show {
    opacity: 1;
}

.celebration-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    margin: 20px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}

.celebration-overlay.show .celebration-content {
    transform: scale(1);
}

.celebration-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite alternate;
}

.celebration-content h2 {
    font-size: 2rem;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.celebration-message {
    font-size: 1.2rem;
    margin: 0 0 30px 0;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.celebration-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.celebration-buttons button {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-replay {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-replay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-new-match {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-new-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

/* Boutons de mode debug */
.btn-edit, .btn-delete-player {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    white-space: nowrap;
    gap: 4px;
}

.btn-edit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
}

.btn-edit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-delete-player {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-delete-player:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-delete-player:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Conteneur pour les boutons d'actions */
.actions-container {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons debug dans l'historique des matchs */
.debug-controls {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
}

.debug-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.debug-btn.edit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.debug-btn.edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
}

.debug-btn.delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.debug-btn.delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.debug-btn:active {
    transform: translateY(0);
}

.celebration-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.celebration-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Confetti animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall linear infinite;
    z-index: 15000;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-10px);
    }
}

/* Anciens styles de formulaire inline supprimés - maintenant on utilise la popup */

select, input {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: #667eea;
}

.score-section {
    text-align: center;
    margin: 20px 0;
}

.score-section label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.score-input {
    width: 100px;
    height: 65px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid #667eea;
    border-radius: 14px;
    background: white;
    color: #374151;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.score-input:focus {
    outline: none;
    border-color: #5568d3;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(102, 126, 234, 0.25);
    transform: scale(1.08);
}

.submit-match {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.02em;
}

.submit-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.submit-match:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Rankings Styles */
.rankings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stats-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.stat-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    color: #374151;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.rankings-table th {
    background: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rankings-table th:hover {
    background: #e9ecef;
}

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

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
}

.rank-badge.gold {
    background: #ffd700;
    color: #333;
}

.rank-badge.silver {
    background: #c0c0c0;
    color: #333;
}

.rank-badge.bronze {
    background: #cd7f32;
    color: white;
}

.elo-rating {
    font-weight: bold;
    font-size: 1.1rem;
}

.win-rate {
    font-weight: 600;
}

.win-rate.high {
    color: #28a745;
}

.win-rate.medium {
    color: #ffc107;
}

.win-rate.low {
    color: #dc3545;
}

/* Match History */
.match-history {
    margin-top: 30px;
}

.match-history h3 {
    margin-bottom: 20px;
    color: #495057;
}

.match-item {
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.match-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.match-type {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-date {
    color: #94a3b8;
    font-size: 0.8rem;
}

.match-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-score {
    font-weight: bold;
    font-size: 1.2rem;
}

.elo-changes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.elo-change {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.elo-change.positive {
    background: #d4edda;
    color: #155724;
}

.elo-change.negative {
    background: #f8d7da;
    color: #721c24;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
}

.modal-header {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Debug Mode Styles */

.debug-mode .match-item {
    position: relative;
    border: 2px solid #ffc107;
    background: #fff3cd;
}

.debug-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    opacity: 1;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.debug-mode .match-item:hover .debug-controls {
    opacity: 1;
}

/* Styles spécifiques pour les boutons dans match-item */
.debug-controls .debug-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 45px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.debug-controls .debug-btn:active {
    transform: scale(0.95);
}

.debug-controls .debug-btn.edit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.debug-controls .debug-btn.edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
}

.debug-controls .debug-btn.delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.debug-controls .debug-btn.delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .debug-controls {
        position: static;
        margin-top: 12px;
        justify-content: center;
        gap: 8px;
    }
    
    .debug-controls .debug-btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

.score-edit-form {
    display: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border: 2px solid #ffc107;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

.score-edit-form.active {
    display: block;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

.score-input-group label {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.score-input-group input {
    width: 70px;
    text-align: center;
    padding: 8px 12px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.score-input-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.score-input-group span {
    font-weight: bold;
    color: #6c757d;
    font-size: 18px;
}

.score-edit-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.score-edit-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 100px;
}

.score-edit-buttons .save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.score-edit-buttons .save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.4);
}

.score-edit-buttons .cancel {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(108,117,125,0.3);
}

.score-edit-buttons .cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.4);
}

/* Bouton historique */
.history-toggle-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-toggle-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Historique des matchs */
.match-history {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.match-history h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.history-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border-left: 5px solid #007bff;
    font-size: 0.95em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.history-match.win {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #ffffff 100%);
}

.history-match.loss {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #ffffff 100%);
}

.history-players {
    font-weight: 600;
    color: #495057;
    flex: 1;
}

.history-score {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
    margin: 0 15px;
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 6px;
}

.history-date {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
}

.history-stats {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-radius: 8px;
    font-size: 0.95em;
    color: #495057;
    text-align: center;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

/* Responsive pour l'historique */
@media (max-width: 768px) {
    .match-history {
        margin-top: 15px;
        padding: 15px;
    }
    
    .history-match {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .history-players {
        font-size: 1em;
    }
    
    .history-score {
        margin: 0;
        align-self: flex-end;
    }
    
    .history-date {
        align-self: flex-end;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .nav-tab {
        padding: 12px;
        font-size: 0.9rem;
    }

    .content {
        padding: 20px;
    }

    /* Conteneur pour le tableau avec défilement horizontal */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px; /* Compenser le padding du conteneur parent */
        padding: 0 20px;
    }

    .stats-summary {
        flex-direction: row;
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .stat-icon {
        font-size: 1.4rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }

    /* Optimisations pour mobile et tablette */
    .team-section {
        margin-bottom: 20px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 10px;
        border: 1px solid #e9ecef;
    }

    .team-header {
        font-size: 1.1rem;
        font-weight: bold;
        margin-bottom: 12px;
        text-align: center;
        padding: 6px;
        border-radius: 6px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
    }

    .player-search {
        font-size: 1rem;
        padding: 10px;
    }

    .score-section {
        margin: 20px 0;
    }

    .score-input {
        width: 110px;
        height: 65px;
        font-size: 2rem;
    }

    .submit-match {
        font-size: 1.1rem;
        padding: 16px;
        border-radius: 10px;
        margin-top: 15px;
    }

    /* Tableau responsive - version mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
    }

    .rankings-table {
        min-width: 600px;
    }

    .rank-badge {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 0.8rem;
    }

    .elo-rating {
        font-size: 1rem;
    }

    .match-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .elo-changes {
        justify-content: flex-start;
    }
}

/* Version tablette - tableau horizontal avec scroll */
@media (min-width: 769px) and (max-width: 1024px) {
    .rankings-table {
        font-size: 0.9rem;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 12px 8px;
    }
}

/* Version mobile très petite */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .content {
        padding: 15px;
    }


    .rank-badge {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 0.7rem;
    }

    .elo-rating {
        font-size: 0.9rem;
    }

    /* Optimisations spécifiques pour mobile */
    .team-section {
        margin-bottom: 25px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }

    .team-header {
        font-size: 1.2rem;
        font-weight: bold;
        margin-bottom: 15px;
        text-align: center;
        padding: 8px;
        border-radius: 8px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
    }

    .player-search {
        font-size: 1.1rem;
        padding: 12px;
        border-radius: 8px;
    }

    .autocomplete-suggestions {
        font-size: 0.95rem;
    }

    .suggestion-item {
        padding: 14px;
    }

    .suggestion-name {
        font-size: 1rem;
    }

    .suggestion-company {
        font-size: 0.85rem;
    }

    .score-section {
        margin: 25px 0;
    }

    .score-input {
        width: 120px;
        height: 70px;
        font-size: 2.2rem;
    }

    .submit-match {
        font-size: 1.2rem;
        padding: 18px;
        border-radius: 12px;
        margin-top: 20px;
    }

    .form-group label {
        font-size: 1rem;
        font-weight: 600;
    }

    .match-type-toggle {
        margin-bottom: 20px;
    }

    .match-type-toggle button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Historique des matchs - Design moderne 2025 */
.match-history {
    margin-top: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.history-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.history-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.history-stats {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.stats-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.9em;
    font-weight: 600;
}

.stats-summary .separator {
    color: #9ca3af;
    font-weight: 400;
}

.total-matches {
    color: #374151;
}

.team1-wins {
    color: #16a34a;
}

.team2-wins {
    color: #dc2626;
}

.history-matches {
    padding: 0;
}

.history-match {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    position: relative;
}

/* Forcer une couleur lisible pour les noms dans l'historique */
.history-match .team-name,
.match-history .team-name {
    color: #374151 !important;
}

.history-match:last-child {
    border-bottom: none;
}

.history-match:hover {
    background: #f8fafc;
}

.match-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #374151;
}

.team-name {
    font-size: 0.95em;
}

.vs {
    color: #9ca3af;
    font-size: 0.85em;
    font-weight: 500;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.score {
    font-size: 1.4em;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 50px;
    text-align: center;
}

.score.winner {
    background: #dcfce7;
    color: #16a34a;
}

.score.loser {
    background: #fef2f2;
    color: #dc2626;
}

.separator {
    color: #6b7280;
    font-weight: 600;
    font-size: 1.2em;
}

.match-winner {
    text-align: center;
    font-weight: 700;
    font-size: 1.2em;
    margin: 16px 0;
    padding: 8px 16px;
    color: #2c3e50 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.history-toggle-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    width: 100%;
}

.history-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.history-toggle-btn:active {
    transform: translateY(0);
}

/* Bouton "Voir plus" pour l'historique */
.history-load-more {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.btn-load-more {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
}

.btn-load-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Bouton "Charger plus" pour les matchs récents */
.recent-matches-load-more {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

.btn-load-more-recent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-load-more-recent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-load-more-recent:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Styles pour les sections de classement */
.ranking-section-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-top: 2px solid #cbd5e1;
    border-bottom: 1px solid #e2e8f0;
}

.ranking-section-header .section-title {
    padding: 16px 20px;
    text-align: center;
    font-weight: 700;
    color: #1e293b;
}

.ranking-section-header h3 {
    margin: 0;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Styles pour les joueurs hors classement */
.unranked-player {
    background: #f8fafc;
    opacity: 0.8;
}

.unranked-player td {
    color: #64748b;
}

.rank-badge.unranked {
    background: #e2e8f0;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.unranked-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inactive-player {
    background: #fef3f2;
    opacity: 0.7;
}

.inactive-badge {
    display: inline-block;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #fecaca;
}

/* Footer de l'application */
.app-footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #e5e7eb;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #374151;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.app-footer p {
    margin: 0;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.app-footer strong {
    color: #fbbf24;
    font-weight: 700;
}

.app-footer strong:first-of-type {
    color: #10b981;
}

.app-footer strong:last-of-type {
    color: #3b82f6;
}

.app-footer a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.app-footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.app-footer strong:first-of-type a {
    color: #10b981;
}

.app-footer strong:last-of-type a {
    color: #3b82f6;
}

/* Modal d'ajout à l'écran d'accueil */
#add-to-home-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#add-to-home-modal.show {
    opacity: 1;
    visibility: visible;
}

.add-to-home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.add-to-home-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#add-to-home-modal.show .add-to-home-content {
    transform: scale(1);
}

.add-to-home-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.add-to-home-content h3 {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 1.3em;
    font-weight: 700;
}

.add-to-home-content p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 0.95em;
    line-height: 1.5;
}

.add-to-home-steps {
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    text-align: left;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.step span:last-child {
    color: #374151;
    font-size: 0.9em;
    line-height: 1.4;
}

.ios-share {
    background: #000;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    margin-left: 4px;
}

.add-to-home-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.add-to-home-buttons .btn {
    flex: 1;
    max-width: 120px;
    padding: 10px 16px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Styles pour l'installation PWA */
.install-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 0.9em;
    font-weight: 500;
}

.benefit:before {
    content: "✓";
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive pour le modal */
@media (max-width: 480px) {
    .add-to-home-overlay {
        padding: 16px;
    }
    
    .add-to-home-content {
        padding: 20px;
    }
    
    .add-to-home-content h3 {
        font-size: 1.2em;
    }
    
    .add-to-home-content p {
        font-size: 0.9em;
    }
    
    .step {
        margin-bottom: 12px;
    }
    
    .step span:last-child {
        font-size: 0.85em;
    }
    
    .add-to-home-buttons {
        flex-direction: column;
    }
    
    .add-to-home-buttons .btn {
        max-width: none;
    }
}

/* Styles pour les matchs récents - design simplifié */
.match-item .match-winner {
    background: #fef3c7;
    color: #92400e !important;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #fbbf24;
}

.match-item .match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.match-item .team-result {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.match-item .team-result.winner {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
}

.match-item .team-result.loser {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.match-item .team-name {
    font-weight: 500;
    font-size: 0.85em;
    margin-bottom: 2px;
    text-align: center;
    color: #374151 !important;
}

.match-item .team-score {
    font-size: 1.1em;
    font-weight: 600;
}

.match-item .vs-separator {
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive pour l'historique et les matchs récents */
@media (max-width: 768px) {
    .match-history {
        margin-top: 20px;
    }
    
    .match-item .match-teams {
        flex-direction: column;
        gap: 8px;
    }
    
    .match-item .vs-separator {
        order: -1;
        margin-bottom: 8px;
    }
    
    .match-item .team-result {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 12px;
    }
    
    .match-item .team-name {
        margin-bottom: 0;
        text-align: left;
    }
    
    .match-item .team-score {
        font-size: 1.1em;
    }
    
    .history-header {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .history-stats {
        padding: 12px 16px;
    }
    
    .stats-summary {
        flex-direction: row;
        gap: 8px;
        text-align: center;
    }
    
    .stats-summary .separator {
        display: none;
    }
    
    .history-matches {
        width: 100%;
    }
    
    .history-match {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .match-players {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .team-name {
        font-size: 0.9em;
        word-break: break-word;
    }
    
    .match-score {
        width: 100%;
        justify-content: center;
    }
    
    .score {
        font-size: 1.2em;
        padding: 6px 12px;
        min-width: 40px;
        flex: 0 0 auto;
    }
    
    .match-winner {
        font-size: 1.1em;
        word-break: break-word;
        margin: 12px 0;
        padding: 6px 12px;
    }
    
    .history-toggle-btn {
        width: 100%;
        margin-top: 16px;
    }
}