/* ========================================== */
/* ===== GROUPES - DESIGN COMPLET ===== */
/* ========================================== */

:root {
    --wc-red: #E4002B;
    --wc-blue: #00205B;
    --wc-green: #00A651;
    --wc-gold: #FFD700;
    --wc-light-blue: #00A3E0;
}

/* ===== GRILLE DES GROUPES ===== */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(900px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 1200px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CARTE DE GROUPE ===== */
.group-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(44, 95, 127, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(91, 164, 207, 0.08);
    animation: fadeInScale 0.6s ease-out;
}

.group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(91, 164, 207, 0.15);
    border-color: rgba(91, 164, 207, 0.2);
}

/* ===== EN-TÊTE DU GROUPE ===== */
.group-header {
    background: linear-gradient(135deg, #1E40AF 0%, #0891B2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

/* ===== CONTENU DU GROUPE ===== */
.group-content {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr;
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .group-content {
        grid-template-columns: 1fr;
    }
}

/* ===== MATCHS DU GROUPE ===== */
.group-matches {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-match {
    background: #F7FAFC;
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.group-match:hover {
    background: #EBF5FB;
    border-left-color: var(--wc-secondary, #5BA4CF);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(91, 164, 207, 0.08);
}

.group-match.completed {
    border-left-color: var(--wc-success, #4CAF80);
    background: linear-gradient(90deg, rgba(76, 175, 128, 0.04) 0%, #F7FAFC 100%);
}

.score-warning {
    color: #dc3545;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    padding: 0.15rem 0.4rem;
    background: rgba(220, 53, 69, 0.08);
    border-radius: 4px;
    width: 100%;
}

/* ===== BADGE JOURNÉE ===== */
.match-day {
    background: linear-gradient(135deg, #1E40AF 0%, #0891B2 100%);
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 20px;
    min-width: 40px;
    text-align: center;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
}

/* ===== ÉQUIPES ET SCORES ===== */
.match-teams {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.team-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--wc-dark, #0F172A);
    min-width: 150px;
    max-width: 200px;
}

.team-name:first-child {
    text-align: right;
}

.team-name:last-child {
    text-align: left;
}

.score-input-small {
    width: 45px;
    height: 36px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    border: 2px solid #CBD5E1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--wc-dark, #0F172A);
    transition: all 0.3s ease;
    -moz-appearance: textfield;
}

.score-input-small::-webkit-outer-spin-button,
.score-input-small::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input-small:focus {
    border-color: var(--wc-accent, #F97316);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
    background: #FFF7ED;
}

.score-input-small:hover {
    border-color: var(--wc-secondary, #0891B2);
}

.score-input-small:disabled {
    background: #F8FAFC;
    cursor: not-allowed;
    opacity: 0.5;
}

.score-separator {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--wc-primary, #2563EB);
    margin: 0 0.25rem;
}

/* ===== CLASSEMENT DU GROUPE ===== */
.group-standings {
    padding: 0.75rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
}

.standings-table {
    width: 100%;
    font-size: 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
}

.standings-table thead {
    background: linear-gradient(135deg, #1E40AF 0%, #0891B2 100%);
    color: white;
}

.standings-table th {
    padding: 0.5rem 0.35rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standings-table td {
    padding: 0.4rem 0.25rem;
    text-align: center;
    border-bottom: 1px solid #E2E8F0;
    font-size: 0.75rem;
    color: var(--wc-dark, #0F172A);
}

.standings-table tbody tr:last-child td {
    border-bottom: none;
}

.standings-table td.text-start {
    text-align: left !important;
    padding-left: 0.5rem;
    font-weight: 600;
}

.standings-table tr.qualified {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.1) 0%, #ffffff 100%);
}

.standings-table tr.qualified td:first-child {
    border-left: 3px solid var(--wc-success, #059669);
    font-weight: 700;
    color: var(--wc-success, #059669);
}

.standings-table tr:hover {
    background: rgba(8, 145, 178, 0.06);
}

.standings-table tbody tr {
    transition: all 0.2s ease;
}

.standings-table tbody tr:hover {
    transform: scale(1.01);
}

/* ===== COLONNES EX-AEQUO ===== */
.standings-table .h2h-header {
    background: rgba(255, 255, 255, 0.15);
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.standings-table .h2h-col {
    border-left: 2px solid #CBD5E1;
    background: rgba(30, 64, 175, 0.04);
    color: #1E40AF;
    font-size: 0.7rem;
}

.standings-table .h2h-col:first-of-type {
    border-left: 2px solid #93C5FD;
}

.standings-table thead .h2h-col {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .group-header {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
    }
    
    .group-content {
        padding: 0.75rem;
    }
    
    .team-name {
        font-size: 0.75rem;
    }
    
    .score-input-small {
        width: 40px;
        height: 32px;
        font-size: 1rem;
    }
    
    .standings-table {
        font-size: 0.65rem;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 0.4rem 0.15rem;
    }
}

/* ===== ANIMATION DES GROUPES ===== */
.group-card {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== ÉTATS SPÉCIAUX ===== */
.group-match.locked {
    opacity: 0.7;
    pointer-events: none;
}

.group-match.locked::after {
    content: '??';
    margin-left: 0.5rem;
}
