/* ========================================
   TXL OpenCode - Interface Moderne 2026
   Palette: Bleu Pastel Minimaliste
   ======================================== */

:root {
    /* Couleurs principales - Bleu Facebook */
    --primary-pastel: #1877F2;
    --primary-hover: #166FE5;
    --primary-dark: #0D5DBD;
    
    /* Neutres */
    --white: #FFFFFF;
    --gray-light: #F5F7FA;
    --gray-medium: #E8ECEF;
    --text-dark: #2C3E50;
    --text-muted: #6C757D;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #1877F2 0%, #166FE5 50%, #0D5DBD 100%);
    --gradient-card: linear-gradient(135deg, rgba(24, 119, 242, 0.1) 0%, rgba(22, 111, 229, 0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(24, 119, 242, 0.1);
    --shadow-md: 0 4px 16px rgba(24, 119, 242, 0.15);
    --shadow-lg: 0 8px 32px rgba(24, 119, 242, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(24, 119, 242, 0.2);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--gray-light);
    overflow-x: hidden;
}

/* ========================================
   NAVBAR MODERNE avec Blur
   ======================================== */

.navbar-modern {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(24, 119, 242, 0.2);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    z-index: 1030 !important; /* Assure que la navbar reste au-dessus de tout */
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark) !important;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-pastel);
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-dark) !important;
}

.nav-link:hover::after {
    width: 80%;
}

/* ========================================
   HERO SECTION - Gradient Animé Ultra Vivant
   ======================================== */

.hero-modern {
    position: relative;
    background: linear-gradient(135deg, #1877F2 0%, #FF00FF 25%, #00D4FF 50%, #FF00AA 75%, #1877F2 100%);
    min-height: 450px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: 400% 400%;
    animation: ultraGradientFlow 8s ease infinite;
    padding: 4rem 0 2rem;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
    pointer-events: none;
}

.hero-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.3) 0%, transparent 50%);
    animation: pulseGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ultraGradientFlow {
    0% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    33% { 
        background-position: 100% 50%;
        filter: hue-rotate(30deg);
    }
    66% { 
        background-position: 0% 100%;
        filter: hue-rotate(-30deg);
    }
    100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Particles Container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Typing Effect Container */
.typed-text {
    display: inline-block;
    min-width: 300px;
    border-right: 3px solid white;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

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

/* CTA Button 3D */
.btn-hero {
    background: white;
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.2s ease-out 0.4s both;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-pastel);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-hero:hover::before {
    width: 300px;
    height: 300px;
}

.btn-hero:active {
    transform: translateY(-2px);
}

/* Stats Counters */
.stats-container {
    margin-top: 4rem;
    animation: fadeInUp 1.4s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */

.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
}

.card-glass:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 16px 48px rgba(90, 156, 191, 0.25);
    border-color: var(--primary-pastel);
}

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

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-hero);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
}

.card-glass:hover .card-icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.card-icon i {
    font-size: 2.5rem;
    color: white;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========================================
   PROVIDER CARDS avec effet Premium
   ======================================== */

.provider-card-modern {
    background: white;
    border-radius: 20px;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.provider-card-modern::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--primary-pastel) 40deg,
        transparent 80deg
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
    animation: rotate 4s linear infinite;
    animation-play-state: paused;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.provider-card-modern:hover {
    transform: translateY(-8px);
    border-color: var(--primary-pastel);
    box-shadow: var(--shadow-lg);
}

.provider-card-modern:hover::after {
    opacity: 0.3;
    animation-play-state: running;
}

.provider-logo-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.provider-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-pastel);
    transition: all var(--transition-smooth);
}

.provider-card-modern:hover .provider-logo {
    border-color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(90, 156, 191, 0.3);
}

.provider-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: var(--gradient-hero);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.provider-badge i {
    color: white;
    font-size: 0.8rem;
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.search-modern {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: all var(--transition-smooth);
}

.search-modern:hover {
    box-shadow: var(--shadow-lg);
}

.form-control-modern {
    border: 2px solid var(--gray-medium);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--gray-light);
}

.form-control-modern:focus {
    border-color: var(--primary-pastel);
    background: white;
    box-shadow: 0 0 0 4px rgba(168, 216, 234, 0.1);
    outline: none;
}

.btn-search {
    background: var(--gradient-hero);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-search:active {
    transform: translateY(0);
}

/* ========================================
   RIPPLE EFFECT sur boutons
   ======================================== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   FOOTER MODERNE
   ======================================== */

.footer-modern {
    background: linear-gradient(180deg, var(--text-dark) 0%, #1a252f 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-pastel);
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-link:hover {
    color: var(--primary-pastel);
    transform: translateX(5px);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-pastel), transparent);
    margin: 2rem 0;
}

/* ========================================
   SCROLL PROGRESS BAR
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-hero);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========================================
   ANIMATIONS AOS (Scroll Reveal)
   ======================================== */

[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ========================================
   LOADING SKELETON
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, var(--gray-light) 25%, var(--gray-medium) 50%, var(--gray-light) 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; }
}

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

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-hero {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .card-glass {
        margin-bottom: 1.5rem;
    }
}

/* ========================================
   DARK MODE Support (pour plus tard)
   ======================================== */

[data-theme="dark"] {
    --white: #1a252f;
    --gray-light: #2C3E50;
    --gray-medium: #34495e;
    --text-dark: #ECF0F1;
}

[data-theme="dark"] .navbar-modern {
    background: rgba(26, 37, 47, 0.8) !important;
}

[data-theme="dark"] .card-glass {
    background: rgba(44, 62, 80, 0.5);
    border-color: rgba(168, 216, 234, 0.2);
}

[data-theme="dark"] .provider-card-modern {
    background: var(--gray-light);
    color: var(--text-dark);
}
