/* widgets/leaderboard/widget_leaderboard.css */
/* V2.5 - [FIX] Positionnement tooltip mobile + [VISUAL] Brouillard de Guerre V2 */

.widget-leaderboard .leaderboard-item {
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.2s ease;
}
  
.widget-leaderboard .leaderboard-item .rank-score { min-width: 80px; text-align: right; }

  
/* Highlight utilisateur connecté */
.widget-leaderboard .current-user-highlight {
    background-color: rgba(108, 99, 255, 0.15) !important;
}
  
/* Bordures Top 3 */
.widget-leaderboard .leaderboard-item.border-yellow-400 { border-left-width: 4px; }
.widget-leaderboard .leaderboard-item.border-gray-400 { border-left-width: 4px; }
.widget-leaderboard .leaderboard-item.border-orange-500 { border-left-width: 4px; }
  
.widget-leaderboard .neu-inset-item {
    background-color: rgba(26, 27, 46, 0.50);
    box-shadow: inset 3px 3px 6px rgba(10, 10, 14, 0.5),
                inset -3px -3px 6px rgba(29, 30, 42, 0.2);
}
.widget-leaderboard .neu-inset-item.hover-lift:hover {
     background-color: rgba(26, 27, 46, 0.75);
     box-shadow: 4px 4px 8px rgba(10, 10, 14, 0.7),
                -4px -4px 8px rgba(29, 30, 42, 0.35);
     transform: translateY(-2px);
}
  
.widget-leaderboard .leaderboard-item-light-transparent {
    background-color: rgba(255, 255, 255, 0.05);
}
.widget-leaderboard .leaderboard-item-light-transparent.hover-lift:hover {
      background-color: rgba(255, 255, 255, 0.10);
      transform: translateY(-2px);
}
  
.widget-leaderboard .leaderboard-item a > span,
.widget-leaderboard .leaderboard-item a > i { vertical-align: middle; }
.widget-leaderboard .leaderboard-item a > i { display: inline-block; }
  
.widget-leaderboard .leaderboard-item .rank-number,
.widget-leaderboard .leaderboard-item .rank-score { user-select: none; }
.widget-leaderboard .leaderboard-item a span { user-select: text; }


.ranking-tabs-container-plasma {
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    padding-bottom: 0.5rem;
}

.ranking-tab-plasma {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background-color: transparent;
    border: 1px solid transparent;
    color: #a0aec0;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.ranking-tab-plasma:hover {
    color: #fff;
    transform: translateY(-2px) scale(1.05) skewX(-5deg);
    box-shadow: 4px 4px 8px rgba(10, 10, 14, 0.7), -4px -4px 8px rgba(29, 30, 42, 0.35);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.2) 0%, rgba(176, 102, 255, 0.2) 100%);
    border-color: rgba(108, 99, 255, 0.3);
}

.ranking-tab-plasma.is-active {
    color: #fff;
    font-weight: 600;
    background-color: rgba(108, 99, 255, 0.15);
    border-color: rgba(108, 99, 255, 0.5);
    text-shadow: 0 0 5px rgba(108, 99, 255, 0.5);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.3),
                inset 0 0 10px rgba(108, 99, 255, 0.1);
}
.ranking-tab-plasma.is-active:hover {
    transform: translateY(-2px) scale(1.05) skewX(-5deg);
    box-shadow: 0 0 25px rgba(108, 99, 255, 0.4),
                inset 0 0 12px rgba(108, 99, 255, 0.2);
}

.ranking-tab-select {
    padding: 0.5rem 1rem;
    padding-right: 2rem;
    cursor: pointer;
}

.widget-leaderboard .player-level-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: rgba(108, 99, 255, 0.2);
  border: 1px solid rgba(108, 99, 255, 0.4);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.widget-leaderboard .player-level-badge::before {
  content: 'myXP';
  position: absolute;
  top: -6px;
  left: 58%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 600;
  color: #a0aec0;
  letter-spacing: 0.5px;
}
.widget-leaderboard .leaderboard-item.border-yellow-400 .player-level-badge {
  width: 28px;
  height: 28px;
  font-size: 14px;
}
.widget-leaderboard .leaderboard-item.border-yellow-400 .player-level-badge::before {
  top: -9px;
  font-size: 9px;
}

.widget-leaderboard .rank-glow-first-finished {
text-shadow: 0 0 10px rgba(252, 211, 77, 0.9), 0 0 4px rgba(253, 242, 201, 0.8);
}

.widget-leaderboard .rank-glow-past-winner {
text-shadow: 0 0 8px rgba(74, 222, 128, 0.7), 0 0 3px rgba(167, 243, 208, 0.6);
}

.widget-leaderboard .role-glow-manager {
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.9), 0 0 3px rgba(221, 214, 254, 0.8);
}
.widget-leaderboard .role-glow-admin {
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.8), 0 0 3px rgba(253, 164, 175, 0.7);
}
.widget-leaderboard .role-glow-mod {
  text-shadow: 0 0 8px rgba(251, 146, 60, 0.9), 0 0 3px rgba(253, 186, 116, 0.8);
}
.widget-leaderboard .role-glow-premium {
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.7), 0 0 3px rgba(167, 243, 208, 0.6);
}

.ranking-period-info-bubble {
    display: inline-block;
    padding: 0.25rem 1rem;
    background-color: rgba(30, 33, 56, 0.6);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.05);
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease-out;
}

.ranking-period-info-bubble:hover {
    border-color: rgba(108, 99, 255, 0.4);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25), 0 0 10px rgba(108, 99, 255, 0.2);
    transform: translateY(-1px);
}

/* --- Styles pour l'annonce de saison (copiés de game.css) --- */
.game-page-title-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

a.upcoming-season-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.upcoming-season-notice-wrapper {
    display: none;
}

.upcoming-season-notice-mobile-wrapper {
    display: none;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

@keyframes upcoming-season-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(167, 139, 250, 0.3), 0 0 25px rgba(108, 99, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(167, 139, 250, 0.5), 0 0 40px rgba(108, 99, 255, 0.3); }
}

@keyframes swing-and-shake-ULTRA {
    0%, 75% { transform: scale(1) rotate(0deg); } 5%, 15%, 25%, 35%, 45% { transform: scale(1) rotate(0deg); }
    5% { transform: scale(1) rotate(5deg); } 15% { transform: scale(1) rotate(-4deg); } 25% { transform: scale(1) rotate(2deg); }
    35% { transform: scale(1) rotate(-1deg); } 45%, 75% { transform: scale(1) rotate(0deg); }
    80% { transform: scale(1.3) rotate(0deg); } 85% { transform: scale(1.3) rotate(18deg); } 87% { transform: scale(1.3) rotate(-18deg); }
    89% { transform: scale(1.3) rotate(18deg); } 91% { transform: scale(1.3) rotate(-18deg); } 93% { transform: scale(1.3) rotate(18deg); }
    95% { transform: scale(1.3) rotate(0deg); } 100% { transform: scale(1) rotate(0deg); }
}

.upcoming-season-notice {
    display: block;
    max-width: 32rem;
    padding: 1.1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 1px solid rgba(196, 181, 253, 0.5);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    animation: upcoming-season-glow 4s infinite ease-in-out;
}
.upcoming-season-notice i {
    display: inline-block; vertical-align: middle; position: absolute; font-size: 1.7rem; color: #fcd34d;
    margin-top: -17px; margin-left: -60px; text-shadow: 0 0 12px rgba(252, 211, 77, 0.9);
    animation: swing-and-shake-ULTRA 3s infinite ease-in-out; animation-delay: 0.5s; transform-origin: top center;
}

@keyframes notice-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-page-title-container .game-season-notice-anim-wrapper {
    animation: notice-slide-in 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) 0.5s forwards;
    opacity: 0; /* État initial avant l'animation */
}

@media (min-width: 1280px) {
    .game-season-notice-anim-wrapper {
        display: block;
        position: absolute;
        left: 0;
        top: 50%;
        z-index: 10;
    }
    .upcoming-season-notice-wrapper {
        display: block;
        width: 200px; 
        transform: translateY(-120%) translateX(90%) rotate(-6deg); 
        transition: transform 0.3s ease-out;
    }
    .upcoming-season-notice-wrapper:hover {
        transform: translateY(-108%) translateX(85%) rotate(0deg); 
    }
    .upcoming-season-notice-wrapper .upcoming-season-notice {
        max-width: 100%;
        margin: 0;
    }
    .upcoming-season-notice {
        background: linear-gradient(to bottom right, rgba(79, 70, 229, 0.36) 0.42%, rgba(124, 58, 237, 0.95));
    }
    .upcoming-season-notice i {
        margin-left: -40px;
        transform: rotate(-6deg);
    }
}


@media (max-width: 1279.98px) {
    .upcoming-season-notice-mobile-wrapper {
        display: block;
        margin-bottom: 25px;
    }
    .upcoming-season-notice-mobile-wrapper .upcoming-season-notice {
        margin-left: auto;
        margin-right: auto;
    }
    .upcoming-season-notice i { margin-left: -35px; }
}

@media (max-width: 727.98px) {
    .upcoming-season-notice-mobile-wrapper {
        display: block;
        margin-bottom: 5px;
    }
}


/* --- Styles Premium Leaderboard --- */
.text-yellow-400 { color: #facc15; }
.border-yellow-500 { border-color: #eab308; }
.bg-yellow-500\/20 { background-color: rgba(234, 179, 8, 0.2); }
.text-yellow-300 { color: #fde047; }
.border-yellow-500\/50 { border-color: rgba(234, 179, 8, 0.5); }

/* Effet de lueur sur le texte doré */
.leaderboard-item .text-yellow-400 {
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

/* --- Badge MyXP (Style Original "Lcs-exe95") --- */
.leaderboard-myxp-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #6d28d9, #4c1d95); /* Violet profond */
    border: 2px solid #a78bfa; /* Bordure claire */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    position: relative;
    margin-right: 12px; /* Espace avec le pseudo */
    flex-shrink: 0;
}

.leaderboard-myxp-badge .xp-label {
    font-size: 7px;
    color: #ddd6fe;
    text-transform: uppercase;
    font-weight: 700;
    position: absolute;
    top: -6px;
    background: #1e1b4b; /* Fond sombre pour lisibilité */
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1;
    letter-spacing: 0.5px;
}

.leaderboard-myxp-badge .xp-value {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-top: 2px;
}

/* --- Tooltips Brouillard de Guerre (Style Classifié V2) --- */

.fog-row-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    vertical-align: middle;
}

/* L'icône par-dessus le texte */
.fog-icon-overlay {
    position: absolute;
    inset: 0; /* Prend toute la place du parent */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fog-icon-overlay i {
    font-size: 0.75rem; /* Taille discrète */
    color: #9ca3af; /* Gris moyen */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); /* Ombre pour lisibilité sur le flou */
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Effet au survol du groupe */
.fog-row-wrapper:hover .fog-icon-overlay i {
    color: #fff;
    transform: scale(1.1);
}

/* Le Tooltip (Inchangé, style Dossier Secret) */
.fog-row-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 140%; /* Un peu plus haut pour dégager l'overlay */
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    width: 200px;
    background-color: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(108, 99, 255, 0.4);
    border-radius: 6px;
    padding: 0;
    z-index: 50;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-family: 'Kanit', sans-serif;
}

.fog-row-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(52, 54, 128, 1) transparent transparent transparent;
}

.fog-row-wrapper:hover .fog-row-tooltip,
.fog-row-wrapper:focus-within .fog-row-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fog-tooltip-header {
    background: linear-gradient(90deg, rgba(108, 99, 255, 0.2), rgba(108, 99, 255, 0.05));
    color: #a78bfa;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 5px 5px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fog-tooltip-body {
    padding: 8px 10px;
    color: #cbd5e1;
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: center;
}

.fog-tooltip-body strong {
    color: #fff;
    font-weight: 600;
}

/* --- FIX MOBILE : Ancrage intelligent des tooltips pour éviter le débordement --- */
@media (max-width: 767.98px) {
    /* Règle générale : ancrage à gauche par défaut */
    .fog-row-tooltip {
        left: 0.5rem;
        right: auto;
        transform: translateX(0) translateY(5px);
    }
    .fog-row-tooltip::after {
        left: 1.5rem;
    }
    .fog-row-wrapper:hover .fog-row-tooltip,
    .fog-row-wrapper:focus-within .fog-row-tooltip {
        transform: translateX(0) translateY(0);
    }

    /* Règle SPÉCIFIQUE pour les tooltips dans la colonne de score (à droite) */
    .rank-score .fog-row-tooltip {
        left: auto;
        right: 0.5rem; /* Ancrage à droite */
        transform: translateX(0) translateY(5px);
    }
    .rank-score .fog-row-tooltip::after {
        left: auto;
        right: 1.5rem; /* On positionne aussi la flèche à droite */
    }
    .rank-score .fog-row-wrapper:hover .fog-row-tooltip,
    .rank-score .fog-row-wrapper:focus-within .fog-row-tooltip {
        transform: translateX(0) translateY(0);
    }
}

/* --- NOUVEAU : Badge Brouillard Inline --- */
.fog-badge-inline {
    display: inline-block;
    background: linear-gradient(90deg, rgba(76, 29, 149, 0.8) 0%, rgba(109, 40, 217, 0.6) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #e9d5ff; /* violet clair */
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}