/* ========================================
   DASHBOARD STATISTIQUES - L'ENVOL DES GAMERS
   ======================================== */

/**
 * Styles pour la page statistiques.php
 * Dashboard en temps réel des donations
 */

/* ========================================
   CONTENEUR DE PAGE
   ======================================== */

/**
 * Conteneur principal pour les pages Paliers et Statistiques
 * Utilise toute la largeur disponible entre les sidebars
 * Pas de max-width pour maximiser l'espace
 */
.page-container {
    width: 100%;
    padding: 0 1rem;
}

/* Responsive : Mobile */
@media (max-width: 768px) {
    .page-container {
        padding: 0 0.5rem;
    }
}

/* ========================================
   HEADER DE PAGE
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.page-header-content {
    flex: 1;
}

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

.page-icon {
    font-size: 1.5rem;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

.page-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.auto-refresh-toggle {
    font-size: 0.9rem;
}

/* ========================================
   CARTES DE STATISTIQUES PRINCIPALES
   ======================================== */

.stats-overview {
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.stat-card.primary::before {
    background: linear-gradient(90deg, #ff6fb1, #c084fc);
}

.stat-card.success::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card.info::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card.warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-change {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

.stat-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========================================
   SECTION GRAPHIQUES
   ======================================== */

.charts-section {
    margin-bottom: 3rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chart-controls select,
.chart-type-selector {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-controls select:hover,
.chart-type-selector:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.chart-controls select:focus,
.chart-type-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 111, 177, 0.2);
}

.btn-icon {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.chart-help {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.chart-help small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ========================================
   SECTION ACTIVITÉ
   ======================================== */

.activity-section {
    margin-bottom: 3rem;
}

.activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.activity-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.activity-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 111, 177, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.top-donors-list,
.recent-donations {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

.top-donors-list::-webkit-scrollbar,
.recent-donations::-webkit-scrollbar {
    width: 6px;
}

.top-donors-list::-webkit-scrollbar-track,
.recent-donations::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.top-donors-list::-webkit-scrollbar-thumb,
.recent-donations::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Top donateurs */
.donor-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.donor-item:hover {
    background: rgba(255, 111, 177, 0.1);
}

/* Hover pour les 3 premiers avec leurs dégradés */
.donor-item.rank-1:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 193, 7, 0.1));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.donor-item.rank-2:hover {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.25), rgba(169, 169, 169, 0.1));
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.3);
}

.donor-item.rank-3:hover {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(184, 115, 51, 0.1));
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.3);
}

.donor-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 2rem;
    text-align: center;
}

/* Dégradés pour les 3 premiers */
.donor-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.donor-item.rank-1 .donor-rank {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.donor-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(169, 169, 169, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.3);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.2);
}

.donor-item.rank-2 .donor-rank {
    color: #c0c0c0;
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.donor-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(184, 115, 51, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.3);
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.2);
}

.donor-item.rank-3 .donor-rank {
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
}

.donor-info {
    flex: 1;
}

.donor-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.donor-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.donor-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

/* Donations récentes */
.donation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.donation-item:hover {
    background: rgba(255, 111, 177, 0.1);
}

.donation-info {
    flex: 1;
}

.donation-user {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.donation-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
}

.donation-amount {
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.donation-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* États vides et de chargement */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 111, 177, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   NOTIFICATIONS TOAST
   ======================================== */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text);
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast.toast-warning {
    border-left: 4px solid #f59e0b;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .page-actions {
        align-items: stretch;
        width: 100%;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .chart-card,
    .activity-card {
        padding: 1.5rem;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .donor-item,
    .donation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .donation-time {
        text-align: left;
    }
}

/* ========================================
   OPTIMISATIONS PERFORMANCES
   ======================================== */

/* Lazy loading pour les graphiques */
.chart-container {
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

/* Optimisation des animations pour 60fps */
.stat-card,
.donor-item,
.donation-item,
.toast {
    will-change: transform;
}

.stat-card:hover,
.donor-item:hover,
.donation-item:hover {
    will-change: auto;
}

/* Réduction des animations sur les appareils à faible performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .progress-fill::after {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: var(--primary);
    }
}

/* ========================================
   ÉTATS D'ERREUR
   ======================================== */

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #ef4444;
    text-align: center;
}

.chart-error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #ef4444;
    text-align: center;
    min-height: 300px;
}

.chart-error-message .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.chart-error-message .error-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.error-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state-message {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.error-state-details {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.retry-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* ========================================
   AMÉLIORATIONS ACCESSIBILITÉ
   ======================================== */

/* Focus visible pour la navigation au clavier */
.btn-secondary:focus-visible,
.checkbox-label:focus-within,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Textes alternatifs pour les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Amélioration du contraste pour les textes */
@media (prefers-contrast: high) {
    .stat-label,
    .donor-stats,
    .donation-message,
    .progress-text {
        color: var(--text);
    }
    
    .stat-card {
        border-width: 3px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .page-actions,
    .toast-container,
    .sidebar-toggle,
    .sidebar,
    .main-header {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .stat-card,
    .chart-card,
    .activity-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .charts-grid,
    .activity-grid {
        display: block;
    }
    
    .chart-card,
    .activity-card {
        margin-bottom: 2rem;
    }
}

/* ========================================
   RESPONSIVE SUPPLÉMENTAIRE
   ======================================== */

/* Très petits écrans (< 360px) */
@media (max-width: 360px) {
    .page-title {
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Tablettes en mode paysage */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .charts-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Grands écrans (> 1920px) */
@media (min-width: 1920px) {
    .page-header,
    .stats-overview,
    .charts-section,
    .activity-section {
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ========================================
   SECTION PALIERS DE DONATIONS
   ======================================== */

.milestones-section {
    margin-bottom: 3rem;
}

.milestones-header {
    text-align: center;
    margin-bottom: 3rem;
}

.milestones-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1rem 0;
}

.milestones-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.milestone-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.milestone-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.milestone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.3;
    transition: opacity 0.3s;
}

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

.milestone-card.reached {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.05) 100%);
    border-color: #10b981;
}

.milestone-card.reached::before {
    background: linear-gradient(90deg, #10b981, #34d399);
    opacity: 1;
}

.milestone-card.next {
    background: linear-gradient(135deg, rgba(255, 111, 177, 0.1) 0%, rgba(165, 107, 255, 0.05) 100%);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(255, 111, 177, 0.2);
}

.milestone-card.next::before {
    opacity: 1;
}

.milestone-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.milestone-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.milestone-card:hover .milestone-icon {
    transform: scale(1.1);
}

.milestone-icon.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.milestone-content {
    text-align: center;
}

.milestone-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.milestone-card.reached .milestone-amount {
    color: #10b981;
}

.milestone-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.milestone-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.milestone-progress {
    margin-top: 1.5rem;
}

.milestone-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.milestone-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 5px;
    transition: width 1s ease;
    position: relative;
}

.milestone-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.milestone-progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.milestone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease;
}

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

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-size: 0.95rem;
}

/* Effet de brillance sur les paliers atteints */
.milestone-card.reached::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

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

/* ========================================
   RESPONSIVE PALIERS
   ======================================== */

@media (max-width: 768px) {
    .milestones-header h2 {
        font-size: 1.5rem;
    }
    
    .milestones-subtitle {
        font-size: 1rem;
    }
    
    .milestones-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .milestone-card {
        padding: 1.5rem;
    }
    
    .milestone-icon {
        font-size: 3rem;
    }
    
    .milestone-amount {
        font-size: 1.75rem;
    }
    
    .milestone-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .milestone-card {
        padding: 1.25rem;
    }
    
    .milestone-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .milestone-amount {
        font-size: 1.5rem;
    }
    
    .milestone-title {
        font-size: 1rem;
    }
    
    .milestone-description {
        font-size: 0.9rem;
    }
}

/* Animation d'entrée échelonnée */
.milestone-card:nth-child(1) { transition-delay: 0s; }
.milestone-card:nth-child(2) { transition-delay: 0.1s; }
.milestone-card:nth-child(3) { transition-delay: 0.2s; }
.milestone-card:nth-child(4) { transition-delay: 0.3s; }
.milestone-card:nth-child(5) { transition-delay: 0.4s; }
.milestone-card:nth-child(6) { transition-delay: 0.5s; }
.milestone-card:nth-child(7) { transition-delay: 0.6s; }
.milestone-card:nth-child(8) { transition-delay: 0.7s; }


/* ========================================
   BADGE STATUT ÉVÉNEMENT
   ======================================== */

.event-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease;
}

.event-status-badge .status-icon {
    font-size: 1.2rem;
}

.event-status-badge.status-live {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border: 2px solid #ef4444;
    color: #fca5a5;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.event-status-badge.status-ended {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border: 2px solid #10b981;
    color: #6ee7b7;
}

.event-status-badge.status-upcoming {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border: 2px solid #3b82f6;
    color: #93c5fd;
}

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

/* Responsive badge */
@media (max-width: 768px) {
    .event-status-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .event-status-badge .status-icon {
        font-size: 1rem;
    }
}
