/* ============================================================
   CLASSEMENT.CSS — HAC‑PRO ULTIMATE
   Popup + Onglets + Graphiques + Comparateur
============================================================ */

/* ------------------------------
   MODAL POPUP
------------------------------ */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.team-modal.open {
    display: flex;
}

.team-modal-content {
    background: #0d0f14;
    border: 1px solid #5cc8ff55;
    box-shadow: 0 0 25px #5cc8ff55;
    border-radius: 10px;
    width: 90%;
    max-width: 650px;
    max-height: 90%;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    animation: popupFade 0.25s ease-out;
}

@keyframes popupFade {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.team-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #5cc8ff;
    transition: 0.2s;
}

.team-modal-close:hover {
    color: #fff;
}

/* ------------------------------
   HEADER DU POPUP
------------------------------ */
.popup-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.popup-team-logo {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 2px solid #5cc8ff;
    box-shadow: 0 0 10px #5cc8ff55;
}

.popup-team-name {
    font-size: 26px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px #5cc8ff;
}

/* ------------------------------
   ONGLET NAVIGATION
------------------------------ */
.popup-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #1a1d24;
    border: 1px solid #5cc8ff55;
    color: #5cc8ff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.tab-btn:hover {
    background: #5cc8ff22;
}

.tab-btn.active {
    background: #5cc8ff;
    color: #000;
    font-weight: bold;
}

/* ------------------------------
   CONTENU DES ONGLET
------------------------------ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ------------------------------
   CARDS
------------------------------ */
.popup-card {
    background: #13161d;
    border: 1px solid #5cc8ff33;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 15px #5cc8ff22;
    margin-bottom: 20px;
}

.popup-card h3 {
    color: #5cc8ff;
    margin-bottom: 12px;
    text-shadow: 0 0 8px #5cc8ff;
}

/* ------------------------------
   LISTES DE STATS
------------------------------ */
.popup-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #5cc8ff22;
    color: #fff;
}

.popup-stats-list li span {
    color: #5cc8ff;
}

/* ------------------------------
   FORME (W/D/L)
------------------------------ */
.popup-form {
    display: flex;
    gap: 8px;
}

.form-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.form-dot.win { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.form-dot.draw { background: #ffcc00; box-shadow: 0 0 8px #ffcc00; }
.form-dot.loss { background: #ff4d4d; box-shadow: 0 0 8px #ff4d4d; }

/* ------------------------------
   HISTORIQUE
------------------------------ */
.popup-match-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-match-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #5cc8ff22;
    color: #fff;
}

.match-day {
    color: #5cc8ff;
    font-weight: bold;
}

.match-res.W { color: #00ff88; }
.match-res.D { color: #ffcc00; }
.match-res.L { color: #ff4d4d; }

/* ------------------------------
   COMPARATEUR
------------------------------ */
.compare-dropdown {
    position: relative;
    margin-bottom: 15px;
}

.btn-compare-toggle {
    background: #1a1d24;
    border: 1px solid #5cc8ff55;
    color: #5cc8ff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.compare-menu {
    display: none;
    position: absolute;
    background: #13161d;
    border: 1px solid #5cc8ff55;
    width: 100%;
    max-height: 180px;
    overflow-y: auto;
    border-radius: 6px;
    margin-top: 5px;
    z-index: 10;
}

.compare-menu.open {
    display: block;
}

.compare-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
}

.compare-item:hover {
    background: #5cc8ff22;
}

.compare-item.selected {
    background: #5cc8ff;
    color: #000;
    font-weight: bold;
}

.btn-compare {
    background: #5cc8ff;
    color: #000;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 10px;
}

.btn-compare:hover {
    background: #7cd8ff;
}

/* ------------------------------
   GRAPHIQUES (Chart.js)
------------------------------ */
#pointsChart,
#radarChart {
    width: 100% !important;
    max-width: 100%;
}

/* ------------------------------
   RESPONSIVE
------------------------------ */
@media (max-width: 600px) {
    .popup-team-name {
        font-size: 20px;
    }

    .popup-card {
        padding: 12px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ============================================================
   COMPARAISON — STATS
   ============================================================ */

.compare-stats {
    margin-top: 20px;
}

.stat-row {
    margin-bottom: 12px;
}

.stat-label {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--hac-blue);
}

.stat-bars {
    display: flex;
    height: 22px;
    background: #1a1d2e;
    border-radius: var(--hac-radius-md);
    overflow: hidden;
    border: 1px solid #333;
}

.bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 6px;
    font-size: 12px;
    font-weight: bold;
}

.bar-a {
    background: rgba(92,200,255,0.35);
    color: var(--hac-blue);
}

.bar-b {
    background: rgba(255,77,77,0.35);
    color: #ff4d4d;
}
/* ============================================================
   COMPARAISON — GRILLE PRINCIPALE
   ============================================================ */

.compare-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--hac-blue);
    text-align: center;
    font-weight: bold;
}

.compare-select-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.compare-select-wrapper select {
    flex: 1;
    padding: 10px;
    background: #111423;
    border: 1px solid var(--hac-blue);
    color: #fff;
    border-radius: var(--hac-radius-md);
}

.compare-btn {
    padding: 10px 18px;
    background: var(--hac-blue);
    color: #000;
    border: none;
    border-radius: var(--hac-radius-md);
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.compare-btn:hover {
    background: #8ee0ff;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    margin-bottom: 25px;
    text-align: center;
}

.team-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compare-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--hac-radius-md);
    margin-bottom: 10px;
    border: 2px solid var(--hac-blue);
    box-shadow: 0 0 10px var(--hac-blue);
}

.compare-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--hac-blue-light);
}

.compare-form {
    font-size: 20px;
    color: var(--hac-blue-light);
}

.vs-col {
    font-size: 26px;
    font-weight: bold;
    color: var(--hac-blue);
}
/* ============================================================
   COMPARAISON — ONGLET NAVIGATION
   ============================================================ */

.popup-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--hac-border);
    color: var(--hac-blue-meta);
    cursor: pointer;
    border-radius: var(--hac-radius-md);
    transition: 0.2s;
}

.tab-btn.active {
    background: var(--hac-blue);
    color: #0a1428;
    font-weight: 700;
    box-shadow: 0 0 10px var(--hac-blue);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}
/* ============================================================
   TABLEAU — HOVER
   ============================================================ */

.neon-table tbody tr {
    transition: 0.25s ease;
    cursor: default;
}

.neon-table tbody tr:hover {
    background: rgba(92, 200, 255, 0.12);
    transform: scale(1.01);
    box-shadow: 0 0 12px rgba(92, 200, 255, 0.35);
}

.match-row:hover .team-logo img {
    filter: drop-shadow(0 0 6px var(--hac-blue));
    transform: scale(1.05);
}

.team-clickable,
.team-click {
    cursor: pointer;
    transition: 0.25s ease;
}

.team-click:hover {
    color: var(--hac-blue);
    text-shadow: 0 0 8px var(--hac-blue);
}
/* ============================================================
   COMPARAISON — MENU & DROPDOWN
   ============================================================ */

.compare-dropdown {
    position: relative;
    margin-bottom: 12px;
}

.btn-compare-toggle {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--hac-border);
    color: var(--hac-blue-meta);
    border-radius: var(--hac-radius-md);
    cursor: pointer;
    text-align: left;
}

.compare-menu {
    display: none;
    position: absolute;
    top: 45px;
    left: 0; right: 0;
    background: rgba(10,20,40,0.95);
    border: 1px solid var(--hac-border);
    border-radius: var(--hac-radius-md);
    box-shadow: 0 0 12px rgba(92,200,255,0.25);
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
}

.compare-menu.open {
    display: block !important;
}

.compare-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(92,200,255,0.15);
}

.compare-item:hover {
    background: rgba(92,200,255,0.15);
}
/* ============================================================
   POPUP HAC-PRO V2
   ============================================================ */

.team-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.team-modal.open {
    display: flex;
}

.team-modal-content {
    background: rgba(10,20,40,0.95);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--hac-radius-lg);
    width: 70%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    border: 1px solid var(--hac-border-strong);
    box-shadow: 0 0 25px var(--hac-glow-soft);
    animation: popupZoom 0.25s ease;
}

/* Scroll interne */
.team-modal-content::-webkit-scrollbar {
    width: 8px;
}
.team-modal-content::-webkit-scrollbar-thumb {
    background: var(--hac-blue);
    border-radius: 4px;
}
.team-modal-content::-webkit-scrollbar-track {
    background: #1a1d2e;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupZoom {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Header */
.popup-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.popup-team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--hac-blue));
}

.popup-team-name {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Grid */
.popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Cards */
.popup-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--hac-border);
    padding: 20px;
    border-radius: var(--hac-radius-md);
    box-shadow: 0 0 12px rgba(92,200,255,0.15);
}

.popup-card h3 {
    margin-bottom: 12px;
    color: var(--hac-blue);
}

/* Stats list */
.popup-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(92,200,255,0.15);
}

/* Forme */
.popup-form {
    display: flex;
    gap: 10px;
}

.form-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(255,255,255,0.3);
}

.form-dot.win { background: #00ff88; }
.form-dot.loss { background: #ff4d4d; }
.form-dot.draw { background: #ffd93b; }

/* Mini chart */
.popup-mini-chart {
    margin-top: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    opacity: 0;
    transform: translateY(10px);
}

.popup-mini-chart.animate {
    transform: scale(1.05);
    opacity: 1;
}

/* Responsive popup */
@media (max-width: 768px) {
    .team-modal-content {
        width: 90%;
        padding: 20px;
    }

    .popup-grid {
        grid-template-columns: 1fr;
    }

    .popup-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .popup-team-name {
        font-size: 1.6rem;
    }

    .popup-stats-list li,
    .popup-match-list li {
        font-size: 0.9rem;
    }
}
/* ============================================================
   TABLEAU CLASSEMENT HAC PRO
   ============================================================ */
.ranking-container {
    overflow-x: auto;
    margin-top: 15px;
}

.neon-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hac-bg-section);
    border: 1px solid rgba(92, 200, 255, 0.25);
    border-radius: var(--hac-radius-md);
    box-shadow: var(--hac-shadow);
}

.neon-table thead th {
    padding: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(92, 200, 255, 0.15);
    border-bottom: 1px solid rgba(92, 200, 255, 0.25);
    color: var(--hac-blue-light);
}

.neon-table tbody td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid rgba(92, 200, 255, 0.08);
    color: var(--hac-blue-soft);
}

.neon-table tbody tr:nth-child(even) {
    background: rgba(92, 200, 255, 0.05);
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.team-logo-small {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--hac-glow));
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hac-highlight-row {
    background: rgba(0, 170, 255, 0.18) !important;
    font-weight: bold;
}

.hac-badge {
    background: rgba(0, 170, 255, 0.25);
    border: 1px solid rgba(0, 170, 255, 0.7);
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    color: var(--hac-blue-light);
    margin-left: 6px;
}

.points {
    font-weight: 700;
    color: var(--hac-blue);
}
.team-click {
    display: inline-block;
}
/* Correction : seule l'équipe est cliquable */
.neon-table tbody tr {
    cursor: default !important;
}

.neon-table tbody tr:hover {
    transform: none;
}

.team-click {
    display: inline-block;
    cursor: pointer !important;
    transition: 0.25s ease;
}

.team-click:hover {
    color: var(--hac-blue);
    text-shadow: 0 0 8px var(--hac-blue);
}