/* Additional CSS enhancements for CV animations and interactions */

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Skill Tag Enhanced Interactions */
.skill-tag {
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-clicked {
    animation: skillPulse 0.3s ease-out;
}

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

/* Timeline Item Hover Effects */
.timeline-item {
    transition: all 0.3s ease;
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.timeline-item:hover .timeline-title {
    color: var(--primary-color);
}

/* Hero Section Parallax Effect */
.cv-hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Floating Animation for Hero Avatar */
.hero-avatar {
    animation: avatarFloat 4s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

/* Section Entrance Animations */
.cv-section {
    animation: slideInUp 0.6s ease-out forwards;
    animation-delay: var(--animation-delay, 0s);
}

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

/* Staggered Animation Delays */
.cv-sidebar .cv-section:nth-child(1) { --animation-delay: 0.2s; }
.cv-sidebar .cv-section:nth-child(2) { --animation-delay: 0.4s; }
.cv-sidebar .cv-section:nth-child(3) { --animation-delay: 0.6s; }
.cv-sidebar .cv-section:nth-child(4) { --animation-delay: 0.8s; }

.cv-content .cv-section:nth-child(1) { --animation-delay: 0.3s; }
.cv-content .cv-section:nth-child(2) { --animation-delay: 0.5s; }

/* Button Interactions */
.btn-download, .btn-contact {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Suppression des cercles d'animation hover
.btn-download::before, .btn-contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-download:hover::before, .btn-contact:hover::before {
    width: 300px;
    height: 300px;
}
*/

/* Hero Links Hover Effects */
.hero-link {
    position: relative;
    overflow: hidden;
}

.hero-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

.hero-link:hover::after {
    width: 100%;
}

/* Info Items Animation */
.info-item {
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(var(--primary-color-rgb, 37, 99, 235), 0.05);
    border-radius: var(--radius);
    padding-left: var(--spacing-md);
    margin-left: -var(--spacing-sm);
}

.info-item:hover .info-icon {
    transform: scale(1.2);
    color: var(--primary-color);
}

/* Section Headers Animation */
.section-header {
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 1s ease;
}

.cv-section:hover .section-header::before {
    left: 100%;
}

/* Timeline Animations */
.timeline::before {
    animation: timelineGrow 2s ease-out 0.5s both;
}

@keyframes timelineGrow {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

/* Suppression de l'animation des cercles
.timeline-item::before {
    animation: timelineDot 0.6s ease-out both;
    animation-delay: calc(var(--item-index, 0) * 0.2s + 1s);
}

@keyframes timelineDot {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
*/

/* Loading Animation for Skills */
.skill-tags {
    opacity: 0;
    animation: skillsReveal 0.8s ease-out 0.3s both;
}

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

.skill-tag {
    animation: skillTagPop 0.5s ease-out both;
    animation-delay: calc(var(--tag-index, 0) * 0.1s);
}

@keyframes skillTagPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Print Optimizations */
@media print {
    .cv-page {
        animation: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    .cv-section {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .timeline-item {
        break-inside: avoid;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .hero-avatar {
        animation: none !important;
    }
}

/* Dark Theme Adjustments */
@media (prefers-color-scheme: dark) {
    .cv-section {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .timeline-item {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .timeline-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .skill-tag {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-avatar {
        animation: none !important;
    }
    
    .timeline::before {
        animation: none !important;
    }
}

/* Focus Styles for Accessibility */
.skill-tag:focus,
.hero-link:focus,
.btn-download:focus,
.btn-contact:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cv-section {
        border: 2px solid var(--text-dark);
    }
    
    .skill-tag {
        border: 1px solid var(--text-dark);
    }
    
    .timeline::before {
        background: var(--text-dark);
    }
}

/* Responsive animations */
@media (max-width: 768px) {
    .fade-in, .slide-in, .scale-in {
        animation-duration: 0.3s; /* Animations plus rapides sur mobile */
    }
    
    .hover-animations:hover {
        transform: scale(1.02); /* Effets plus subtils */
    }
    
    .parallax {
        transform: none; /* Désactive parallax sur mobile pour les performances */
    }
}

@media (max-width: 480px) {
    .fade-in, .slide-in, .scale-in {
        animation-duration: 0.2s;
    }
    
    .hover-animations:hover {
        transform: none; /* Pas d'animations hover sur très petit écran */
    }
}