/**
 * Styles CAN 2025 Manager
 * Style inspiré du design moderne des compétitions sportives
 */

/* Import des drapeaux */
@import url('https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.6.6/css/flag-icons.min.css');

/* Variables CSS */
:root {
    --can-primary: #00563f;
    --can-secondary: #d4af37;
    --can-live: #ff3333;
    --can-border: #e0e0e0;
    --can-bg: #f8f8f8;
    --can-card-bg: #ffffff;
    --can-text: #333333;
    --can-text-light: #666666;
}

/* Container principal */
.can2025-full-view {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--can-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.can2025-header {
    background: var(--can-primary);
    color: white;
    padding: 20px;
    text-align: center;
}

.can2025-header h2 {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Navigation des phases */
.can2025-navigation {
    background: white;
    border-bottom: 2px solid var(--can-border);
    display: flex;
    overflow-x: auto;
    padding: 0;
}

.phase-nav {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--can-text-light);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.phase-nav:hover {
    background: var(--can-bg);
    color: var(--can-primary);
}

.phase-nav.active {
    color: var(--can-primary);
    background: var(--can-bg);
}

.phase-nav.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--can-primary);
}

/* Layout principal */
.can2025-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 0;
    min-height: 600px;
}

.can2025-main {
    padding: 20px;
    background: var(--can-bg);
}

.can2025-sidebar {
    background: #1a2332;
    color: white;
    border-left: 2px solid var(--can-border);
}

/* Navigation des groupes */
.groups-navigation {
    display: flex;
    flex-direction: column;
    background: #0f1419;
    padding: 10px;
}

.group-nav {
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.group-nav:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.group-nav.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--can-secondary);
}

/* Match en direct */
.can2025-live-match {
    background: linear-gradient(135deg, #2c1f3f 0%, #1a1a2e 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 51, 51, 0.3);
}

.can2025-live-match::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--can-live) 0%, #ff6666 100%);
}

.live-badge {
    display: inline-block;
    background: var(--can-live);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.live-match-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: white;
}

.live-match-score .team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.live-match-score .home-team {
    justify-content: flex-end;
    text-align: right;
}

.live-match-score .away-team {
    justify-content: flex-start;
    text-align: left;
}

.live-match-score .flag-icon {
    font-size: 2em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.live-match-score .team-name {
    font-size: 1.4em;
    font-weight: 700;
}

.live-match-score .score {
    font-size: 3em;
    font-weight: 900;
    color: var(--can-secondary);
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.5);
}

.live-match-score .match-separator {
    text-align: center;
}

.live-match-score .current-minute {
    font-size: 1.2em;
    color: var(--can-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

/* Événements du match */
.match-events {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.match-events .event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: white;
}

.match-events .event.home-team {
    justify-content: flex-end;
    text-align: right;
}

.match-events .event-icon {
    font-size: 1.3em;
}

.match-events .event-player {
    font-weight: 600;
    flex: 1;
}

.match-events .event-minute {
    font-weight: 700;
    color: var(--can-secondary);
    font-size: 0.9em;
}

/* Liste des matchs */
.can2025-matches-list {
    display: grid;
    gap: 15px;
}

.can2025-match-card {
    background: var(--can-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.can2025-match-card.match-live {
    border-left: 4px solid var(--can-live);
}

.can2025-match-card.match-finished {
    opacity: 0.85;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--can-bg);
    font-size: 12px;
    color: var(--can-text-light);
}

.match-status {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: #e0e0e0;
}

.match-status.live,
.match-status.half-time {
    background: var(--can-live);
    color: white;
    animation: pulse 2s infinite;
}

.match-status.finished {
    background: #4caf50;
    color: white;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px;
    gap: 15px;
}

.match-teams .team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-teams .home-team {
    justify-content: flex-end;
}

.match-teams .away-team {
    justify-content: flex-start;
}

.match-teams .flag-icon {
    font-size: 1.8em;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.match-teams .team-name {
    font-weight: 600;
    font-size: 1.1em;
}

.match-teams .score {
    font-size: 2em;
    font-weight: 900;
    color: var(--can-primary);
}

.match-teams .match-separator {
    font-size: 1.2em;
    color: var(--can-text-light);
    font-weight: 300;
}

/* Classements */
.can2025-standings {
    padding: 20px;
}

.can2025-standings-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.can2025-standings-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.can2025-standings-table th {
    padding: 12px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.can2025-standings-table td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.can2025-standings-table tbody tr:last-child td {
    border-bottom: none;
}

.can2025-standings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.can2025-standings-table .team-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.can2025-standings-table .flag-icon {
    font-size: 1.2em;
    border-radius: 2px;
}

.can2025-standings-table strong {
    font-size: 1.1em;
    color: var(--can-secondary);
}

/* Message si pas de match en direct */
.no-live-match {
    background: var(--can-card-bg);
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    color: var(--can-text-light);
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 1024px) {
    .can2025-content {
        grid-template-columns: 1fr;
    }
    
    .can2025-sidebar {
        border-left: none;
        border-top: 2px solid var(--can-border);
    }
    
    .groups-navigation {
        flex-direction: row;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .can2025-navigation {
        overflow-x: auto;
    }
    
    .phase-nav {
        font-size: 12px;
        padding: 12px 15px;
    }
    
    .live-match-score {
        flex-direction: column;
        gap: 15px;
    }
    
    .live-match-score .team {
        width: 100%;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 10px;
    }
    
    .match-teams .team {
        width: 100%;
        justify-content: center !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.can2025-match-card,
.can2025-live-match {
    animation: fadeIn 0.5s ease;
}
