/* ===================================
   MKREA - Custom Styles DYNAMIQUES
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Border Utilities */
.border-subtle {
    border: 1px solid rgba(226, 232, 240, 0.7);
}

.dark .border-subtle {
    border: 1px solid rgba(30, 41, 59, 0.6);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Background Container */
#hero-3d-bg {
    position: absolute;
    inset: 0;
    z-index: -10;
    overflow: hidden;
}

#hero-3d-bg canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Performance Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   EFFETS GLASSMORPHISM
   =================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.1);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.2);
}

/* ===================================
   ANIMATIONS AVANCÉES
   =================================== */

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ===================================
   HOVER EFFECTS PREMIUM
   =================================== */

.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.hover-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(99, 102, 241, 0.3),
            transparent);
    transition: left 0.5s ease;
}

.hover-glow:hover::before {
    left: 100%;
}

/* ===================================
   BUTTONS DYNAMIQUES
   =================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* ===================================
   CARDS SERVICES EFFET 3D
   =================================== */

.service-card {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.service-card:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.service-card:hover::before {
    opacity: 1;
}

/* ===================================
   STATS COUNTER ANIMATION
   =================================== */

.stat-item {
    transition: all 0.4s ease;
}

.stat-item:hover {
    transform: scale(1.1);
}

.stat-value {
    background: linear-gradient(135deg, #6366f1, #818cf8, #c4b5fd);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

/* ===================================
   PORTFOLIO CARDS
   =================================== */

.portfolio-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0) 0%,
            rgba(99, 102, 241, 0.2) 50%,
            rgba(99, 102, 241, 0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.portfolio-card:hover::after {
    transform: translateX(100%);
}

.portfolio-card:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3);
}

/* ===================================
   NAVIGATION EFFECTS
   =================================== */

nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ===================================
   LOADING SHIMMER
   =================================== */

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: shine 2s infinite;
}

/* ===================================
   GRADIENT TEXT
   =================================== */

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #c4b5fd 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

/* ===================================
   RESPONSIVE ANIMATIONS
   =================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode intensifié */
.dark body {
    background-color: #020617;
}

/* ===================================
   MICRO-INTERACTIONS
   =================================== */

button,
a {
    cursor: pointer;
    user-select: none;
}

button:active {
    transform: scale(0.98);
}

/* Focus visible pour accessibilité */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ===================================
   TYPOGRAPHIE CRÉATIVE & EFFETS TEXTUELS
   =================================== */

/* Effet Surligneur Créatif */
.highlight-creative {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.highlight-creative::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(99, 102, 241, 0.4);
    /* Indigo semi-transparent */
    z-index: -1;
    transform: skewX(-15deg) rotate(-2deg);
    transition: all 0.3s ease;
}

.highlight-creative:hover::after {
    height: 60%;
    background-color: rgba(99, 102, 241, 0.6);
}

/* Texte "Mix-Weight" (Contraste Gras/Fin) */
.mix-weight strong {
    font-weight: 800;
    color: #6366f1;
    /* Indigo brand */
}

.dark .mix-weight strong {
    color: #818cf8;
    /* Indigo light */
}

/* Animation d'apparition mots par mots (utilisation avec JS ou délais CSS) */
.word-reveal {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: revealText 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

@keyframes revealText {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   EXPERTISE CREATIVE CARDS
   =================================== */

.expertise-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.expertise-card:hover {
    transform: translateY(-5px);
}

.expertise-number {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(226, 232, 240, 0.5);
    /* Slate-200 opacity 0.5 */
    transition: all 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.dark .expertise-number {
    color: rgba(30, 41, 59, 0.5);
    /* Slate-800 opacity 0.5 */
}

.expertise-card:hover .expertise-number {
    transform: scale(1.1) rotate(-5deg);
    color: rgba(99, 102, 241, 0.1);
    /* Brand color very light */
}

/* Gradient Border Bottom */
.expertise-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #c4b5fd);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   PROCESS STUDIO - TIMELINE
   =================================== */

/* ===================================
   AMBIENT GLOW & REFINEMENTS
   =================================== */

.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Re-centering Process Connector */
.process-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Process Grid Layout Refined */
.process-grid-custom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
    /* Constrain width for better centering */
    margin: 0 auto;
    position: relative;
    padding-top: 0;
}

@media (min-width: 768px) {
    .process-grid-custom {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Connector adjusted for centered grid */
.process-connector {
    position: absolute;
    top: 24px;
    left: 12.5%;
    /* Start from center of first item (100% / 4 items / 2) */
    width: 75%;
    /* Span to center of last item */
    height: 2px;
    background: repeating-linear-gradient(90deg,
            #cbd5e1 0,
            #cbd5e1 6px,
            transparent 6px,
            transparent 12px);
    z-index: -1;
    opacity: 0.3;
}

.dark .process-connector {
    background: repeating-linear-gradient(90deg,
            #334155 0,
            #334155 6px,
            transparent 6px,
            transparent 12px);
}

/* Effet ligne lumineuse au survol */
.process-connector::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
    transform: translateX(-100%);
    transition: transform 1s ease-in-out;
}

.process-container:hover .process-connector::after {
    transform: translateX(100%);
    transition: transform 2s linear infinite;
}

/* Cercles Neon */
.neon-circle {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover .neon-circle {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6), 0 0 0 8px rgba(99, 102, 241, 0.1);
    background: #4f46e5;
}

/* Pulse animation pour les cercles */
@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.neon-circle.active {
    animation: neon-pulse 2s infinite;
}

/* Step Card */
.step-card {
    position: relative;
    padding: 1rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
}

.dark .step-card:hover {
    background: rgba(30, 41, 59, 0.3);
}

.title-decorative {
    position: relative;
    padding-left: 20px;
}

/* ===================================
   FAQ & CUSTOM SCROLLBAR
   =================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Text Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: inherit;
}

/* FAQ Accordion Transitions */
.faq-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.answer-content {
    transition: all 0.3s ease-in-out;
}

.hero-subtitle-styled {
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #475569;
    font-weight: 500;
    letter-spacing: 0.025em;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    text-align: center;
}

.dark .hero-subtitle-styled {
    color: #94a3b8;
}


.title-decorative::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #6366f1, #c4b5fd);
    border-radius: 4px;
}

/* Effet "Glitch" léger au survol */
.text-shift {
    position: relative;
    display: inline-block;
}

.text-shift:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #818cf8;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

/* Effet Glass Text pour grands titres */
.glass-text {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Blockquote stylisée */
.quote-creative {
    font-size: 1.25rem;
    font-style: italic;
    border-left: 4px solid #6366f1;
    padding-left: 1.5rem;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    padding: 1rem 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
}