/* APROGSYS Website - Main Styles */

/* Import custom fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Global Styles */
:root {
    --primary-color: #1e55a9;
    --secondary-color: #2c98f0;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Prevent horizontal scroll on all devices */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: #19488e;
    border-color: #19488e;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.section-header {
    margin-bottom: 3rem;
}

/* Navbar Styles */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 0;
    transition: var(--transition);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-brand img {
    height: 45px;
    transition: var(--transition);
}

.navbar-scrolled {
    padding: 0.75rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar-scrolled .navbar-brand img {
    height: 40px;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover, 
.nav-link:focus, 
.nav-link.active {
    color: var(--primary-color);
}

.navbar .contact-btn {
    padding: 0.375rem 1.5rem !important;
    border-radius: 50px;
    margin-left: 0.5rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    position: absolute;
    z-index: 1050;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: #f1f7ff;
    color: var(--primary-color);
}

/* Ensure dropdowns work properly on desktop */
@media (min-width: 769px) {
    .navbar {
        overflow: visible !important;
    }
    
    .navbar-collapse {
        overflow: visible !important;
    }
    
    .dropdown-menu {
        margin-top: 0.5rem;
    }
}

/* Body padding for fixed navbar */
body {
    padding-top: 76px; /* Height of navbar */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Hero Enhancement Styles */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.text-highlight {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0 15px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(30, 85, 169, 0.4);
}

.hero-features {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.hero-features i {
    font-size: 1.2rem;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 15px rgba(30, 85, 169, 0.3);
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 85, 169, 0.4);
    background: linear-gradient(135deg, #19488e, var(--secondary-color));
}

.hero-btn-secondary {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
}

/* Hero Visual - Circular Cards */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cards {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Central element - optional logo or text */
.floating-cards::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(30, 85, 169, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.tech-card {
    position: absolute;
    background: rgba(30, 85, 169, 0.15);
    /* backdrop-filter removed for performance */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 1.2rem 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.tech-card:hover {
    background: rgba(30, 85, 169, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 30px rgba(30, 85, 169, 0.3);
    transform: scale(1.1);
    z-index: 10;
}

.tech-card i {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tech-card span {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    display: block;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
}

/* Ferris wheel container - static */
.floating-cards {
    transform-style: preserve-3d;
}

/* Position each card on the wheel */
.tech-card {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -45px; /* Half of card width */
    margin-top: -45px; /* Half of card height */
}

/* Initial card positions */
.tech-card-1 {
    animation: card-orbit-1 30s linear infinite;
}

.tech-card-2 {
    animation: card-orbit-2 30s linear infinite;
}

.tech-card-3 {
    animation: card-orbit-3 30s linear infinite;
}

.tech-card-4 {
    animation: card-orbit-4 30s linear infinite;
}

.tech-card-5 {
    animation: card-orbit-5 30s linear infinite;
}

.tech-card-6 {
    animation: card-orbit-6 30s linear infinite;
}

/* Card orbital animations - each card maintains upright position */
@keyframes card-orbit-1 {
    0% { transform: rotate(0deg) translateY(-140px) rotate(0deg); }
    16.67% { transform: rotate(60deg) translateY(-140px) rotate(-60deg); }
    33.33% { transform: rotate(120deg) translateY(-140px) rotate(-120deg); }
    50% { transform: rotate(180deg) translateY(-140px) rotate(-180deg); }
    66.67% { transform: rotate(240deg) translateY(-140px) rotate(-240deg); }
    83.33% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    100% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
}

@keyframes card-orbit-2 {
    0% { transform: rotate(60deg) translateY(-140px) rotate(-60deg); }
    16.67% { transform: rotate(120deg) translateY(-140px) rotate(-120deg); }
    33.33% { transform: rotate(180deg) translateY(-140px) rotate(-180deg); }
    50% { transform: rotate(240deg) translateY(-140px) rotate(-240deg); }
    66.67% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    83.33% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
    100% { transform: rotate(420deg) translateY(-140px) rotate(-420deg); }
}

@keyframes card-orbit-3 {
    0% { transform: rotate(120deg) translateY(-140px) rotate(-120deg); }
    16.67% { transform: rotate(180deg) translateY(-140px) rotate(-180deg); }
    33.33% { transform: rotate(240deg) translateY(-140px) rotate(-240deg); }
    50% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    66.67% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
    83.33% { transform: rotate(420deg) translateY(-140px) rotate(-420deg); }
    100% { transform: rotate(480deg) translateY(-140px) rotate(-480deg); }
}

@keyframes card-orbit-4 {
    0% { transform: rotate(180deg) translateY(-140px) rotate(-180deg); }
    16.67% { transform: rotate(240deg) translateY(-140px) rotate(-240deg); }
    33.33% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    50% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
    66.67% { transform: rotate(420deg) translateY(-140px) rotate(-420deg); }
    83.33% { transform: rotate(480deg) translateY(-140px) rotate(-480deg); }
    100% { transform: rotate(540deg) translateY(-140px) rotate(-540deg); }
}

@keyframes card-orbit-5 {
    0% { transform: rotate(240deg) translateY(-140px) rotate(-240deg); }
    16.67% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    33.33% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
    50% { transform: rotate(420deg) translateY(-140px) rotate(-420deg); }
    66.67% { transform: rotate(480deg) translateY(-140px) rotate(-480deg); }
    83.33% { transform: rotate(540deg) translateY(-140px) rotate(-540deg); }
    100% { transform: rotate(600deg) translateY(-140px) rotate(-600deg); }
}

@keyframes card-orbit-6 {
    0% { transform: rotate(300deg) translateY(-140px) rotate(-300deg); }
    16.67% { transform: rotate(360deg) translateY(-140px) rotate(-360deg); }
    33.33% { transform: rotate(420deg) translateY(-140px) rotate(-420deg); }
    50% { transform: rotate(480deg) translateY(-140px) rotate(-480deg); }
    66.67% { transform: rotate(540deg) translateY(-140px) rotate(-540deg); }
    83.33% { transform: rotate(600deg) translateY(-140px) rotate(-600deg); }
    100% { transform: rotate(660deg) translateY(-140px) rotate(-660deg); }
}

/* Pause animation on hover */
.floating-cards:hover .tech-card {
    animation-play-state: paused;
}

/* Hero Section */
.hero {
    height: 100vh;
    padding-top: 6rem;
    overflow: hidden;
    position: relative;
    margin-top: -76px; /* Compensate body padding for full height */
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Disable complex animations while scrolling */
body.is-scrolling .tech-card {
    animation-play-state: paused !important;
}

body.is-scrolling .hero-bg-image::before {
    transition: none !important;
}

/* Page Headers for internal pages */
.page-header {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Hero Background Slideshow */
.hero-background-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
    z-index: 0;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: auto; /* Let browser optimize */
    backface-visibility: hidden;
}

.hero-bg-image:first-child {
    z-index: 1;
}

/* Effet de balayage avec un masque blanc qui se déplace */
.hero-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        white 0%,
        white 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        transparent 100%
    );
    transform: translateX(0%) translateZ(0);
    transition: transform 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

/* Initialement, toutes les images sauf la première ont leur masque */
.hero-bg-image:not(:first-child)::before {
    transform: translateX(0%);
}

/* La première image n'a pas de masque dès le départ */
.hero-bg-image:first-child::before {
    transform: translateX(-120%);
}

/* Animation : le masque sort par la gauche, révélant l'image */
.hero-bg-image.sweep-reveal::before {
    transform: translateX(-120%);
}

/* Overlay pour améliorer la lisibilité */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: -1;
}

.hero h1 {
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white !important;
}

.hero p {
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    color: white !important;
}

.hero .btn {
    position: relative;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-img {
    max-height: 70vh;
    animation: float 6s ease-in-out infinite;
}

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

/* Services Section */
.services {
    padding: 6rem 0;
}

.service-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    padding: 1.5rem;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto;
    background-color: #f1f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .icon-wrapper {
    background-color: var(--primary-color);
    color: white;
}

.service-card:hover .icon-wrapper i {
    color: white;
}

/* MASSAI Project Section */
.massai-project {
    padding: 6rem 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.massai-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    background: url('../images/FondBandeauPresentation.jpg') center/cover no-repeat;
    opacity: 0.05;
    z-index: 0;
}

.massai-project .container {
    position: relative;
    z-index: 1;
}

.feature-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.massai-img {
    max-width: 90%;
    transition: var(--transition);
}

.massai-img:hover {
    transform: scale(1.02);
}

/* Clients Section */
.clients {
    padding: 6rem 0;
}

.client-logo {
    max-height: 70px;
    max-width: 100%;
    opacity: 0.7;
    transition: var(--transition);
    filter: grayscale(100%);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/FondBandeauPresentation.jpg') center/cover no-repeat fixed;
}

.cta-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
}

/* Footer */
.footer {
    background-color: #2b3140;
    color: #a3a8b3;
}

/* Footer logo enhancement */
.footer img[src*="logoaprogsys"] {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 60px;
    width: auto;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #a3a8b3;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
    padding-left: 5px;
}

.footer .social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    color: white;
}

.footer .social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        height: auto;
        padding: 10rem 0 4rem; /* Plus d'espace en haut pour éviter le chevauchement */
        margin-top: 0; /* Supprime le margin négatif sur mobile */
    }
    
    .hero-img {
        margin-top: 3rem;
        max-height: 50vh;
    }
    
    .massai-img {
        margin-top: 3rem;
        max-width: 100%;
    }
    
    /* Désactiver background-attachment fixed sur mobile pour les performances */
    .hero-bg-image {
        background-attachment: scroll;
    }
    
    /* Désactiver les animations complexes sur mobile pour les performances */
    .floating-cards {
        display: none !important;
    }
    
    .tech-card {
        animation: none !important;
        transform: none !important;
    }
    
    /* Optimiser le navbar sur mobile */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand img {
        height: 35px; /* Réduire la taille du logo */
    }
    
    /* Hero responsive adjustments */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        height: 300px;
        margin-top: 3rem;
    }
    
    .floating-cards {
        width: 280px;
        height: 280px;
    }
    
    .tech-card {
        width: 75px;
        height: 75px;
        padding: 0.8rem;
    }
    
    .tech-card i {
        font-size: 1.1rem !important;
    }
    
    .tech-card span {
        font-size: 0.7rem;
    }
    
    /* Adjust card position */
    .tech-card {
        margin-left: -37.5px;
        margin-top: -37.5px;
    }
    
    /* Update orbital animations for smaller radius */
    @keyframes card-orbit-1 {
        0% { transform: rotate(0deg) translateY(-110px) rotate(0deg); }
        16.67% { transform: rotate(60deg) translateY(-110px) rotate(-60deg); }
        33.33% { transform: rotate(120deg) translateY(-110px) rotate(-120deg); }
        50% { transform: rotate(180deg) translateY(-110px) rotate(-180deg); }
        66.67% { transform: rotate(240deg) translateY(-110px) rotate(-240deg); }
        83.33% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        100% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
    }
    @keyframes card-orbit-2 {
        0% { transform: rotate(60deg) translateY(-110px) rotate(-60deg); }
        16.67% { transform: rotate(120deg) translateY(-110px) rotate(-120deg); }
        33.33% { transform: rotate(180deg) translateY(-110px) rotate(-180deg); }
        50% { transform: rotate(240deg) translateY(-110px) rotate(-240deg); }
        66.67% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        83.33% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
        100% { transform: rotate(420deg) translateY(-110px) rotate(-420deg); }
    }
    @keyframes card-orbit-3 {
        0% { transform: rotate(120deg) translateY(-110px) rotate(-120deg); }
        16.67% { transform: rotate(180deg) translateY(-110px) rotate(-180deg); }
        33.33% { transform: rotate(240deg) translateY(-110px) rotate(-240deg); }
        50% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        66.67% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
        83.33% { transform: rotate(420deg) translateY(-110px) rotate(-420deg); }
        100% { transform: rotate(480deg) translateY(-110px) rotate(-480deg); }
    }
    @keyframes card-orbit-4 {
        0% { transform: rotate(180deg) translateY(-110px) rotate(-180deg); }
        16.67% { transform: rotate(240deg) translateY(-110px) rotate(-240deg); }
        33.33% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        50% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
        66.67% { transform: rotate(420deg) translateY(-110px) rotate(-420deg); }
        83.33% { transform: rotate(480deg) translateY(-110px) rotate(-480deg); }
        100% { transform: rotate(540deg) translateY(-110px) rotate(-540deg); }
    }
    @keyframes card-orbit-5 {
        0% { transform: rotate(240deg) translateY(-110px) rotate(-240deg); }
        16.67% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        33.33% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
        50% { transform: rotate(420deg) translateY(-110px) rotate(-420deg); }
        66.67% { transform: rotate(480deg) translateY(-110px) rotate(-480deg); }
        83.33% { transform: rotate(540deg) translateY(-110px) rotate(-540deg); }
        100% { transform: rotate(600deg) translateY(-110px) rotate(-600deg); }
    }
    @keyframes card-orbit-6 {
        0% { transform: rotate(300deg) translateY(-110px) rotate(-300deg); }
        16.67% { transform: rotate(360deg) translateY(-110px) rotate(-360deg); }
        33.33% { transform: rotate(420deg) translateY(-110px) rotate(-420deg); }
        50% { transform: rotate(480deg) translateY(-110px) rotate(-480deg); }
        66.67% { transform: rotate(540deg) translateY(-110px) rotate(-540deg); }
        83.33% { transform: rotate(600deg) translateY(-110px) rotate(-600deg); }
        100% { transform: rotate(660deg) translateY(-110px) rotate(-660deg); }
    }
    
    .hero-features {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .cta-content {
        padding: 3rem 2rem !important;
    }
    
    /* Hero mobile optimizations */
    .hero {
        padding: 8rem 0 3rem; /* Ajuster pour le header mobile */
        margin-top: 0 !important;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* S'assurer que le texte est visible */
    .hero .text-highlight {
        background: var(--primary-color);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
    }
    
    .hero-visual {
        display: none; /* Hide floating cards on small mobile */
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-features {
        margin-bottom: 2rem !important;
    }
    
    /* Navbar optimizations for mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand img {
        height: 30px;
        max-width: 140px;
        object-fit: contain;
    }
    
    /* S'assurer que le logo et le menu restent sur la même ligne */
    .navbar > .container {
        flex-wrap: nowrap !important;
    }
    
    .navbar-brand {
        flex-shrink: 1;
        overflow: hidden;
    }
    
    /* Désactiver toutes les animations lourdes sur mobile */
    * {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
    }
    
    .hero-bg-image::before,
    .hero-bg-image::after {
        display: none !important;
    }
    
    /* Simplifier les backgrounds */
    .hero-bg-image {
        background-image: none !important;
        background-color: var(--light-color);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.slide-in-left {
    animation: slideInLeft 1s ease-in-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-in-out;
}

.zoom-in {
    animation: zoomIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Innovation Animation - Version avec Images et Effets de Fondu */
.innovation-animation {
    position: relative;
    display: inline-block;
    padding: 2rem;
}

.animation-container {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
    animation: float 8s ease-in-out infinite;
}

/* Animation de flottement plus subtile */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.02);
    }
}

/* Effets de fond SVG */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Éléments décoratifs */
.decorative-elements {
    opacity: 0.6;
}

/* Conteneur du slideshow d'images */
.image-slideshow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 2;
}

/* Styles pour les images d'innovation PNG */
.innovation-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
    filter: drop-shadow(0 10px 30px rgba(30, 85, 169, 0.2));
    /* Optimisations pour PNG */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
    /* Éviter les scintillements */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.innovation-image.active {
    opacity: 1;
    z-index: 2;
}

/* Animation de pulse pour l'image active - simplifiée pour éviter les conflits */
.innovation-image.active {
    animation: imageGlow 6s ease-in-out infinite alternate;
}

@keyframes imageGlow {
    0% {
        filter: drop-shadow(0 10px 30px rgba(30, 85, 169, 0.2));
    }
    100% {
        filter: drop-shadow(0 15px 40px rgba(44, 152, 240, 0.3));
    }
}

/* Effet hover sur le conteneur */
.animation-container:hover {
    animation-play-state: paused;
}

.animation-container:hover .innovation-image.active {
    filter: drop-shadow(0 20px 50px rgba(44, 152, 240, 0.6));
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 992px) {
    .animation-container {
        width: 500px;
        height: 500px;
    }
    
    .image-slideshow {
        width: 350px;
        height: 350px;
    }
    
    .innovation-animation {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .animation-container {
        width: 400px;
        height: 400px;
    }
    
    .image-slideshow {
        width: 280px;
        height: 280px;
    }
    
    .innovation-animation {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .animation-container {
        width: 320px;
        height: 320px;
    }
    
    .image-slideshow {
        width: 220px;
        height: 220px;
    }
}

/* Elips Pharma Project Section */
.elips-pharma {
    position: relative;
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.elips-img {
    max-width: 90%;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    /* Ensure no horizontal overflow on mobile only */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
    
    /* Fix container width on mobile */
    .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ensure navbar stays within bounds */
    .navbar {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .navbar .container {
        max-width: 100% !important;
    }
    
    /* Fix navbar toggler position */
    .navbar-toggler {
        margin-right: 0 !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* Ensure all sections stay within viewport */
    section, header, footer {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Fix any images that might be too wide */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Mobile navigation - Design pleine largeur avec scroll */
    .navbar-collapse {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        margin: 0; /* Reset margin */
        padding: 1.5rem;
        border-radius: 0; /* Pas de border-radius pour pleine largeur */
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
        border-top: 2px solid var(--primary-color);
        max-height: calc(100vh - 80px); /* Hauteur max = hauteur écran - header */
        overflow-y: auto; /* Scroll vertical */
        overflow-x: hidden;
        position: fixed; /* Position fixe pour éviter le scroll de la page */
        left: 0;
        right: 0;
        top: 70px; /* Juste sous le navbar fixe */
        z-index: 1040; /* Sous le navbar mais au-dessus du contenu */
        width: 100vw; /* Pleine largeur de l'écran */
    }
    
    /* Style pour la barre de scroll */
    .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }
    
    .navbar-collapse::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
    
    /* Bloquer le scroll de la page quand le menu est ouvert */
    body.navbar-open {
        overflow: hidden;
    }
    
    /* Menu mobile avec accordéon */
    .navbar-nav .nav-item.dropdown {
        margin-bottom: 1rem;
        border-bottom: 1px solid rgba(30, 85, 169, 0.1);
        padding-bottom: 1rem;
    }
    
    .navbar-nav .nav-item.dropdown:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    /* Titre de section mobile (non cliquable, juste indicatif) */
    .navbar-nav .dropdown-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white !important;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        cursor: default;
        pointer-events: none;
        border: none;
        outline: none;
        transition: none;
    }
    
    /* Icône fixe pour les sections (toujours ouvertes) */
    .navbar-nav .dropdown-toggle::after {
        content: '▼';
        border: none;
        font-size: 1rem;
        font-weight: bold;
        margin-left: 0;
        vertical-align: 0;
        opacity: 0.8;
    }
    
    /* Sous-menu mobile visible par défaut */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        background: rgba(248, 249, 250, 0.8) !important;
        border: 1px solid rgba(30, 85, 169, 0.1) !important;
        border-radius: 8px !important;
        box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05) !important;
        padding: 0.5rem !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    
    /* Items du sous-menu */
    .navbar-nav .dropdown-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        color: var(--dark-color);
        border-radius: 6px;
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .dropdown-item:last-child {
        margin-bottom: 0;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateX(5px);
    }
    
    .navbar-nav .dropdown-item::before {
        content: '→';
        margin-right: 0.5rem;
        transition: transform 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover::before {
        transform: translateX(3px);
    }
    
    /* Menu Accueil et Contact */
    .navbar-nav .nav-item:not(.dropdown) .nav-link {
        padding: 0.75rem 1rem;
        background: rgba(30, 85, 169, 0.1);
        color: var(--primary-color) !important;
        border-radius: 8px;
        font-weight: 600;
        margin-bottom: 0.5rem;
        transition: all 0.3s ease;
        display: block;
    }
    
    .navbar-nav .nav-item:not(.dropdown) .nav-link:hover {
        background: var(--primary-color);
        color: white !important;
        transform: translateY(-2px);
    }
    
    /* Contact button spécial */
    .navbar-nav .contact-btn {
        background: linear-gradient(135deg, var(--success-color), #20c997) !important;
        color: white !important;
        font-weight: bold;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    
    .navbar-nav .contact-btn:hover {
        background: linear-gradient(135deg, #1e7e34, #17a085) !important;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }
}

/* Desktop specific fixes to ensure dropdowns work */
@media (min-width: 769px) {
    /* Remove overflow restrictions on desktop */
    html {
        overflow-x: auto !important;
    }
    
    body {
        overflow-x: visible !important;
    }
}

/* Very small devices (phones < 576px) */
@media (max-width: 576px) {
    .service-box {
        padding: 2rem 1rem;
    }
    
    h1, .display-4 {
        font-size: 1.5rem !important;
    }
    
    h2, .display-5 {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Hero section ajustements pour très petits écrans */
    .hero {
        padding: 6rem 0 2rem !important;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    /* Navbar pour très petits écrans */
    .navbar-brand img {
        height: 28px !important;
        max-width: 120px !important;
    }
    
    .navbar {
        padding: 0.4rem 0 !important;
    }
    
    /* S'assurer que le container utilise tout l'espace disponible */
    .navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Réduire la taille du toggler */
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    /* Améliorer les performances en désactivant les effets */
    .aos-animate {
        opacity: 1 !important;
        transform: none !important;
    }
    
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
