/* Responsive Design */

/* Tablettes (768px et moins) */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .navbar {
        padding: 15px 25px;
    }

    .navbar.scrolled {
        padding: 10px 25px;
    }

    .nav-links {
        display: none;
    }

    /* Affichage du menu mobile quand actif */
    .nav-links.active {
        display: flex;
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 10px;
        padding: 20px 25px;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }

    /* Texte des liens - style cohérent avec le thème */
    .nav-links.active a {
        color: var(--text-primary);
        padding: 12px 0;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-links.active a:last-child {
        border-bottom: none;
    }

    .nav-links.active a:hover {
        color: var(--primary-color);
    }

    .nav-links.active a::before {
        background: var(--primary-color);
    }

    .nav-controls {
        gap: 10px;
    }
    
    .game-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .game-icon {
        font-size: 14px;
    }
    
    .game-text {
        font-size: 10px;
    }
    
    .contact-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .mobile-menu-btn {
        display: flex;
    }
    
    /* Game Container Mobile */
    .game-overlay {
        padding: 10px;
    }
    
    .game-content {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .game-header {
        padding: 15px 20px;
    }
    
    .game-header h3 {
        font-size: 16px;
    }
    
    .game-close-btn {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .game-body {
        padding: 20px;
    }
    
    .game-body p {
        font-size: 14px;
    }
    
    .game-placeholder {
        padding: 30px 15px;
    }
    
    .game-placeholder-icon {
        font-size: 36px;
    }

    .hero-content {
        padding: 0 25px;
    }

    .hero-info {
        gap: 40px;
        flex-direction: column;
    }

    .about,
    .portfolio,
    .services,
    .contact {
        padding: 100px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .process-steps {
        flex-direction: column;
        gap: 40px;
    }

    .step {
        text-align: center;
    }

    .step-number {
        font-size: 36px;
    }

    .service-card {
        padding: 30px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .contact-methods {
        gap: 15px;
    }

    .contact-method {
        padding: 15px;
    }

    .contact-method-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 15px 25px;
        font-size: 16px;
        width: 100%;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    /* NOUVEAU: Portfolio Filters Mobile - Défilement horizontal */
    .portfolio-filters {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 12px 0;
        margin: 0 -25px;
        padding-left: 25px;
        padding-right: 25px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        display: block;
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        display: inline-block;
        white-space: nowrap;
        margin-right: 12px;
        padding: 10px 16px;
        font-size: 14px;
        min-width: auto;
        flex-shrink: 0;
    }

    .filter-btn:last-child {
        margin-right: 25px;
    }

    /* NOUVEAU: Page de projet mobile */
    .project-modal {
        padding: 0;
    }

    .project-modal-content {
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        overflow-y: auto;
    }

    .project-modal-header {
        padding: 20px 25px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: rgba(0, 0, 0, 0.95);
    }

    .project-modal-header h2 {
        font-size: 24px;
        line-height: 1.2;
    }

    .back-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .project-modal-body {
        padding: 25px;
    }

    .gallery-main-image {
        max-width: 100%;
        margin: 0;
    }

    .gallery-current-image {
        max-width: 100%;
        max-height: 60vh;
    }

    .gallery-controls {
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        border-radius: 25px;
        padding: 8px 16px;
        gap: 15px;
    }

    .gallery-prev,
    .gallery-next {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .gallery-counter {
        font-size: 12px;
        min-width: 40px;
        text-align: center;
    }

    .gallery-thumbnails {
        margin: 20px 0;
        padding: 0 25px;
    }

    .gallery-thumbnails-container {
        gap: 10px;
        padding: 10px 0;
    }

    .gallery-thumb {
        width: 80px;
        height: 45px;
        flex-shrink: 0;
    }

    .gallery-slider-nav {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .gallery-slider-nav.prev {
        left: 0;
    }

    .gallery-slider-nav.next {
        right: 0;
    }

    /* NOUVEAU: Invitation projet suivant mobile */
    .next-project-invitation {
        margin-top: 40px;
        padding: 25px;
    }

    .next-project-card {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .next-project-image {
        width: 100%;
        height: 120px;
    }

    .next-project-info h4 {
        font-size: 18px;
    }

    .next-project-category,
    .next-project-year {
        font-size: 12px;
    }
}

/* Mobiles (480px et moins) */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .navbar {
        padding: 10px 20px;
    }

    .logo {
        font-size: 20px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .hero-info {
        gap: 30px;
    }

    .info-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .info-title {
        font-size: 16px;
    }

    .info-desc {
        font-size: 12px;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .about-text h2 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .about-text p {
        font-size: 16px;
    }

    .step-number {
        font-size: 32px;
    }

    .step-title {
        font-size: 14px;
    }

    .step-desc {
        font-size: 12px;
    }

    .portfolio-item {
        aspect-ratio: 3/2;
    }

    .portfolio-image {
        font-size: 36px;
    }

    .portfolio-info {
        padding: 20px;
    }

    .portfolio-title {
        font-size: 18px;
    }

    .portfolio-category {
        font-size: 12px;
    }

    .service-card {
        padding: 25px;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 20px;
    }

    .service-title {
        font-size: 20px;
    }

    .service-desc {
        font-size: 14px;
    }

    .contact-info h3 {
        font-size: 24px;
    }

    .contact-info p {
        font-size: 16px;
    }

    .contact-method {
        padding: 12px;
    }

    .contact-method-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 12px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .footer-brand h3 {
        font-size: 24px;
    }

    .footer-brand p {
        font-size: 14px;
    }

    .footer-section h4 {
        font-size: 18px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* NOUVEAU: Portfolio Filters Mobile - Défilement horizontal optimisé */
    .portfolio-filters {
        padding: 15px 0;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
        margin-right: 12px;
    }

    .filter-btn:last-child {
        margin-right: 20px;
    }

    /* NOUVEAU: Page de projet mobile optimisée */
    .project-modal-header {
        padding: 15px 20px;
    }

    .project-modal-header h2 {
        font-size: 20px;
    }

    .back-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .project-modal-body {
        padding: 20px;
    }

    .gallery-current-image {
        max-height: 50vh;
    }

    .gallery-controls {
        bottom: 10px;
        padding: 6px 12px;
        gap: 12px;
    }

    .gallery-prev,
    .gallery-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .gallery-counter {
        font-size: 11px;
        min-width: 35px;
    }

    .gallery-thumbnails {
        margin: 15px 0;
        padding: 0 20px;
    }

    .gallery-thumb {
        width: 70px;
        height: 40px;
    }

    .gallery-slider-nav {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }

    /* NOUVEAU: Invitation projet suivant mobile optimisée */
    .next-project-invitation {
        margin-top: 30px;
        padding: 20px;
    }

    .next-project-card {
        padding: 15px;
    }

    .next-project-image {
        height: 100px;
    }

    .next-project-info h4 {
        font-size: 16px;
    }

    .next-project-category,
    .next-project-year {
        font-size: 11px;
    }
}

/* Très petits écrans (320px et moins) */
@media (max-width: 320px) {
    .container {
        padding: 0 15px;
    }

    .navbar {
        padding: 8px 15px;
    }

    .logo {
        font-size: 18px;
    }

    .hero h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 5vw, 1.2rem);
    }

    .hero-info {
        gap: 25px;
    }

    .info-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .info-title {
        font-size: 14px;
    }

    .info-desc {
        font-size: 11px;
    }

    .section-title {
        font-size: clamp(1.2rem, 7vw, 2rem);
    }

    .about-text h2 {
        font-size: clamp(1.2rem, 6vw, 2rem);
    }

    .about-text p {
        font-size: 14px;
    }

    .step-number {
        font-size: 28px;
    }

    .step-title {
        font-size: 13px;
    }

    .step-desc {
        font-size: 11px;
    }

    .portfolio-item {
        aspect-ratio: 4/3;
    }

    .portfolio-image {
        font-size: 32px;
    }

    .portfolio-info {
        padding: 15px;
    }

    .portfolio-title {
        font-size: 16px;
    }

    .portfolio-category {
        font-size: 11px;
    }

    .service-card {
        padding: 20px;
    }

    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
        margin-bottom: 15px;
    }

    .service-title {
        font-size: 18px;
    }

    .service-desc {
        font-size: 13px;
    }

    .contact-info h3 {
        font-size: 20px;
    }

    .contact-info p {
        font-size: 14px;
    }

    .contact-method {
        padding: 10px;
    }

    .contact-method-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
        margin-right: 10px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 13px;
    }

    .form-group textarea {
        min-height: 80px;
    }

    .submit-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .footer-brand h3 {
        font-size: 20px;
    }

    .footer-brand p {
        font-size: 13px;
    }

    .footer-section h4 {
        font-size: 16px;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* NOUVEAU: Portfolio Filters Mobile - Très petits écrans */
    .portfolio-filters {
        padding: 12px 0;
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 10px;
    }

    .filter-btn:last-child {
        margin-right: 15px;
    }

    /* NOUVEAU: Page de projet mobile - Très petits écrans */
    .project-modal-header {
        padding: 12px 15px;
    }

    .project-modal-header h2 {
        font-size: 18px;
    }

    .back-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .project-modal-body {
        padding: 15px;
    }

    .gallery-current-image {
        max-height: 45vh;
    }

    .gallery-controls {
        bottom: 8px;
        padding: 5px 10px;
        gap: 10px;
    }

    .gallery-prev,
    .gallery-next {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .gallery-counter {
        font-size: 10px;
        min-width: 30px;
    }

    .gallery-thumbnails {
        margin: 12px 0;
        padding: 0 15px;
    }

    .gallery-thumb {
        width: 60px;
        height: 35px;
    }

    .gallery-slider-nav {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    /* NOUVEAU: Invitation projet suivant mobile - Très petits écrans */
    .next-project-invitation {
        margin-top: 25px;
        padding: 15px;
    }

    .next-project-card {
        padding: 12px;
    }

    .next-project-image {
        height: 80px;
    }

    .next-project-info h4 {
        font-size: 14px;
    }

    .next-project-category,
    .next-project-year {
        font-size: 10px;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0;
    }

    .hero-content {
        padding: 50px 25px;
    }

    .hero-info {
        flex-direction: row;
        gap: 40px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .info-item {
        flex: 0 0 auto;
    }

    .about,
    .portfolio,
    .services,
    .contact {
        padding: 80px 0;
    }

    /* NOUVEAU: Page de projet en mode paysage */
    .project-modal-header {
        padding: 15px 25px;
    }

    .project-modal-header h2 {
        font-size: 20px;
    }

    .gallery-current-image {
        max-height: 70vh;
    }

    .gallery-thumbnails {
        margin: 15px 0;
    }

    .gallery-thumb {
        width: 90px;
        height: 50px;
    }
}

/* Écrans très larges (1400px et plus) */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }

    .hero-content {
        max-width: 1400px;
    }

    .hero h1 {
        font-size: clamp(4rem, 6vw, 10rem);
    }

    .hero-subtitle {
        font-size: clamp(1.5rem, 2vw, 2.5rem);
    }

    .section-title {
        font-size: clamp(2.5rem, 4vw, 5rem);
    }

    .about-text h2 {
        font-size: clamp(2.5rem, 3vw, 4rem);
    }

    .about-text p {
        font-size: 20px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 50px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 50px;
    }

    .service-card {
        padding: 50px;
    }

    .service-icon {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .service-title {
        font-size: 28px;
    }

    .service-desc {
        font-size: 18px;
    }
}

/* Écrans ultra-larges (2000px et plus) */
@media (min-width: 2000px) {
    .container {
        max-width: 1800px;
    }

    .hero-content {
        max-width: 1600px;
    }

    .hero h1 {
        font-size: clamp(5rem, 5vw, 12rem);
    }

    .hero-subtitle {
        font-size: clamp(2rem, 1.5vw, 3rem);
    }

    .section-title {
        font-size: clamp(3rem, 3vw, 6rem);
    }

    .about-text h2 {
        font-size: clamp(3rem, 2.5vw, 5rem);
    }

    .about-text p {
        font-size: 22px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 60px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 60px;
    }

    .service-card {
        padding: 60px;
    }

    .service-icon {
        width: 120px;
        height: 120px;
        font-size: 48px;
    }

    .service-title {
        font-size: 32px;
    }

    .service-desc {
        font-size: 20px;
    }
}

/* Mode sombre/clair (si supporté) */
@media (prefers-color-scheme: light) {
    body {
        background: #f8f9fa;
        color: #333;
    }

    .navbar {
        background: rgba(248, 249, 250, 0.95);
        border-bottom: 1px solid var(--border-color);
    }

    .navbar.scrolled {
        background: rgba(248, 249, 250, 0.98);
    }

    .nav-links a {
        color: #333;
    }

    .nav-links a:hover {
        color: var(--primary-color);
    }

    .hero {
        background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, rgba(248, 249, 250, 1) 70%);
    }

    .services {
        background: #e9ecef;
    }

    .service-card,
    .contact-method {
        background: #fff;
        border: 1px solid #dee2e6;
    }

    .service-card:hover,
    .contact-method:hover {
        background: #f8f9fa;
    }

    .form-group input,
    .form-group textarea {
        background: #fff;
        border: 2px solid #dee2e6;
        color: #333;
    }

    .footer {
        background: #e9ecef;
        border-top: 1px solid #dee2e6;
    }

    .footer-section ul li a {
        color: #6c757d;
    }

    .footer-section ul li a:hover {
        color: var(--primary-color);
    }
}

/* Réduction des animations pour les utilisateurs qui les préfèrent */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .parallax-bg {
        transform: none !important;
    }

    .floating-element {
        animation: none !important;
    }

    .particle {
        animation: none !important;
    }

    .breathing {
        animation: none !important;
    }

    .morphing-bg {
        animation: none !important;
    }
}

/* Responsive pour nouvelles sections */
@media (max-width: 1024px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-timeline {
        padding-left: 30px;
    }
    
    .timeline-number {
        left: -20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .clients-logos {
        padding: 80px 0;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .why-choose-us {
        padding: 100px 0;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .testimonials {
        padding: 100px 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .faq {
        padding: 100px 0;
    }
    
    .faq-question {
        padding: 24px 24px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer p {
        padding: 0 24px 24px;
    }
    
    .blog {
        padding: 100px 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cta-section {
        padding: 80px 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
    }
    
    .process-timeline-wrapper h3 {
        font-size: 20px;
        margin-bottom: 40px;
    }
    
    .process-timeline {
        padding-left: 25px;
        gap: 30px;
    }
    
    .timeline-number {
        left: -15px;
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .timeline-content {
        padding-left: 30px;
    }
    
    .timeline-title {
        font-size: 18px;
    }
}

/* Support pour les écrans haute densité */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cursor,
    .cursor-follower {
        transform: scale(0.5);
    }

    .particle {
        transform: scale(0.5);
    }
}

/* Support pour les écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }

    .magnetic:hover {
        transform: none !important;
    }

    .liquid-btn:hover::before {
        width: 0;
        height: 0;
    }

    /* NOUVEAU: Amélioration du scroll tactile pour les filtres */
    .portfolio-filters {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .filter-btn {
        scroll-snap-align: start;
    }
}

/* Impression */
@media print {
    .navbar,
    .cursor,
    .cursor-follower,
    .particles,
    .parallax-bg,
    .mobile-menu-btn,
    .contact-form,
    .social-links {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero {
        height: auto;
        padding: 50px 0;
    }

    .hero h1,
    .hero-title {
        color: var(--text-primary) !important;
        background: none !important;
        -webkit-text-fill-color: var(--text-primary) !important;
        text-shadow: none !important;
        filter: none !important;
        text-transform: none !important;
    }

    .section-title {
        color: black !important;
    }

    .portfolio-item,
    .service-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        background: white !important;
    }

    .footer {
        background: white !important;
        border-top: 1px solid #ccc;
    }
} 