/* ====================================
   Variables CSS et Configuration
   ==================================== */
:root {
    /* Couleurs principales avec dégradés */
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #ee66aa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-card: linear-gradient(145deg, rgba(142, 45, 226, 0.05) 0%, rgba(74, 0, 224, 0.05) 100%);

    /* Couleurs neutres */
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Typographie */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================================
   Reset et Base
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
    overflow-x: hidden;
}

/* ====================================
   Typographie
   ==================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-dark);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

/* ====================================
   Navigation
   ==================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ====================================
   Hero Section - OPTIMISÉE ET SIMPLIFIÉE
   ==================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Couleur de fallback solide */
    background-color: var(--primary-color);
    /* Gradient par-dessus */
    background-image: var(--gradient-hero);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    padding: 100px 20px 50px;
    overflow: hidden;
    color: var(--white);
}

/* Décoration optionnelle - simplifiée */
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--white);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 80%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Styles de texte hero simplifiés */
.hero h1 {
    color: var(--white);
    background: none;
    -webkit-text-fill-color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    color: var(--white);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.4s;
    animation-fill-mode: both;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: var(--bg-light);
}

/* ====================================
   Services Section
   ==================================== */
.services {
    padding: 80px 20px;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ====================================
   Pricing Section
   ==================================== */
.pricing {
    padding: 80px 20px;
    background: var(--bg-light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.pricing-card.featured {
    transform: scale(1.05);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pricing-card:not(.featured):hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.pricing-card.featured h3,
.pricing-card.featured .price,
.pricing-card.featured p {
    color: white;
}

.price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.pricing-card.featured .pricing-features li {
    color: rgba(255, 255, 255, 0.9);
}

.pricing-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 600;
}

.pricing-card.featured .pricing-button {
    background: white;
    color: var(--primary-color);
}

.pricing-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ====================================
   Testimonials Section
   ==================================== */
.testimonials {
    padding: 80px 20px;
    background: var(--white);
}

.testimonials-slider {
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
}

.testimonial-card {
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 0 1rem;
    position: relative;
    box-shadow: var(--shadow);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 100px;
    color: var(--primary-color);
    opacity: 0.1;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.author-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-light);
    opacity: 0.3;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--primary-color);
    opacity: 1;
    transform: scale(1.2);
}

/* ====================================
   Contact Section
   ==================================== */
.contact {
    padding: 80px 20px;
    background: var(--bg-light);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--bg-light);
    transition: var(--transition);
    font-family: var(--font-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
}

.form-button {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(142, 45, 226, 0.3);
}

.contact-info {
    display: flex;
    flex-direction: column; /* Par défaut, une colonne (mobile) */
     width: 100%; /* Forcer la largeur totale en mobile */
    gap: 2rem;
}

/* Pour les écrans larges (exemple à partir de 768px) */
@media (min-width: 768px) {
    .contact-info {
        flex-direction: row; /* Passage à deux colonnes */
        flex-wrap: wrap;  /* Pour permettre un retour à la ligne si besoin */
    }
    .info-card {
        flex: 1 1 calc(50% - 1rem); /* Deux cartes par ligne, avec un petit espace */
        min-width: 300px; /* optionnel, limite la rétrécissement */
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    align-items: center;
    }
}


.info-card:hover {
    transform: translateX(10px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.info-text a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition), color 0.3s ease;
    cursor: pointer; /* Curseur main au survol */
    position: relative;
    padding-bottom: 2px;
}

.info-text a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.info-text a:hover,
.info-text a:focus {
    color: var(--primary-color);
    outline: none;
}

.info-text a:hover::after,
.info-text a:focus::after {
    width: 100%; /* Soulignement animé */
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.info-icon:hover {
    transform: rotate(10deg) scale(1.1); /* Animation subtile au survol */
}

/* Pour mobile, améliorer la taille du clic */
.info-text a {
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
}

.info-text a:active {
    background-color: var(--primary-color);
    color: white;
    transition: background-color 0.1s ease;
}

/* ====================================
   Footer
   ==================================== */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 50px 20px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

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

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================
   Responsive Design - AMÉLIORÉ
   ==================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: 2rem;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* Hero mobile optimisé */
    .hero {
        /* Force le rendu consistant sur mobile */
        background-attachment: scroll;
        background-color: var(--primary-color);
        background-image: var(--gradient-hero);
        padding: 120px 20px 60px;
    }
    
    .hero::after {
        height: 40px;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        color: var(--white) !important;
        -webkit-text-fill-color: var(--white) !important;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        color: var(--white) !important;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Optimisation pour très petits écrans */
@media (max-width: 480px) {
    .hero {
        /* Assure une couleur uniforme sur très petits écrans */
        background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    }
    
    .hero-content {
        padding: 0 10px;
    }
}

/* ====================================
   Utilities
   ==================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden {
    display: none;
}

/* ====================================
   Loading et Lazy Loading
   ==================================== */
.lazy-image {
    filter: blur(5px);
    transition: filter 0.5s;
}

.lazy-image.loaded {
    filter: blur(0);
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
