/* ========================================
   RESPONSIVE STYLES - MOBILE FIRST
   ======================================== */

/* Menu Hamburger pour mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    transition: transform 0.35s ease, opacity 0.25s ease;
    border-radius: 2px;
    transform-origin: center;
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -7px);
}

/* ========================================
   TABLET - max-width: 1024px
   ======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Header */
    .logo-image {
        height: 70px;
    }

    .nav-menu ul {
        gap: 25px;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    /* Hero */
    .hero {
        margin: 0 30px;
        height: 60vh;
    }

    .hero-logo {
        height: 100px;
    }

    /* Carousel */
    .carousel-item {
        width: 140px;
        height: 105px;
    }

    .carousel-item.active {
        width: 200px;
        height: 150px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    /* Experience Section */
    .experience-content {
        grid-template-columns: 1fr;
    }

    .services-list {
        margin-top: 2rem;
    }

    /* Works Grid */
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ========================================
   MOBILE - max-width: 768px
   ======================================== */
@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Header - Logo à gauche, burger à droite */
    .header {
        padding: 15px 0;
    }

    .header .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1rem;
    }

    .nav-brand {
        grid-column: 1;
    }

    .nav-menu {
        grid-column: 2;
    }

    .mobile-menu-toggle {
        grid-column: 3;
        justify-self: end;
    }

    .header.scrolled {
        background: rgba(32, 32, 32, 0.98) !important;
    }

    .logo-image {
        height: 60px;
    }

    /* Cacher le bouton contact desktop sur mobile */
    .header > .contact-btn,
    .header .container > .contact-btn {
        display: none !important;
    }

    /* Navigation mobile - Menu fullscreen overlay */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(20, 20, 20, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    /* Logo dans le menu */
    .nav-menu .menu-logo {
        position: absolute;
        top: 2rem;
        left: 50%;
        transform: translateX(-50%);
        height: 50px;
        opacity: 0;
        transition: opacity 0.4s ease 0.2s;
    }

    .nav-menu.active .menu-logo {
        opacity: 1;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-menu ul li {
        overflow: hidden;
    }

    .nav-menu a {
        font-size: 1.6rem;
        font-weight: 300;
        letter-spacing: 0.25em;
        text-transform: uppercase;
        padding: 0.9rem 0;
        display: block;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
        color: rgba(255, 255, 255, 0.85);
    }

    .nav-menu a:hover {
        color: #ffffff;
    }

    .nav-menu.active ul li:nth-child(1) a { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
    .nav-menu.active ul li:nth-child(2) a { opacity: 1; transform: translateY(0); transition-delay: 0.22s; }
    .nav-menu.active ul li:nth-child(3) a { opacity: 1; transform: translateY(0); transition-delay: 0.29s; }
    .nav-menu.active ul li:nth-child(4) a { opacity: 1; transform: translateY(0); transition-delay: 0.36s; }
    .nav-menu.active ul li:nth-child(5) a { opacity: 1; transform: translateY(0); transition-delay: 0.43s; }
    .nav-menu.active ul li:nth-child(6) a { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }

    /* Séparateur décoratif */
    .nav-menu .menu-separator {
        width: 40px;
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        margin: 2rem auto;
        opacity: 0;
        transition: opacity 0.4s ease 0.55s;
    }

    .nav-menu.active .menu-separator {
        opacity: 1;
    }

    /* Lien Instagram dans la liste du menu (après CONTACT) */
    .nav-menu .menu-social-item {
        opacity: 0;
        transition: opacity 0.4s ease 0.5s;
    }

    .nav-menu.active .menu-social-item {
        opacity: 1;
    }

    .nav-menu .menu-social-item a {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        color: rgba(255, 255, 255, 0.8);
        transition: color 0.3s ease;
        padding: 15px 20px;
    }

    .nav-menu .menu-social-item a:hover {
        color: #fff;
    }

    .nav-menu .menu-social-item i {
        font-size: 1.5rem;
    }

    /* Ancien style menu-social gardé pour compatibilité */
    .nav-menu .menu-social {
        opacity: 0;
        transition: opacity 0.4s ease 0.6s;
    }

    .nav-menu.active .menu-social {
        opacity: 1;
    }

    .nav-menu .menu-social a {
        font-size: 1.4rem;
        color: rgba(255, 255, 255, 0.5);
        transition: color 0.3s ease;
        padding: 0.5rem;
    }

    .nav-menu .menu-social a:hover {
        color: #fff;
    }

    /* Hero */
    .hero {
        margin: 0 15px;
        height: 50vh;
        border-radius: 15px;
    }

    .hero-image {
        border-radius: 15px;
    }

    .hero-logo {
        height: 80px;
        width: auto;
    }

    .hero-content {
        top: auto;
        bottom: 30px;
        right: 20px;
        transform: none;
        margin-top: 0;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    /* Carousel */
    .carousel-container {
        padding: 0 1rem;
    }

    .carousel-images {
        gap: 0.75rem;
    }

    .carousel-item {
        width: 100px;
        height: 75px;
    }

    .carousel-item.active {
        width: 140px;
        height: 105px;
    }

    .carousel-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    /* About Section */
    .about-section {
        padding: 2rem 0;
        margin: 0 15px;
    }

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

    .about-section .about-image {
        order: -1;
    }

    .about-section .about-image img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-radius: 15px 15px 0 0 !important;
    }

    .about-text {
        border-radius: 0 0 15px 15px;
        padding: 2rem 1.5rem;
    }

    .about-section h2 {
        font-size: 1.75rem;
        margin-top: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        line-height: 1.7;
    }

    .about-section .see-all-btn {
        margin-top: 1.5rem !important;
    }

    /* Location Bar */
    .location-bar {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem 0;
        margin: 0 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .location-bar span {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Experience Section - Version mobile compacte */
    .experience-section {
        padding: 2rem 0;
        margin: 0 15px;
    }

    .experience-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
        align-items: stretch;
    }

    .experience-text {
        order: 1;
    }

    .experience-text h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
        letter-spacing: 1px;
    }

    .experience-image {
        height: 200px;
        margin: 1rem 0;
        order: 2;
        max-width: 100%;
    }

    .experience-image img {
        height: 200px;
    }

    .services-list {
        gap: 1rem;
        order: 3;
    }

    .service-item {
        font-size: 1.25rem;
        padding: 1rem 1.25rem;
    }

    .about-btn {
        font-size: 0.85rem;
        padding: 0.875rem 1.25rem;
        margin-top: 0.5rem;
    }

    .about-image {
        order: 4;
        margin-top: 1rem;
        max-width: 100%;
    }

    .about-image img {
        height: 200px;
    }

    /* Works Grid - Carrousel horizontal mobile */
    .works-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        margin-bottom: 1.5rem;
        padding: 0 15px;
        scrollbar-width: none;
    }

    .works-grid::-webkit-scrollbar {
        display: none;
    }

    .work-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
        aspect-ratio: 3/4;
        border-radius: 15px;
        margin: 0 8px;
    }

    .work-item:first-child {
        margin-left: 0;
    }

    .work-item:last-child {
        margin-right: 0;
    }

    .work-overlay {
        padding: 1.25rem;
    }

    .work-number {
        font-size: 1.5rem;
    }

    .work-title {
        font-size: 0.85rem;
    }

    /* Puces indicatrices du carrousel */
    .works-carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-bottom: 2rem;
    }

    .works-carousel-dots .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .works-carousel-dots .dot.active {
        background: #ffffff;
        transform: scale(1.3);
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .see-all-btn {
        font-size: 0.9rem;
        padding: 1rem 2rem;
        gap: 0.5rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 4rem 0;
        margin: 0 15px;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .work-with-me-btn {
        font-size: 0.9rem;
        padding: 1rem 2rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-logo-img {
        height: 60px;
    }

    /* Masquer les liens de navigation sur mobile (garder uniquement Instagram) */
    .footer-nav ul li:not(.footer-social) {
        display: none;
    }

    .footer-nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        align-items: center;
    }

    .footer-signature {
        margin-top: 1rem;
    }

    .footer-copyright {
        margin-top: 0.5rem;
    }

    /* Partners Carousel */
    .partner-logo {
        width: 120px;
    }

    /* Portfolio Grid */
    .portfolio-mosaic-grid {
        gap: 1rem;
    }

    .portfolio-item {
        border-radius: 1rem;
    }

    .portfolio-card-number {
        font-size: 1.2rem;
    }

    .portfolio-card-title {
        font-size: 1rem;
    }

    /* Project Page */
    .project-hero {
        height: 50vh;
    }

    .project-carousel-container {
        padding: 0 1rem;
    }

    .project-carousel-images {
        gap: 0.75rem;
    }

    .project-carousel-item {
        width: 100px;
        height: 75px;
    }

    .project-carousel-item.active {
        width: 140px;
        height: 105px;
    }

    .project-description {
        padding: 3rem 0;
    }

    .project-description h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .description-text {
        font-size: 1rem;
    }

    .back-to-portfolio {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   SMALL MOBILE - max-width: 480px
   ======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Hero */
    .hero {
        margin: 0 10px;
        height: 40vh;
    }

    .hero-logo {
        height: 60px;
    }

    .hero-content {
        margin-top: 150px;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    /* Carousel */
    .carousel-item {
        width: 70px;
        height: 52px;
    }

    .carousel-item.active {
        width: 100px;
        height: 75px;
    }

    .carousel-btn {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    /* About */
    .about-section {
        margin: 0 10px;
    }

    .about-section .about-image img {
        height: 250px;
    }

    .about-section h2 {
        font-size: 1.5rem;
    }

    .about-text {
        padding: 1.5rem 1.25rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    /* Experience */
    .experience-text h2 {
        font-size: 1.75rem;
    }

    .service-item {
        font-size: 1.5rem;
        padding: 1.25rem 0;
    }

    .service-item i {
        font-size: 1.25rem;
    }

    /* Works Grid - petit mobile */
    .work-item {
        flex: 0 0 90%;
    }

    .section-title {
        font-size: 2rem;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.75rem;
    }

    /* Portfolio */
    .portfolio-hero-title {
        font-size: 2.5rem;
    }

    .portfolio-filter {
        font-size: 0.8rem;
        padding: 0.4rem 0.875rem;
    }

    .portfolio-mosaic-grid {
        gap: 0.875rem;
    }

    .portfolio-card-overlay {
        padding: 1rem;
    }

    .portfolio-card-number {
        font-size: 1rem;
    }

    .portfolio-card-title {
        font-size: 0.875rem;
    }

    /* Project Page */
    .project-hero {
        height: 40vh;
    }

    .project-carousel-item {
        width: 80px;
        height: 60px;
    }

    .project-carousel-item.active {
        width: 110px;
        height: 82px;
    }

    .project-description h1 {
        font-size: 1.75rem;
    }

    .meta-label {
        font-size: 0.8rem;
    }

    .meta-value {
        font-size: 1rem;
    }

    .description-text {
        font-size: 0.95rem;
    }

    .back-to-portfolio {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   LANDSCAPE MODE MOBILE
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 70vh;
    }

    .hero-content {
        margin-top: 100px;
    }

    .project-hero {
        height: 90vh;
    }

    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.4rem 0;
    }

    .nav-menu .menu-logo {
        top: 1rem;
        height: 35px;
    }

    .nav-menu .contact-btn {
        margin-top: 1rem;
    }

    .nav-menu .menu-separator {
        margin: 0.8rem auto;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

/* Disable animations on mobile for better performance */
@media (max-width: 768px) {
    *:not(.works-carousel-dots .dot):not(.works-grid):not(.partners-track):not(.values-carousel-dots .dot):not(.about-values-cards):not(.service-packs-dots .dot):not(.service-process-dots .dot):not(.service-packs):not(.service-process):not(.contact-options-dots .dot):not(.contact-options-grid):not(.nav-menu):not(.nav-menu *):not(.mobile-menu-toggle):not(.mobile-menu-toggle span) {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch-friendly buttons */
@media (hover: none) and (pointer: coarse) {
    .service-item,
    .work-item,
    .portfolio-card,
    .see-all-btn,
    .work-with-me-btn,
    .about-btn,
    .back-to-portfolio {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Enlarge tap targets */
    .carousel-btn,
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}
