/* ============================================
   PAGE ÉVÉNEMENTS PUBLIQUE - DESIGN MODERNE
   ============================================ */

:root {
    --event-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --event-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --event-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --event-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --event-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.events-public-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.events-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.1), rgba(165, 107, 255, 0.1));
    border-radius: 30px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 111, 177, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.events-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.events-hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   SECTIONS
   ============================================ */
.events-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid rgba(255, 111, 177, 0.2);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.8rem;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.live-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
    }
}

/* ============================================
   SECTION LIVE
   ============================================ */
.live-section {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05), rgba(255, 111, 177, 0.05));
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 0, 0, 0.2);
}

/* ============================================
   GRILLE D'ÉVÉNEMENTS
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.1), rgba(165, 107, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

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

.event-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #FF6FB1;
    box-shadow: 0 20px 40px rgba(255, 111, 177, 0.3);
}

.event-card.live-card {
    border-color: rgba(255, 0, 0, 0.5);
    animation: live-border 2s ease-in-out infinite;
}

@keyframes live-border {
    0%, 100% { border-color: rgba(255, 0, 0, 0.5); }
    50% { border-color: rgba(255, 0, 0, 1); }
}

.event-thumbnail {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-thumbnail-icon {
    font-size: 5rem;
    opacity: 0.3;
}

.event-live-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

.event-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.event-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.event-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-time {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ============================================
   TIMELINE
   ============================================ */
.events-timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-date-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
}

.timeline-date-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 111, 177, 0.3), transparent);
}

.timeline-date-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 111, 177, 0.1);
    border-radius: 20px;
}

.timeline-event {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border-left: 4px solid #FF6FB1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #FF6FB1;
    border-radius: 50%;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(255, 111, 177, 0.2);
}

.timeline-event:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(255, 111, 177, 0.2);
}

.timeline-marker {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.5rem;
}

.timeline-time {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    min-width: 150px;
}

.timeline-time-separator {
    color: var(--text-muted);
}

.timeline-content {
    flex: 1;
}

.timeline-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.timeline-event-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.timeline-category-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.timeline-event-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.timeline-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   PAS D'ÉVÉNEMENTS - VERSION CRÉATIVE
   ============================================ */
.no-events {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.05), rgba(165, 107, 255, 0.05));
    border-radius: 30px;
    border: 2px dashed rgba(255, 111, 177, 0.3);
    position: relative;
    overflow: hidden;
}

.no-events::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 111, 177, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.no-events-animation {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.calendar-icon {
    font-size: 6rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(255, 111, 177, 0.3));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.sparkles {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

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

.no-events-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    position: relative;
    z-index: 1;
}

.no-events-message {
    font-size: 1.4rem;
    color: var(--text);
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.no-events-message strong {
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.no-events-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 1.5rem 0 2rem 0;
    position: relative;
    z-index: 1;
}

.no-events-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.no-events-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 111, 177, 0.3);
}

.no-events-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 111, 177, 0.5);
}

.no-events-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.no-events-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.no-events-btn span {
    font-size: 1.3rem;
}

.no-events-tip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 165, 0, 0.1);
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
    z-index: 1;
}

.tip-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 25px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    border: 2px solid rgba(255, 111, 177, 0.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .events-public-container {
        padding: 1rem 0.5rem;
    }
    
    .events-hero {
        padding: 3rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .events-hero-title {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .events-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .live-section {
        padding: 1.5rem;
    }
    
    .timeline-event {
        flex-direction: column;
        gap: 1rem;
        padding-left: 1rem;
    }
    
    .timeline-time {
        min-width: auto;
    }
    
    .timeline-event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .events-timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-date-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-date-line {
        width: 100%;
        height: 2px;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .events-hero-title {
        font-size: 2rem;
    }
    
    .event-card-content {
        padding: 1rem;
    }
    
    .event-title {
        font-size: 1.2rem;
    }
    
    .timeline-event-title {
        font-size: 1.1rem;
    }
}

/* ============================================
   SCROLLBAR PERSONNALISÉE
   ============================================ */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6FB1, #A56BFF);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #A56BFF, #FF6FB1);
}
