/* ==========================================
   VARIABLES & RESET
========================================== */
:root {
    /* Couleurs */
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    
    /* Typographie */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light);
}

/* ==========================================
   TYPOGRAPHIE
========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.text-white-70 {
    color: rgba(255, 255, 255, 0.7);
}

.gradient-text {
    color: white;
}

/* ==========================================
   COMPOSANTS NAVBAR
========================================== */
.navbar {
    padding: 1rem 0;
    transition: all var(--transition-normal);
    background-color: transparent;
}

.navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--light) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: all var(--transition-normal);
}

.nav-link:hover::after {
    width: 70%;
    transform: translateX(-50%) scaleX(1);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==========================================
   SECTION HERO
========================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.display-2 {
    font-size: 4rem;
    line-height: 1.1;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline-light {
    border: 2px solid white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chevron {
    width: 20px;
    height: 5px;
    background: white;
    margin: 3px 0;
    border-radius: 2px;
    animation: bounce 2s infinite;
}

.chevron:nth-child(2) {
    animation-delay: 0.2s;
}

.chevron:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* ==========================================
   SECTION SERVICES
========================================== */
#services {
    margin-top: 5rem;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    line-height: 1;
}

.icon-display {
    display: inline-block;
    font-size: 3rem;
}

/* ==========================================
   SECTION PORTFOLIO
========================================== */
.portfolio-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.portfolio-card:hover .overlay-content {
    transform: translateY(0);
}

/* ==========================================
   SECTION PROCESSUS
========================================== */
.timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 4rem auto;
    max-width: 1200px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-item {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
    padding: 0 1rem;
}

.timeline-content {
    background: white;
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
    }
    
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 3px;
        height: 100%;
        transform: translateX(-50%);
    }
    
    .timeline-item {
        margin-bottom: 2rem;
        padding: 0;
    }
    
    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================
   SECTION OFFRES
========================================== */
.bg-gradient-offres {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.pricing-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
    height: 100%;
}

.pricing-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.pricing-card.popular {
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.08);
}

.popular-badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 3rem;
    transform: rotate(45deg);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
}

.pricing-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.pricing-body {
    padding: 2rem;
    text-align: center;
}

.btn-accent {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-accent:hover {
    background: #db2777;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.3);
}

/* ==========================================
   SECTION FEATURES
========================================== */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
}

/* ==========================================
   SECTION FAQ
========================================== */
.accordion-button {
    font-weight: 500;
    padding: 1.25rem;
    background-color: white;
    border: 1px solid var(--gray-light);
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.accordion-body {
    padding: 1.25rem;
    border: 1px solid var(--gray-light);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* ==========================================
   SECTION CONTACT
========================================== */
.bg-gradient-contact {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-header h3 {
    color: white;
    font-weight: 600;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details h5 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: block;
    margin-bottom: 0.25rem;
}

.contact-link:hover {
    color: var(--accent);
}

.contact-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.contact-cta {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

/* ==========================================
   FOOTER
========================================== */
.footer {
    background: var(--dark);
}

.footer-brand .logo-text {
    font-size: 2rem;
}

.footer-link {
    color: var(--gray);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ==========================================
   COMPOSANTS GÉNÉRAUX
========================================== */
.btn-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   ANIMATIONS
========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-slow) forwards;
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 768px) {
    .display-2 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding-top: 80px;
    }
    
    .timeline::before {
        display: none;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .pricing-card:hover,
    .pricing-card.popular:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 576px) {
    .display-2 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ==========================================
   UTILITAIRES
========================================== */
.mt-6 {
    margin-top: 4rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.py-6 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.min-vh-100 {
    min-height: 100vh;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* ==========================================
   SPINNER DE CHARGEMENT
========================================== */
.spinner-border {
    vertical-align: middle;
}

/* ==========================================
   RESPONSIVE MOBILE
========================================== */
@media (max-width: 768px) {
    /* Réduire la taille des métriques dans les modaux */
    .metric-value {
        font-size: 1.2rem;
    }
    
    .metric-label {
        font-size: 0.75rem;
    }
    
    /* Ajuster les liens de contact pour éviter le débordement */
    .contact-link {
        word-break: break-word;
        overflow-wrap: break-word;
        font-size: 0.9rem;
    }
}