.events-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.events-page header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #45475a;
}

.events-page header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #cdd6f4;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #cba6f7, #89b4fa, #a6e3a1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.event-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #f38ba8 20%,
        #fab387 30%,
        #f9e2af 40%,
        #a6e3a1 50%,
        #94e2d5 60%,
        #89b4fa 70%,
        #cba6f7 80%,
        transparent 100%
    );
    border-radius: 1px;
    animation: shimmer-separator 3s ease-in-out infinite;
}

@keyframes shimmer-separator {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.event-card {
    background: linear-gradient(135deg, #313244 0%, #2a2a40 100%);
    border: 1px solid #45475a;
    border-left: 4px solid #89b4fa;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
    position: relative;
}

.event-card:nth-child(even) { animation-delay: 0.1s; }
.event-card:nth-child(odd) { animation-delay: 0.2s; }

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(137, 180, 250, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(25%, -25%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(137, 180, 250, 0.2);
    border-left-color: #cba6f7;
}

.event-card:hover::before {
    opacity: 1;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.event-header:hover {
    background-color: rgba(69, 71, 90, 0.3);
}

.event-info {
    flex: 1;
}

.event-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #89b4fa;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #89b4fa, #cba6f7, #f5c2e7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: eventNameShift 4s ease-in-out infinite;
}

@keyframes eventNameShift {
    0%, 100% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
}

.event-dates {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.event-date {
    color: #a6adc8;
    font-size: 0.9rem;
}

.event-date strong {
    color: #cdd6f4;
}

.event-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(137, 180, 250, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(203, 166, 247, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.event-toggle:hover {
    background: rgba(137, 180, 250, 0.2);
    transform: scale(1.1);
}

.event-toggle:hover::before {
    width: 60px;
    height: 60px;
}

.toggle-icon {
    color: #89b4fa;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.event-toggle:hover .toggle-icon {
    color: #cba6f7;
    transform: scale(1.1);
}

.event-description {
    padding: 0 2rem 2rem;
    color: #bac2de;
    line-height: 1.6;
}

.event-challenges {
    background: rgba(69, 71, 90, 0.2);
    padding: 2rem;
    border-top: 1px solid #45475a;
}

.event-challenges h3 {
    color: #a6e3a1;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #a6e3a1, #94e2d5, #89b4fa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: challengesTitleShift 5s ease-in-out infinite;
}

.event-challenges h3::before {
    content: '🧩';
    font-size: 1.1em;
}

@keyframes challengesTitleShift {
    0%, 100% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
}

.no-challenges {
    color: #6c7086;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-challenges .challenge-card {
    background: linear-gradient(135deg, #1e1e2e 0%, #313244 100%);
    border: 1px solid #45475a;
    border-left: 4px solid var(--difficulty-color, #cba6f7);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    transform: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.event-challenges .challenge-card:nth-child(1) { animation-delay: 0.1s; }
.event-challenges .challenge-card:nth-child(2) { animation-delay: 0.2s; }
.event-challenges .challenge-card:nth-child(3) { animation-delay: 0.3s; }
.event-challenges .challenge-card:nth-child(4) { animation-delay: 0.4s; }
.event-challenges .challenge-card:nth-child(5) { animation-delay: 0.5s; }
.event-challenges .challenge-card:nth-child(n+6) { animation-delay: 0.6s; }

.event-challenges .challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--difficulty-color, #cba6f7) 15%, transparent) 0%,
        color-mix(in srgb, var(--difficulty-color, #cba6f7) 5%, transparent) 100%
    );
    border-radius: 0 0.5rem 0 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-challenges .challenge-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--difficulty-color, #cba6f7) 20%, transparent);
    border-left-width: 6px;
}

.event-challenges .challenge-card:hover::before {
    opacity: 1;
}

.event-challenges .challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0;
    cursor: default;
    background: none;
}

.event-challenges .challenge-header:hover {
    background: none;
}

.event-challenges .challenge-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.event-challenges .challenge-title a {
    color: #cdd6f4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-challenges .challenge-title a:hover {
    color: #cba6f7;
}

.event-challenges .challenge-difficulty {
    background-color: var(--difficulty-color, #6c7086);
    color: #1e1e2e;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    white-space: nowrap;
}

.event-challenges .challenge-description {
    color: #bac2de;
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0;
}

.event-challenges .challenge-meta {
    display: flex;
    justify-content: flex-start;
    font-size: 0.875rem;
    color: #a6adc8;
}

.event-challenges .challenge-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-challenges .meta-label {
    color: #9399b2;
}

.event-challenges .challenge-author strong {
    color: #cdd6f4;
}

/* Classes empty communes définies dans app.css */
/* Spécificités pour les événements si nécessaire */

@keyframes gradientShift {
    0%, 100% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
}

@media (max-width: 768px) {
    .events-page {
        padding: 1rem;
    }

    .events-page header h1 {
        font-size: 2rem;
    }

    .event-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .event-dates {
        flex-direction: column;
        gap: 0.5rem;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
    }

    .event-challenges {
        padding: 1.5rem;
    }
}
