/* CSS SPÉCIFIQUE PAGE TOURNOIS */

/* Variables héritées du common.css */
/* On utilise les mêmes couleurs que le reste du site */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.7;
}

/* Header - utilise le header commun du site */

/* Main */
.tournois-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 6rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    background: radial-gradient(circle at 50% 50%, rgba(212, 165, 116, 0.05) 0%, transparent 60%);
    border-radius: 20px;
    margin-bottom: 3rem;
    border: 1px solid rgba(212, 165, 116, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 165, 116, 0.03) 0%, transparent 60%);
    animation: pulse-glow 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 2px 20px rgba(212, 165, 116, 0.3);
}

.hero-section p {
    font-size: 1.3rem;
    color: var(--color-text-secondary);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: 0 15px 50px rgba(212, 165, 116, 0.3);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(212, 165, 116, 0.5));
    transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(212, 165, 116, 0.8));
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-family: Georgia, serif;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 1rem;
}



/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--color-bg-card);
    border: 2px solid rgba(212, 165, 116, 0.3);
    border-radius: 50px;
    color: var(--color-text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.3);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-dark);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.5);
}

/* Tournaments Grid */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tournament-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    transform: scaleX(0);
    transition: 0.5s ease;
}

.tournament-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 50px rgba(212, 165, 116, 0.3);
    border-color: var(--color-primary);
}

.tournament-card:hover::before {
    transform: scaleX(1);
}

.tournament-header {
    margin-bottom: 1.5rem;
}

.tournament-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-family: Georgia, serif;
}

.tournament-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid;
}

.status-open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: #22c55e;
}

.status-ongoing {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: #fb923c;
}

.status-finished {
    background: rgba(212, 165, 116, 0.2);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.tournament-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-label {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.tournament-description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tournament-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

.progress-bar {
    flex: 1;
    margin-right: 1rem;
}

.progress-label {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.progress-track {
    height: 8px;
    background: rgba(212, 165, 116, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.view-btn {
    padding: 0.6rem 1.5rem;
    background: var(--color-primary);
    border: none;
    border-radius: 50px;
    color: var(--color-bg-dark);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.view-btn:hover::before {
    width: 300px;
    height: 300px;
}

.view-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.5);
    background: var(--color-primary-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.5;
}

.empty-state h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.empty-state p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-bg-medium);
    border-radius: 20px;
    border: 2px solid var(--color-primary);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
}

.modal-header h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    font-family: Georgia, serif;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--color-primary);
    background: rgba(212, 165, 116, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.tournament-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.detail-label {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-value {
    display: block;
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.detail-description {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.detail-description h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.detail-description p {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid rgba(212, 165, 116, 0.2);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--color-primary);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Participants List */
.participants-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.participant-item {
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.participant-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

/* Bracket View */
.bracket-view {
    padding: 1rem;
    overflow-x: auto;
}

.bracket-round {
    margin-bottom: 2rem;
}

.bracket-round h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bracket-match {
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.bracket-player {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    margin: 0.3rem 0;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 5px;
}

.bracket-player.winner {
    background: rgba(34, 197, 94, 0.2);
    font-weight: 700;
    color: #22c55e;
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 165, 116, 0.2);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    border-color: var(--color-primary);
    transform: translateX(5px);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    font-family: Georgia, serif;
}

.leaderboard-rank.rank-1 { color: #FFD700; }
.leaderboard-rank.rank-2 { color: #C0C0C0; }
.leaderboard-rank.rank-3 { color: #CD7F32; }

.leaderboard-name {
    font-weight: 600;
}

.leaderboard-stats {
    display: flex;
    gap: 1rem;
    color: var(--color-text-secondary);
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid rgba(212, 165, 116, 0.3);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg-dark);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.4);
}

/* Footer - utilise le footer commun du site */

/* Responsive */
@media (max-width: 768px) {
    .tournois-main {
        padding: 1rem;
        padding-top: 5rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tournaments-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}