/* ========================================
   AMELIORATIONS UX/UI POUR PAGES DE SERVICES
   Ivanova Solutions - 2026
   ======================================== */

/* ===================
   1. BREADCRUMB
   =================== */
.breadcrumb-nav {
    position: sticky;
    top: 80px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 168, 232, 0.1);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: #64748B;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breadcrumb-item a:hover {
    color: #00A8E8;
    background: rgba(0, 168, 232, 0.05);
    transform: translateX(2px);
}

.breadcrumb-item.active {
    color: #1E3A5F;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #CBD5E1;
}

/* ===================
   2. INDICATEUR DE PROGRESSION DE LECTURE
   =================== */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #00A8E8, #00D4AA);
    z-index: 10000;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(0, 168, 232, 0.5);
}

/* ===================
   3. NAVIGATION ENTRE SERVICES
   =================== */
.service-navigation {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInRight 0.5s ease-out 0.5s forwards;
}

@keyframes fadeInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.service-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E2E8F0;
    color: #1E3A5F;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    position: relative;
}

.service-nav-btn:hover {
    background: linear-gradient(135deg, #00A8E8, #00D4AA);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 168, 232, 0.3);
}

.service-nav-btn:hover .service-nav-tooltip {
    opacity: 1;
    transform: translateX(-10px);
    visibility: visible;
}

.service-nav-tooltip {
    position: absolute;
    right: 60px;
    background: #1E3A5F;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.service-nav-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #1E3A5F;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* ===================
   4. CTA STICKY MOBILE
   =================== */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: none;
}

.sticky-cta-mobile.visible {
    transform: translateY(0);
}

.sticky-cta-mobile .cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.sticky-cta-mobile .cta-text-mobile {
    flex: 1;
}

.sticky-cta-mobile .cta-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1E3A5F;
    margin-bottom: 0.25rem;
}

.sticky-cta-mobile .cta-subtitle {
    font-size: 0.75rem;
    color: #64748B;
}

.sticky-cta-mobile .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00A8E8, #00D4AA);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 168, 232, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 212, 170, 0.5);
    }
}

/* ===================
   5. TOOLTIPS
   =================== */
.tooltip-trigger {
    position: relative;
    display: inline-block;
    border-bottom: 2px dotted #00A8E8;
    cursor: help;
    color: #00A8E8;
    font-weight: 600;
}

.tooltip-trigger:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #1E3A5F;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-weight: 400;
    max-width: 250px;
    white-space: normal;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top: 6px solid #1E3A5F;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

/* ===================
   6. MICRO-INTERACTIONS
   =================== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-rotate {
    transition: all 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(3deg) scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 168, 232, 0.4),
                0 0 60px rgba(0, 212, 170, 0.2);
}

/* ===================
   7. FOCUS VISIBLE (ACCESSIBILITE)
   =================== */
*:focus-visible {
    outline: 3px solid #00D4AA;
    outline-offset: 3px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #00D4AA;
    outline-offset: 3px;
}

/* ===================
   8. SKIP LINKS
   =================== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #1E3A5F;
    color: white;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10001;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* ===================
   9. LISIBILITE AMELIOREE
   =================== */
.readable-text {
    max-width: 70ch;
    line-height: 1.8;
    color: #475569;
}

.section-spacing {
    margin-bottom: 5rem;
}

.content-spacing {
    padding: 3rem 0;
}

/* Amélioration du contraste */
.high-contrast-text {
    color: #1E3A5F;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ===================
   10. PUCES VISUELLES
   =================== */
.visual-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.visual-list-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
    color: #475569;
    line-height: 1.7;
}

.visual-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00A8E8, #00D4AA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-list-item::after {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 0.15rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===================
   11. CTA AVEC ANIMATIONS PULSE
   =================== */
.cta-pulse {
    animation: ctaPulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ctaPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 168, 232, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 40px rgba(0, 212, 170, 0.5);
    }
}

.cta-with-badge {
    position: relative;
}

.cta-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #FF6B6B;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: bounce 1s infinite;
}

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

/* ===================
   12. SWIPE GESTURES (MOBILE)
   =================== */
.swipeable {
    touch-action: pan-x;
    user-select: none;
}

/* ===================
   13. LOADING SKELETON
   =================== */
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

/* ===================
   14. RESPONSIVE - MOBILE
   =================== */
@media (max-width: 768px) {
    /* Breadcrumb mobile */
    .breadcrumb-nav {
        top: 60px;
        padding: 0.75rem 0;
    }

    .breadcrumb {
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    /* Navigation entre services */
    .service-navigation {
        right: 10px;
        bottom: 80px;
    }

    .service-nav-btn {
        width: 44px;
        height: 44px;
    }

    .service-nav-tooltip {
        display: none; /* Masqué sur mobile */
    }

    /* CTA Sticky mobile */
    .sticky-cta-mobile {
        display: block;
    }

    /* Tooltips mobile */
    .tooltip-content {
        position: fixed;
        left: 50%;
        bottom: 80px;
        transform: translateX(-50%);
        max-width: 90vw;
    }

    /* Texte lisible */
    .readable-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Espacement réduit */
    .section-spacing {
        margin-bottom: 3rem;
    }

    .content-spacing {
        padding: 2rem 0;
    }

    /* Zones cliquables minimum 44x44px */
    .touch-target {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===================
   15. TABLET OPTIMIZATION
   =================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .breadcrumb-nav {
        top: 70px;
    }

    .service-navigation {
        right: 15px;
    }

    .sticky-cta-mobile {
        display: none; /* Caché sur tablette */
    }
}

/* ===================
   16. ANIMATIONS AVANCEES
   =================== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-scale {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

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

.slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

/* ===================
   17. DARK MODE SUPPORT
   =================== */
@media (prefers-color-scheme: dark) {
    .breadcrumb-nav {
        background: rgba(13, 27, 42, 0.98);
        border-bottom-color: rgba(0, 168, 232, 0.2);
    }

    .breadcrumb-item a {
        color: #94A3B8;
    }

    .breadcrumb-item.active {
        color: #F8FAFC;
    }

    .service-nav-btn {
        background: #1E3A5F;
        color: white;
        border-color: rgba(0, 168, 232, 0.3);
    }

    .sticky-cta-mobile {
        background: #0D1B2A;
    }
}

/* ===================
   18. PRINT STYLES
   =================== */
@media print {
    .breadcrumb-nav,
    .reading-progress-bar,
    .service-navigation,
    .sticky-cta-mobile,
    .phone-button,
    .back-to-top {
        display: none !important;
    }

    .readable-text {
        max-width: 100%;
    }
}

/* ===================
   19. REDUCED MOTION
   =================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reading-progress-bar {
        transition: none;
    }
}

/* ===================
   20. HIGH CONTRAST MODE
   =================== */
@media (prefers-contrast: high) {
    .breadcrumb-item a:hover {
        background: #00A8E8;
        color: white;
    }

    .service-nav-btn:hover {
        border: 3px solid #00A8E8;
    }

    *:focus-visible {
        outline-width: 4px;
        outline-offset: 4px;
    }
}
