/*
 * CSS pour les tags d'expertise et animations - Services INOVATIO
 * Animations, hover effects et scroll fluide
 */

/* ===== EXPERTISE TAGS ===== */

.expertise-tag {
    transition: all 0.3s ease !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

.expertise-tag:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    background-color: #ffffff !important;
}

.expertise-tag:active {
    transform: translateY(-1px) !important;
    transition: all 0.1s ease !important;
}

/* Effet de brillance au hover */
.expertise-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

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

/* Animation d'apparition des tags */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#expertise-tags .expertise-tag {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
}

/* Délai progressif pour chaque tag */
#expertise-tags .expertise-tag:nth-child(1) { animation-delay: 0.1s; }
#expertise-tags .expertise-tag:nth-child(2) { animation-delay: 0.2s; }
#expertise-tags .expertise-tag:nth-child(3) { animation-delay: 0.3s; }
#expertise-tags .expertise-tag:nth-child(4) { animation-delay: 0.4s; }
#expertise-tags .expertise-tag:nth-child(5) { animation-delay: 0.5s; }

/* ===== ANCHORS ET SCROLL ===== */

/* Offset pour les anchors (compenser le header fixe) */
.anchor-offset {
    position: absolute;
    top: -100px; /* Ajuster selon la hauteur de votre header */
    visibility: hidden;
}

/* Scroll fluide pour toute la page */
html {
    scroll-behavior: smooth !important;
}

/* Amélioration du scroll sur webkit */
* {
    scroll-behavior: smooth;
}

/* Animation des cards au scroll */
.service-card {
    transition: all 0.3s ease !important;
}

.service-card:hover {
    transform: translateY(-5px) !important;
}

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

@media (max-width: 768px) {
    #expertise-tags .d-flex {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .expertise-tag {
        width: 80% !important;
        text-align: center !important;
        margin: 0.25rem 0 !important;
    }
    
    .anchor-offset {
        top: -80px; /* Réduire l'offset sur mobile */
    }
}

@media (max-width: 576px) {
    .expertise-tag {
        width: 90% !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    .anchor-offset {
        top: -60px; /* Encore moins sur petit mobile */
    }
}

/* ===== COULEURS SPÉCIFIQUES PAR PÔLE ===== */

/* Stratégie - Bleu */
.expertise-tag[data-target="strategie-anchor"]:hover {
    border-top-color: #1B3A6F !important;
    color: #1B3A6F !important;
}

/* Branding - Rouge */
.expertise-tag[data-target="branding-anchor"]:hover {
    border-top-color: #C23B22 !important;
    color: #C23B22 !important;
}

/* Conception - Violet */
.expertise-tag[data-target="conception-anchor"]:hover {
    border-top-color: #7E57C2 !important;
    color: #7E57C2 !important;
}

/* Réalisation - Vert */
.expertise-tag[data-target="realisation-anchor"]:hover {
    border-top-color: #4E7D5A !important;
    color: #4E7D5A !important;
}

/* Activation - Orange */
.expertise-tag[data-target="activation-anchor"]:hover {
    border-top-color: #E67E22 !important;
    color: #E67E22 !important;
}

/* ===== FEEDBACK VISUEL CLICK ===== */

.expertise-tag:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25) !important;
}

/* Animation de pulse au click */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.expertise-tag.clicked {
    animation: pulse 0.3s ease;
}

/* ===== AMÉLIORATION ACCESSIBILITÉ ===== */

.expertise-tag:focus-visible {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
}

/* Réduction des animations pour les utilisateurs préférant moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    .expertise-tag,
    .service-card,
    html {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
    
    .expertise-tag:hover {
        transform: none !important;
    }
    
    #expertise-tags .expertise-tag {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.expertise-tag {
    will-change: transform !important;
    backface-visibility: hidden !important;
}

.service-card {
    will-change: transform !important;
    backface-visibility: hidden !important;
}

/* Force GPU acceleration */
.expertise-tag,
.service-card {
    transform: translateZ(0) !important;
}
