/* COMPOSANTS UI - BOUTONS ET ÉLÉMENTS INTERACTIFS */

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(25, 5, 68, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(25, 5, 68, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(255, 169, 26, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 169, 26, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-ghost:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}
/* Cartes sectorielles avancées */
.sector-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
}

.sector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sector-card:hover::before {
    transform: scaleX(1);
}

.sector-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: var(--secondary-color);
}

.sector-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sector-card:hover .sector-image {
    transform: scale(1.05);
}

.sector-content {
    padding: 1.5rem;
}

.sector-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sector-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.sector-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
}

.sector-stat {
    text-align: center;
}

.sector-stat-value {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Graphiques interactifs améliorés */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.chart-container:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.chart-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.chart-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

/* Flip cards avancées */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.flip-card-front {
    background: var(--gradient-primary);
    color: white;
}

.flip-card-back {
    background: var(--gradient-secondary);
    color: white;
    transform: rotateY(180deg);
}

/* Particules et effets Canvas */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.floating-elements {
    position: absolute;
    pointer-events: none;
}

.floating-card {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Timeline améliorée */
.timeline-item {
    position: relative;
    padding: 2rem;
    margin: 2rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition-smooth);
}

.timeline-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-strong);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--secondary-color);
}

.timeline-year {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Effets de loading et placeholder */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.image-placeholder {
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
}

/* Responsive pour interactions */
@media (max-width: 768px) {
    .memory-card {
        font-size: 1.5rem;
    }
    
    .game-board {
        gap: 0.5rem;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 1rem;
    }
    
    .sector-card {
        margin-bottom: 1.5rem;
    }
    
    .timeline-item {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .timeline-item:hover {
        transform: translateX(5px);
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .memory-card,
    .carousel-slide,
    .flip-card-inner,
    .timeline-item {
        transition: none;
    }
    
    .float-animation,
    .pulse-animation,
    .loading-skeleton {
        animation: none;
    }
    
    .particles-background {
        display: none;
    }
}

/* Mode sombre (préparation future) */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.05);
        --glass-border: rgba(255, 255, 255, 0.1);
        --text-dark: #f0f0f0;
    }
    
    .testimonial-text {
        color: #e0e0e0;
    }
    
    .author-info span,
    .sector-description,
    .chart-caption {
        color: #b0b0b0;
    }
}