/* =========================================
   STYLES POUR LES PANELS D'ACCUEIL OFFLINE
   ========================================= */

/* Conteneur principal des panels */
#panels-container {
    display: flex;
    gap: 2vw;
    max-width: 90vw;
    margin: 4vh auto 1vh;
    justify-content: center;
    flex-wrap: wrap;
}

/* Style général des panels */
.panel {
    background: linear-gradient(135deg, #243a64 0%, #1e2f52 100%);
    border: 2px solid rgb(156, 160, 50);
    border-radius: 12px;
    padding: 1.5vh 1.5vw;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgb(156, 160, 50), rgb(136, 139, 40), rgb(156, 160, 50));
}

/* Panel News */
#panel-news {
    flex: 1;
    min-width: 350px;
    max-width: 500px;
    min-height: 220px;
    padding: 1.5vh 1.5vw;
}

.panel-title {
    color: #e6e6e6;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1vh;
    padding-bottom: 0.8vh;
    border-bottom: 1px solid rgb(156, 160, 50);
    text-align: center;
}

/* Liste des news */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgb(156, 160, 50) rgba(255, 255, 255, 0.05);
}

.news-item {
    padding: 0.5vh 0.8vw;
    margin-bottom: 0.5vh;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgb(156, 160, 50);
    border-radius: 4px;
    color: #CCCDD0;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: background 0.2s ease;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

#majlink {
    color: rgb(156, 160, 50);
    font-weight: bold;
    font-size: 0.8rem;
}

.news-text {
    margin-top: 0.3vh;
}

.last-maj-info {
    color: rgb(156, 160, 50);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5vh;
    padding-bottom: 1vh;
    border-bottom: 1px solid rgba(156, 160, 50, 0.3);
    font-style: italic;
}

.no-news {
    text-align: center;
    color: #CCCDD0;
    padding: 3vh 1vw;
    font-style: italic;
}
/* =========================================
   PANEL CLASSEMENT (CAROUSEL)
   ========================================= */

#panel-ranking {
    flex: 1;
    min-width: 450px;
    max-width: 600px;
    min-height: 220px;
    padding: 1.5vh 1.5vw;
}

/* Carousel container */
.carousel-container {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.carousel-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Titre de la ligue */
.league-title {
    color: #e6e6e6;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1vh;
    padding-bottom: 0.8vh;
    border-bottom: 1px solid rgb(156, 160, 50);
}

/* Tableau de classement */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    color: #CCCDD0;
    font-size: 0.85rem;
}

.ranking-table th {
    background: rgba(156, 160, 50, 0.2);
    color: #e6e6e6;
    padding: 0.5vh 0.4vw;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid rgb(156, 160, 50);
}

.ranking-table td {
    padding: 0.4vh 0.4vw;
    border-bottom: 1px solid rgba(156, 160, 50, 0.3);
}

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

.rank-col {
    width: 15%;
    text-align: center;
    font-weight: bold;
}

.nation-col {
    width: 25%;
    text-align: center;
}

.team-col {
    width: 40%;
    text-align: center;
}

.stats-col {
    width: 20%;
    text-align: center;
}

/* Drapeau */
.drapeau {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Message prochain match */
.next-match-info {
    margin-top: 1vh;
    padding-top: 0.8vh;
    border-top: 1px solid rgb(156, 160, 50);
    text-align: center;
    color: #e6e6e6;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Indicateurs du carousel */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5vw;
    margin-top: 1vh;
    padding-top: 0.8vh;
    border-top: 1px solid rgba(156, 160, 50, 0.3);
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(156, 160, 50, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicator:hover {
    background: rgba(156, 160, 50, 0.6);
    transform: scale(1.2);
}

.indicator.active {
    background: rgb(156, 160, 50);
    border-color: #e6e6e6;
    box-shadow: 0 0 8px rgba(156, 160, 50, 0.6);
}

/* Boutons de navigation (optionnels) */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(156, 160, 50, 0.7);
    color: #e6e6e6;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgb(156, 160, 50);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -15px;
}

.carousel-btn.next {
    right: -15px;
}


/* =========================================
   RESPONSIVE MOBILE
   ========================================= */

@media screen and (max-width: 768px) {
    #panels-container {
        flex-direction: column;
        align-items: center;
        gap: 3vh;
    }
    
    #panel-news,
    #panel-ranking {
        min-width: 85vw;
        max-width: 90vw;
        min-height: auto;
    }
    
    .carousel-btn {
        display: none;
    }
    
    .ranking-table {
        font-size: 0.8rem;
    }
    
    .drapeau {
        width: 20px;
        height: 14px;
    }
}

/* Scrollbar custom pour les news */
.news-list::-webkit-scrollbar {
    width: 6px;
}

.news-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.news-list::-webkit-scrollbar-thumb {
    background: rgb(156, 160, 50);
    border-radius: 3px;
}

.news-list::-webkit-scrollbar-thumb:hover {
    background: rgb(136, 139, 40);
}

/* Message d'erreur pour classement */
.no-ranking-data {
    text-align: center;
    color: #CCCDD0;
    padding: 3vh 1vw;
    font-style: italic;
}