/* ======================
   CARTES ÉQUIPES SPLIT SCREEN - Option 5
====================== */
.teams-overlay{
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding: 0 20px;
    min-height: 500px;
    overflow: visible;
}

/* Grille des équipes à gauche */
.teams-grid{
    flex: 0 0 40%;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-content: flex-start;
}

/* Panel de détails à droite */
.team-details-panel{
    flex: 1;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    background: linear-gradient(145deg, rgba(12,18,34,0.95), rgba(8,12,24,0.98));
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    overflow-y: auto;
    transition: all 0.5s ease;
}

.team-details-panel.empty{
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 60px 40px;
}

.team-details-panel.empty::before{
    content: '👈 Sélectionne une équipe';
    font-size: 1.5rem;
}

/* Cartes miniatures */
.team-card-3d{
    width: calc(50% - 8px);
    height: 180px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.team-card-3d.show{
    opacity: 1;
    transform: translateX(0);
}

.team-card-inner{
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Barre horizontale colorée en haut */
.team-card-inner::before{
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    top: 0;
    height: 4px;
    background: var(--badge-color, #00eaff);
    border-radius: 0 0 4px 4px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

/* Pattern décoratif en bas à droite */
.team-card-inner::after{
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--badge-color, #00eaff) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.1;
    transition: all 0.3s ease;
}

.team-card-3d:hover .team-card-inner{
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border-color: var(--badge-color, #00eaff);
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.5),
        0 0 30px var(--badge-color, #00eaff);
}

.team-card-3d:hover .team-card-inner::before{
    opacity: 0.8;
    height: 5px;
    left: 10%;
    right: 10%;
    box-shadow: 0 0 10px var(--badge-color, #00eaff);
}

.team-card-3d:hover .team-card-inner::after{
    opacity: 0.2;
    transform: rotate(45deg);
}

/* Badge - simple cercle avec bordure fine */
.team-badge-3d{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.badge-front{
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.badge-back{
    display: none;
}

.team-card-3d:hover .team-badge-3d{
    border-color: var(--badge-color, #00eaff);
}

.team-card-3d:hover .badge-front{
    color: var(--badge-color, #00eaff);
}

.team-name-3d{
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    line-height: 1.2;
}

/* Indicateur de sélection */
.team-glow{
    position: absolute;
    inset: -2px;
    border-radius: 15px;
    border: 3px solid var(--badge-color, #00eaff);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Carte active = bordure fixe */
.team-card-3d.active .team-glow{
    opacity: 1;
}

.team-card-3d.active .team-card-inner{
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
    border-color: var(--badge-color, #00eaff);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.6),
        0 0 40px var(--badge-color, #00eaff);
}

/* Contenu du panel de détails */
.detail-header{
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight{
    from{
        opacity: 0;
        transform: translateX(30px);
    }
    to{
        opacity: 1;
        transform: translateX(0);
    }
}

.detail-badge{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--badge-color, #00eaff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 
        0 0 40px var(--badge-color, #00eaff),
        inset 0 -5px 15px rgba(0,0,0,0.3);
    animation: zoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn{
    from{
        transform: scale(0);
    }
    to{
        transform: scale(1);
    }
}

.detail-info{
    flex: 1;
}

.detail-name{
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.2;
    animation: slideInRight 0.5s ease 0.1s backwards;
}

.detail-color{
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    animation: slideInRight 0.5s ease 0.2s backwards;
}

/* Liste des joueurs dans le panel */
.team-players{
    text-align: left;
    font-size: 1.1rem;
    line-height: 2rem;
    animation: slideInRight 0.5s ease 0.3s backwards;
}

.team-players-title{
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--badge-color, #00eaff);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.player-item{
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border-left: 3px solid var(--badge-color, #00eaff);
    transition: all 0.3s ease;
}

.player-item:hover{
    background: rgba(0,0,0,0.5);
    transform: translateX(5px);
}

/* Autres cartes non active */
.team-card-3d.hide{
    opacity: 0.5;
}

/* PAGE MOBILE POUR ÉQUIPES - LISTE SIMPLE */
.team-page-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0a0e1a, #12182e);
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.team-page-mobile.active {
    right: 0;
    display: block;
}

.team-page-header {
    position: sticky;
    top: 0;
    background: rgba(10,14,26,0.98);
    backdrop-filter: blur(15px);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.team-page-back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.team-page-back-btn:active {
    background: rgba(255,255,255,0.25);
    transform: scale(0.9);
}

.team-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    flex: 1;
}

/* LISTE DES ÉQUIPES */
.team-page-list {
    padding: 15px;
}

.team-list-item {
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

.team-list-item.active {
    background: rgba(255,255,255,0.06);
    border-color: var(--badge-color);
    box-shadow: 0 0 20px rgba(0,234,255,0.2);
}

.team-list-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.team-list-header:active {
    background: rgba(255,255,255,0.05);
}

.team-list-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--badge-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--badge-color);
}

.team-list-info {
    flex: 1;
}

.team-list-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.team-list-count {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.team-list-arrow {
    font-size: 1.8rem;
    color: rgba(255,255,255,0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.team-list-item.active .team-list-arrow {
    transform: rotate(90deg);
    color: var(--badge-color);
}

.team-list-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.team-list-item.active .team-list-content {
    max-height: 1000px;
    padding: 0 18px 18px 18px;
}

.team-list-player {
    padding: 12px 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border-left: 3px solid var(--badge-color);
    margin-bottom: 8px;
    color: white;
    font-size: 0.95rem;
}

.team-list-player:last-child {
    margin-bottom: 0;
}

/* ANCIENS STYLES PAGE (gardés pour desktop) */

/* MODAL MOBILE POUR ÉQUIPES */
.team-modal-mobile{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.team-modal-mobile.active{
    opacity: 1;
    pointer-events: auto;
}

.team-modal-content{
    width: 92%;
    max-width: 500px;
    max-height: 90vh;
    background: linear-gradient(145deg, rgba(20,30,50,0.98), rgba(12,18,34,0.98));
    border-radius: 20px;
    border: 2px solid var(--badge-color, rgba(255,255,255,0.2));
    padding: 30px 25px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    pointer-events: auto;
}

.team-modal-mobile.active .team-modal-content{
    transform: scale(1);
}

.modal-close-btn{
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close-btn:hover{
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-team-header{
    text-align: center;
    margin-bottom: 30px;
}

.modal-team-badge{
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--badge-color, #00eaff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 30px var(--badge-color, #00eaff);
}

.modal-team-name{
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.modal-team-color{
    font-size: 0.9rem;
    opacity: 0.7;
}

.modal-team-players{
    margin-top: 25px;
}

.modal-players-title{
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--badge-color, #00eaff);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-player-item{
    padding: 14px 18px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    border-left: 4px solid var(--badge-color, #00eaff);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.modal-player-item:hover{
    background: rgba(0,0,0,0.6);
    transform: translateX(5px);
}

/* MOBILE */
@media(max-width:900px){
    /* Afficher la page sur mobile */
    .team-page-mobile {
        display: block;
    }
    
    /* Cacher la modal et le panel sur mobile */
    .team-modal-mobile {
        display: none !important;
    }
    
    .team-details-panel{
        display: none !important;
    }
    
    .teams-overlay{
        flex-direction: column;
        gap: 15px;
        padding: 0 5px;
        margin-top: 15px;
    }
    
    .teams-grid{
        flex: none;
        width: 100%;
        gap: 12px;
    }
    
    .team-card-3d{
        width: calc(50% - 6px);
        height: 130px;
        transition: none;
    }
    
    .team-card-3d:active{
        transform: scale(0.95);
    }
    
    .team-badge-3d{
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .team-name-3d{
        font-size: 0.8rem;
        margin-top: 8px;
    }
}

@media(max-width:500px){
    .teams-overlay{
        padding: 0 5px;
    }
    
    .team-card-3d{
        width: 100%;
        height: 130px;
    }
    
    .team-modal-content{
        width: 95%;
        max-height: 92vh;
        padding: 25px 20px;
    }
    
    .modal-team-badge{
        width: 80px;
        height: 80px;
        font-size: 2.2rem;
    }
    
    .modal-team-name{
        font-size: 1.4rem;
    }
    
    .modal-player-item{
        padding: 12px 15px;
        font-size: 1rem;
    }
}
