/* Variables pour les couleurs et effets */
:root {
    --hero-primary: #FFD700;
    --hero-secondary: #4a3aff;
    --hero-accent: #FF4500;
    --hero-gradient: linear-gradient(135deg, #2b5876, #4e4376);
    --hero-glow: 0 0 20px rgba(255, 215, 0, 0.3);
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Regrouper toutes les animations keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

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

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.5; transform: scale(0.8) rotate(180deg); }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

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

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

/* Styles principaux */
.hero-banner {
    margin: 2rem auto;
    padding: 1rem;
    max-width: 1200px;
}

.hero-banner.locked {
    position: relative;
}

.hero-banner-lock {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    max-width: calc(100% - 40px); /* Pour éviter le débordement sur mobile */
}

.hero-banner-lock i {
    color: #FFD700;
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

.hero-banner-lock p {
    color: white;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.hero-achievement-notice {
    background: var(--hero-gradient);
    border-radius: 1.5rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.hero-achievement-notice:hover {
    transform: translateY(-5px);
}

.hero-achievement-notice::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    backdrop-filter: blur(10px);
}

.hero-achievement-notice::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, rgba(255,215,0,0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    animation: pulse 4s ease-in-out infinite;
}

.hero-achievement-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 4rem;
    align-items: center;
}

/* Partie gauche */
.hero-achievement-left {
    flex: 0 0 300px;
    animation: slideInLeft 0.8s ease-out;
}

.hero-achievement-icon-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.hero-achievement-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--hero-primary), var(--hero-secondary));
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--hero-glow);
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    margin: 0 auto;
}

.hero-achievement-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-achievement-sparkles i {
    position: absolute;
    color: var(--hero-primary);
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

.hero-achievement-sparkles i:nth-child(1) { top: 20%; left: 0; animation-delay: 0s; }
.hero-achievement-sparkles i:nth-child(2) { top: 0; right: 20%; animation-delay: 0.3s; }
.hero-achievement-sparkles i:nth-child(3) { bottom: 20%; right: 0; animation-delay: 0.6s; }

.hero-achievement-icon i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hero-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    gap: 1rem;
}

.hero-stat {
    text-align: center;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hero-primary);
    text-shadow: var(--hero-glow);
    font-family: var(--font-family);
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.2;
}

/* Partie droite */
.hero-achievement-right {
    flex: 1;
    animation: slideInRight 0.8s ease-out;
}

.hero-title-wrapper {
    margin-bottom: 1.5rem;
}

.hero-achievement-text h2 {
    font-family: var(--font-family);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--hero-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--hero-glow);
}

.hero-subtitle {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.hero-description {
    margin-bottom: 2rem;
}

.hero-description p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--hero-primary);
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-badge i {
    font-size: 0.8rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-button.primary {
    background: linear-gradient(135deg, var(--hero-primary), var(--hero-secondary));
    color: #1a1a1a;
    box-shadow: var(--hero-glow);
}

.hero-button:hover {
    transform: translateY(-2px);
}

.hero-button.primary:hover {
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.hero-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.hero-button:hover i {
    transform: translateX(5px);
}

/* Style amélioré pour l'explication des rangs */
.hero-rank-info {
    position: relative;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 12px;
    font-family: var(--font-family);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.hero-rank-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-rank-info-header i {
    color: var(--hero-primary);
    font-size: 1.25rem;
}

.hero-rank-info-header p {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.hero-rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-rank-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-rank-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.hero-rank-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--hero-gradient);
    border-radius: 6px;
    color: var(--hero-primary);
}

.hero-rank-item-text {
    flex: 1;
}

.hero-rank-item-title {
    color: var(--hero-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.hero-rank-item-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

/* Style spécifique pour la page des héros */
.heroes-header .hero-rank-info {
    max-width: 800px;
    margin: 2rem auto;
}

/* Style pour l'illustration horizontale dans template-heroes */
.heroes-header .hero-illustration {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 2.5rem 0;
    position: relative;
}

.heroes-header .hero-illustration i {
    font-size: 2.75rem;
    color: var(--hero-primary);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    text-shadow: var(--hero-glow);
}

.heroes-header .hero-illustration i:nth-child(1) {
    animation: float 3s ease-in-out infinite;
}

.heroes-header .hero-illustration i:nth-child(2) {
    animation: float 3s ease-in-out infinite 0.6s;
}

.heroes-header .hero-illustration i:nth-child(3) {
    animation: float 3s ease-in-out infinite 1.2s;
}

.heroes-header .hero-illustration i:hover {
    animation: pulse 1s ease-in-out infinite;
    text-shadow: 0 0 20px var(--hero-primary);
    cursor: pointer;
}

/* Style pour le rang dans les cartes */
.hero-rank {
    font-size: 0.9rem;
    color: var(--hero-primary);
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-rank .rank-number {
    font-weight: 600;
    color: var(--hero-primary);
}

.hero-rank .rank-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

/* Styles pour la barre de progression */
.hero-progress {
    margin-top: 15px;
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.progress-percent {
    font-weight: 600;
    color: #FFD700;
}

/* Amélioration des styles pour la version verrouillée */
.hero-banner.locked .hero-achievement-notice {
    position: relative;
    opacity: 0.9;
}

.hero-banner.locked .hero-achievement-icon i {
    color: #FFD700;
}

/* Ajout des styles pour le thème clair */
.theme-light .hero-rank-info {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.theme-light .hero-rank-info-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .hero-rank-info-header p {
    color: #333;
}

.theme-light .hero-rank-item {
    background: rgba(0, 0, 0, 0.03);
}

.theme-light .hero-rank-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-light .hero-rank-item-title {
    color: #333;
}

.theme-light .hero-rank-item-desc {
    color: rgba(0, 0, 0, 0.7);
}

/* Media Queries */
@media (max-width: 1024px) {
    .hero-achievement-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1.5rem 0;
    }

    .hero-achievement-left {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-achievement-right {
        width: 100%;
    }

    .mystical-features {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .heroes-header .hero-illustration,
    .hero-rank-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
        justify-content: space-between;
    }

    .heroes-header .hero-illustration i {
        font-size: 1.75rem;
    }

    .hero-rank-list {
        grid-template-columns: 1fr;
    }
    
    .hero-rank-info {
        padding: 1rem;
        margin: 1rem -1rem;
        border-radius: 30px;
    }

    .hero-rank-item {
        padding: 0.5rem;
    }

    .hero-rank-item-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .hero-rank-item-title {
        font-size: 0.9rem;
    }

    .hero-rank-item-desc {
        font-size: 0.8rem;
    }

    .hero-rank-info-header {
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-rank-info-header p {
        font-size: 1rem;
    }

    .heroes-header .hero-illustration {
        gap: 2rem;
        margin: 1.5rem 0;
        justify-content: center;
    }

    .heroes-header .hero-illustration i {
        font-size: 2rem;
    }

    .hero-achievement-notice {
        padding: 2rem;
    }

    .hero-achievement-text h2 {
        font-size: 2rem;
    }

    .hero-stat-value {
        font-size: 2rem;
    }

    .hero-banner-lock {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        max-width: calc(100% - 20px);
    }

    .hero-banner-lock i {
        font-size: 14px;
    }

    .hero-banner-lock p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .heroes-header .hero-illustration {
        gap: 1rem;
        padding: 1.25rem 0.75rem;
    }

    .heroes-header .hero-illustration i {
        font-size: 1.5rem;
    }

    .hero-achievement-text h2 {
        font-size: 1.75rem;
    }

    .hero-button {
        width: 100%;
        justify-content: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .heroes-header .hero-illustration {
        gap: 1.5rem;
    }

    .heroes-header .hero-illustration i {
        font-size: 1.75rem;
    }

    .hero-banner-lock {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
    }
}
