/* Mobile Responsive Fixes - Version Optimisée */

@media (max-width: 768px) {
    /* Base Settings */
    html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        font-size: 16px;
        line-height: 1.5;
        overflow-x: hidden;
        background: var(--light);
    }
    
    /* Navigation Mobile - Simplifié */
    .navbar {
        padding: 1rem 0;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-container {
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--white);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .nav-link, .nav-cta {
        padding: 1rem 2rem;
        margin: 0.25rem 0;
        border-radius: 10px;
        width: 80%;
        font-size: 1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        text-decoration: none;
        display: block;
    }
    
    .nav-link {
        background: rgba(255, 255, 255, 0.1);
        color: var(--white);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }
    
    .nav-cta {
        background: var(--gradient-accent);
        color: var(--white);
        border: none;
    }
    
    .nav-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: var(--white);
        cursor: pointer;
        font-size: 1.2rem;
        touch-action: manipulation;
    }
    
    /* Hero Section Mobile - Positionnement optimal */
    .hero {
        min-height: calc(100vh - 70px) !important;
        margin-top: 70px !important;
        padding: 2rem 1rem 3rem !important;
        text-align: center;
        background: var(--gradient);
        position: relative;
        display: flex !important;
        align-items: flex-start !important;
    }
    
    .hero-container {
        max-width: none;
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .hero-content {
        width: 100%;
        max-width: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        font-weight: 800;
        color: var(--white);
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.6;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 12px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        cursor: pointer;
        border: none;
    }
    
    .btn-primary {
        background: var(--gradient-accent);
        color: var(--white);
        box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    }
    
    .btn-secondary {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }
    
    .hero-visual {
        width: 100%;
        order: -1;
        margin-bottom: 2rem;
    }
    
    .hero-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .hero-card {
        padding: 1rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        transition: all 0.3s ease;
    }
    
    .hero-card:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.15);
    }
    
    .hero-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        color: var(--white);
        font-weight: 700;
    }
    
    .hero-card p {
        font-size: 0.8rem;
        margin: 0;
        color: rgba(255, 255, 255, 0.8);
    }
    
    /* Services Section Mobile - CORRIGÉ */
    .services {
        padding: 4rem 1rem;
        background: var(--white);
    }
    
    .section-header {
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .section-badge {
        background: var(--gradient-secondary);
        color: var(--white);
        padding: 0.5rem 1.5rem;
        border-radius: 50px;
        font-size: 0.85rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        font-weight: 800;
        color: var(--primary);
    }
    
    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        color: var(--gray);
        line-height: 1.6;
    }
    
    .services-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .service-card {
        background: var(--white);
        border-radius: 15px;
        padding: 2rem 1.5rem;
        text-align: center;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
    
    .service-icon {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
        margin: 0 auto 1.5rem;
        background: var(--gradient-secondary);
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        transition: all 0.3s ease;
    }
    
    .service-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: var(--primary);
    }
    
    .service-description {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--gray);
        margin-bottom: 1.5rem;
    }
    
    .service-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--secondary);
        font-weight: 600;
        text-decoration: none;
        padding: 0.75rem 1.5rem;
        border-radius: 25px;
        background: rgba(59, 130, 246, 0.1);
        transition: all 0.3s ease;
    }
    
    .service-link:hover {
        background: var(--secondary);
        color: var(--white);
        transform: translateX(5px);
    }
    
    /* Stats Section Mobile */
    .stats {
        padding: 4rem 1rem;
        background: var(--gradient);
        color: var(--white);
    }
    
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .stat-card {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        padding: 2rem 1rem;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .stat-card:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.15);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin: 0 auto 1rem;
        background: var(--gradient-accent);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
    }
    
    .stat-number {
        font-size: 1.8rem;
        font-weight: 800;
        margin-bottom: 0.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
        opacity: 0.9;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    /* CTA Section Mobile */
    .cta {
        padding: 4rem 1rem;
        text-align: center;
        background: var(--gradient-accent);
        color: var(--white);
    }
    
    .cta-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        font-weight: 800;
    }
    
    .cta-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        opacity: 0.9;
        line-height: 1.6;
    }
    
    .cta-container .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 3rem 1rem 2rem;
        background: var(--dark);
        color: var(--white);
    }
    
    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        order: 1;
    }
    
    .footer-logo {
        font-size: 1.5rem;
        font-weight: 800;
        margin-bottom: 1rem;
        color: var(--accent);
        text-decoration: none;
    }
    
    .footer-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        opacity: 0.8;
        line-height: 1.6;
    }
    
    .footer-social {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 0;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .social-link:hover {
        background: var(--accent);
        transform: translateY(-3px);
    }
    
    .footer-column {
        order: 2;
    }
    
    .footer-column h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: var(--accent);
        font-weight: 700;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .footer-links a {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        padding: 0.5rem 0;
        transition: all 0.3s ease;
    }
    
    .footer-links a:hover {
        color: var(--white);
        transform: translateX(5px);
    }
    
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
        opacity: 0.6;
        margin: 0;
    }
    
    /* Animations Mobile - Simplifiées */
    .animate-on-scroll {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Empêcher les débordements */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Améliorer le touch sur mobile */
    button, a, .service-card, .stat-card {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Petits écrans - Max 480px */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
}

/* Petits écrans - Max 480px */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .hero-cards {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .hero-card {
        padding: 1rem !important;
    }
    
    .services-grid {
        padding: 0 0.5rem;
        gap: 1rem;
        min-height: 150px !important;
    }
    
    .service-card {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
        opacity: 1 !important;
        visibility: visible !important;
        min-height: 250px !important;
        background: var(--white) !important;
    }
    
    .service-card .service-icon {
        width: 100px !important; /* Carré : 100px x 100px pour petits écrans */
        height: 100px !important; /* Carré : 100px x 100px */
        margin: 0 auto 0.75rem !important; /* Centré horizontalement */
        display: flex !important; /* Flex pour centrer verticalement */
        align-items: center !important; /* Centrage vertical */
        justify-content: center !important; /* Centrage horizontal */
        background-color: #f0f0f0 !important;
        flex-shrink: 0 !important; /* Évite la réduction */
    }
    
    .service-title {
        font-size: 1rem;
        color: var(--dark) !important;
    }
    
    .service-description {
        font-size: 0.85rem;
        color: var(--gray) !important;
    }
    
    /* Force display of all elements */
    .service-card * {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .service-card span {
        display: inline-block !important;
    }
}
