/**
 * Styles pour l'affichage frontend
 * Fichier: assets/css/frontend.css
 */

/* === CONTENEURS PRINCIPAUX === */
.poker-ranking-container,
.poker-upcoming-container,
.poker-recent-results-container,
.poker-player-stats-container,
.poker-season-info-container,
.poker-championships-container {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* === TITRES === */
.poker-ranking-title,
.poker-section-title,
.poker-season-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 3px solid #2271b1;
    padding-bottom: 10px;
}

.poker-ranking-subtitle,
.poker-season-dates {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

/* === TABLEAUX === */
.poker-ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.poker-ranking-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.poker-ranking-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poker-ranking-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.poker-ranking-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* === COLONNES === */
.poker-col-position {
    width: 80px;
    text-align: center !important;
}

.poker-col-points {
    width: 120px;
    text-align: right !important;
}

.poker-col-tournaments,
.poker-col-avg {
    width: 100px;
    text-align: center !important;
}

.poker-col-player {
    font-weight: 500;
}

/* === PODIUM === */
.poker-podium-1 {
    background: linear-gradient(to right, #fff9e6 0%, #ffffff 100%);
    border-left: 4px solid #ffd700;
}

.poker-podium-2 {
    background: linear-gradient(to right, #f5f5f5 0%, #ffffff 100%);
    border-left: 4px solid #c0c0c0;
}

.poker-podium-3 {
    background: linear-gradient(to right, #fff4e6 0%, #ffffff 100%);
    border-left: 4px solid #cd7f32;
}

.poker-medal {
    font-size: 24px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

/* === CARTES TOURNOIS === */
.poker-tournaments-list,
.poker-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.poker-tournament-card,
.poker-result-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.poker-tournament-card:hover,
.poker-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.poker-tournament-header,
.poker-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.poker-tournament-header h4,
.poker-result-header h4 {
    margin: 0;
    font-size: 18px;
    color: #1a1a1a;
}

.poker-tournament-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.poker-status-upcoming {
    background: #e3f2fd;
    color: #1976d2;
}

.poker-status-ongoing {
    background: #e8f5e9;
    color: #388e3c;
}

.poker-status-completed {
    background: #f5f5f5;
    color: #757575;
}

.poker-tournament-info p,
.poker-result-players {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.poker-tournament-date {
    color: #999;
    font-size: 13px;
}

.poker-result-winner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fffbf0;
    border-radius: 6px;
    margin: 10px 0;
    border-left: 3px solid #ffd700;
}

.poker-result-winner strong {
    font-size: 16px;
    color: #1a1a1a;
}

.poker-points {
    color: #666;
    font-size: 14px;
}

/* === STATISTIQUES JOUEUR === */
.poker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.poker-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.poker-stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.poker-stat-box:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.poker-stat-box:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.poker-stat-box:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.poker-stat-box:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.poker-stat-box:nth-child(6) {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.poker-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.poker-stat-label {
    font-size: 13px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === INFORMATIONS SAISON === */
.poker-season-info-container {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.poker-season-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    font-size: 28px;
}

.poker-season-dates {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

.poker-season-championships {
    font-size: 18px;
    margin-top: 15px;
}

/* === LISTE CHAMPIONNATS === */
.poker-championships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.poker-championship-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.poker-championship-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    transform: translateY(-3px);
}

.poker-championship-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #1a1a1a;
}

.poker-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.poker-championship-category {
    margin: 10px 0;
}

.poker-championship-season,
.poker-championship-tournaments {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.poker-championship-description {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* === MESSAGES === */
.poker-error,
.poker-info {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.poker-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.poker-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
    .poker-ranking-table {
        font-size: 13px;
    }
    
    .poker-ranking-table th,
    .poker-ranking-table td {
        padding: 10px 8px;
    }
    
    .poker-medal {
        font-size: 18px;
    }
    
    .poker-ranking-title,
    .poker-section-title {
        font-size: 20px;
    }
    
    .poker-tournaments-list,
    .poker-results-list,
    .poker-championships-grid {
        grid-template-columns: 1fr;
    }
    
    .poker-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poker-stat-value {
        font-size: 28px;
    }
    
    /* Masquer certaines colonnes sur mobile */
    .poker-col-tournaments,
    .poker-col-avg {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .poker-ranking-container,
    .poker-upcoming-container,
    .poker-recent-results-container,
    .poker-player-stats-container,
    .poker-season-info-container,
    .poker-championships-container {
        padding: 15px;
    }
    
    .poker-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .poker-tournament-header,
    .poker-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.poker-ranking-container,
.poker-tournament-card,
.poker-result-card,
.poker-championship-card {
    animation: fadeIn 0.5s ease-out;
}

.poker-rank-row {
    transition: all 0.2s ease;
}

.poker-rank-row:hover {
    background-color: #f9f9f9 !important;
}

/* === IMPRESSION === */
@media print {
    .poker-ranking-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .poker-tournament-card,
    .poker-result-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .poker-stat-box {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
}

/* === ACCESSIBILITÉ === */
.poker-ranking-table:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.poker-tournament-card:focus,
.poker-result-card:focus,
.poker-championship-card:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* === THÈME SOMBRE (optionnel) === */
@media (prefers-color-scheme: dark) {
    .poker-ranking-container,
    .poker-upcoming-container,
    .poker-recent-results-container,
    .poker-player-stats-container,
    .poker-championships-container {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .poker-ranking-title,
    .poker-section-title {
        color: #ffffff;
        border-bottom-color: #4a9eff;
    }
    
    .poker-ranking-table thead {
        background: #2a2a2a;
    }
    
    .poker-ranking-table th {
        color: #e0e0e0;
    }
    
    .poker-ranking-table td {
        border-bottom-color: #333;
    }
    
    .poker-ranking-table tbody tr:hover {
        background-color: #252525;
    }
    
    .poker-tournament-card,
    .poker-result-card,
    .poker-championship-card {
        background: #2a2a2a;
        border-color: #404040;
    }
    
    .poker-tournament-card:hover,
    .poker-result-card:hover,
    .poker-championship-card:hover {
        border-color: #4a9eff;
    }
}