.team-leaderboard-section {
    padding: 1rem 0;
    position: relative;
}

.team-leaderboard-section::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%);
    opacity: 0.7;
}

.team-battle-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.battle-cards {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.battle-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--card-color);
}

.battle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--card-color) 0%, var(--card-color-light) 100%);
}

.team-caro { --card-color: #FF8C42; --card-color-light: #FFB366; }
.team-broco { --card-color: #2E8B57; --card-color-light: #3CB371; }

.battle-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
}

.card-content { display: flex; align-items: center; gap: 1.5rem; }
.team-caro .card-content { flex-direction: row; }
.team-broco .card-content { flex-direction: row-reverse; }

.team-mascot {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
    transition: transform 0.3s ease;
}

.battle-card:hover .team-mascot { transform: scale(1.1) rotate(-3deg); }
.team-mascot img { width: 100%; height: 100%; object-fit: contain; }
.team-info { flex: 1; }
.team-caro .team-info { text-align: left; }
.team-broco .team-info { text-align: right; }

.team-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-caro h3 { color: #FF8C42; }
.team-broco h3 { color: #2E8B57; }

.team-score {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.team-caro .team-score {
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-broco .team-score {
    background: linear-gradient(135deg, #2E8B57 0%, #228B22 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-label { color: var(--text-light); font-size: 0.9rem; font-weight: 500; margin-bottom: 0.75rem; }

.team-members {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.team-caro .team-members { background: rgba(255, 140, 66, 0.15); color: #FF8C42; }
.team-broco .team-members { background: rgba(46, 139, 87, 0.15); color: #2E8B57; }

.vs-badge { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.vs-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #FF8C42 0%, #2E8B57 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.4rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    animation: pulse 2s infinite;
    border: 4px solid white;
}

.leader-arrow { font-size: 2.5rem; animation: bounce 1s infinite; }
.tie-badge { font-size: 2rem; }

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

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

.progress-battle {
    display: flex;
    height: 55px;
    background: #f0f0f0;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: inset 0 3px 15px rgba(0,0,0,0.12), 0 4px 15px rgba(0,0,0,0.08);
}

.progress-bar-caro,
.progress-bar-broco {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    transition: width 1s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.progress-bar-caro { background: linear-gradient(90deg, #FF8C42 0%, #FFB366 100%); }
.progress-bar-broco { background: linear-gradient(90deg, #2E8B57 0%, #3CB371 100%); }

/* Visualisation croissance kawaii */
.growth-visualization {
    margin-top: 2rem;
    background: linear-gradient(180deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: center;
}

.growth-title { font-weight: 700; color: var(--primary-green); margin-bottom: 1rem; font-size: 1.1rem; }

.growth-garden {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: flex-end;
}

.growth-plant {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.plant-emoji {
    animation: plant-bounce ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    margin-bottom: 0.5rem;
}

@keyframes plant-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.plant-ground {
    width: 100%;
    height: 12px;
    background: #D7CCC8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.plant-growth-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF8C42, #FFB366);
    border-radius: 6px;
    transition: width 1.5s ease;
}

.plant-growth-bar.broco-bar { background: linear-gradient(90deg, #2E8B57, #3CB371); }
.plant-name { font-weight: 600; font-size: 0.9rem; }

@media (max-width: 768px) {
    .team-leaderboard-section { padding: 0.5rem 0; }
    .team-leaderboard-section h2 { font-size: 1.5rem !important; }
    .team-leaderboard-section p { font-size: 0.85rem !important; }
    .battle-cards { grid-template-columns: 1fr; gap: 0.75rem; }
    .battle-card { padding: 1rem 1.2rem; border-radius: 18px; }

    .vs-badge {
        order: 0;
        margin: auto;
        flex-direction: row;
        margin-bottom: 0.75rem;
    }

    .vs-circle { width: 50px; height: 50px; font-size: 1rem; }
    .leader-arrow { font-size: 1.8rem; }
    .card-content { flex-direction: column !important; text-align: center; }
    .team-caro .team-info, .team-broco .team-info { text-align: center; }
    .team-mascot { width: 90px; height: 90px; margin: 0 auto; }
    .team-score { font-size: 2.5rem; }
    .team-info h3 { font-size: 1.1rem; }
    .team-label { font-size: 0.8rem; }
    .team-members { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    .progress-battle { height: 42px; border-radius: 15px; }
    .progress-bar-caro, .progress-bar-broco { font-size: 0.9rem; }
    .progress-bar-caro { border-radius: 15px 0 0 15px; }
    .progress-bar-broco { border-radius: 0 15px 15px 0; }
    .growth-visualization { padding: 1rem 1.2rem; border-radius: 15px; margin-top: 1.5rem; }
    .growth-title { font-size: 0.95rem; }
    .growth-garden { gap: 1.5rem; }
    .growth-plant { min-width: 80px; }
    .plant-name { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .battle-card { padding: 0.75rem 1rem; }
    .team-mascot { width: 70px; height: 70px; }
    .team-score { font-size: 2rem; }
    .team-info h3 { font-size: 1rem; }
    .vs-circle { width: 42px; height: 42px; font-size: 0.9rem; }
    .progress-battle { height: 36px; }
    .progress-bar-caro, .progress-bar-broco { font-size: 0.8rem; }
}
