/* ========================================
   STYLE MOBILE - Portfolio Théo
   Optimisé pour LinkedIn Mobile
   ======================================== */

/* ============================================
   MOBILE FIRST - Téléphone (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Force sections to be visible immediately on mobile */
    .section,
    .fade-in-section,
    .chart-card {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        animation: none !important;
        transition: none !important;
    }

    /* ===== NAVIGATION MOBILE ===== */
    /* ===== NAVIGATION MOBILE ===== */
    .navbar {
        height: 50px;
        padding: 0 1rem;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        display: flex;
        justify-content: center;
        /* Center content */
        align-items: center;
        position: fixed;
        width: 100% !important;
        top: 0;
        left: 0 !important;
        /* Reset left */
        z-index: 1000;
        border-radius: 0 !important;
        /* Ensure no radius */
    }

    nav {
        padding: 0.8rem 1rem;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 1.3rem;
        font-weight: 700;
        color: #2C3E50;
        flex-shrink: 0 !important;
        transition: transform 0.2s ease;
    }

    .logo:active {
        transform: scale(0.95);
    }

    /* Mobile Menu (Roadmap Style) */
    .nav-center {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0 !important;
        margin: 0 !important;
        right: auto;
        width: 220px;
        /* Reduced width (less imposing) */
        height: auto;
        max-height: 80vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem 1rem 1.5rem 1.5rem;
        /* Reduced padding */
        z-index: 998;
        box-shadow: 5px 10px 30px rgba(0, 0, 0, 0.1);
        border-bottom-right-radius: 20px;
        /* Radius on menu */
        border-bottom-left-radius: 20px;
        /* Radius on menu */
        overflow-y: auto;

        /* Animation State: Closed (Rolled up) */
        transform: translateY(-150%) translateX(-68px);
        /* Fixed syntax */
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        /* Standard ease-out */
    }

    /* Roadmap Vertical Line */
    .nav-center::before {
        content: '';
        position: absolute;
        left: 24px;
        /* Position of the line */
        top: 2rem;
        bottom: 2rem;
        width: 2px;
        background: #E2E8F0;
        /* Light gray line */
        z-index: 0;
    }

    /* Animation State: Open */
    .nav-center.active {
        transform: translateY(0) translateX(-68px);
        /* Slide down and keep left shift */
        opacity: 1;
        visibility: visible;
    }

    /* Menu Links with Dots */
    .nav-link {
        width: 100%;
        padding: 1rem 0;
        text-align: left;
        font-size: 1.1rem;
        color: #2C3E50;
        font-weight: 500;
        border-bottom: none;
        /* No underline for roadmap style */
        transition: all 0.3s ease;
        border-radius: 0;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        position: relative;
        padding-left: 1.5rem;
        z-index: 1;
        /* Above line */
    }

    /* Dot for all links */
    .nav-link::before {
        content: '';
        position: absolute;
        left: -24px;
        /* Adjust to align with line */
        top: 50%;
        transform: translateY(-50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #fff;
        /* White center */
        border: 2px solid #CBD5E1;
        /* Gray border */
        transition: all 0.3s ease;
        display: block !important;
        z-index: 2;
    }

    /* Active Link Style */
    .nav-link.active {
        color: #5A8FBD !important;
        /* Blue text */
        border-bottom: none !important;
        /* No underline */
        background: transparent;
        padding-left: 1.5rem;
        font-weight: 700;
    }

    /* Active Dot */
    .nav-link.active::before {
        background-color: #5A8FBD;
        /* Blue center */
        border-color: #5A8FBD;
        /* Blue border */
        transform: translateY(-50%) scale(1.1);
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown>.nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        margin-top: 0;
        margin-left: 1rem;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        display: none;
        animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .nav-dropdown.active .dropdown-content {
        display: block;
    }

    /* Cacher le dropdown Projets sur mobile */
    .nav-dropdown .dropdown-content {
        display: none !important;
    }

    /* Lien Projets mobile - navigation directe */
    .nav-link[href="#projets"] {
        pointer-events: auto !important;
    }

    /* Bouton hamburger mobile */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
    }

    .hamburger span {
        display: block !important;
        width: 100%;
        height: 3px !important;
        background-color: #2C3E50 !important;
        margin: 0 !important;
        flex-shrink: 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .nav-right {
        order: 3;
    }

    /* Contact mobile optimisé */
    .contact-info {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        min-width: 100%;
        border-radius: 0;
        padding: 1rem;
        max-height: 50vh;
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }

    .contact-item {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        transition: all 0.2s ease;
    }

    .contact-item:active {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(0.98);
    }

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

    /* ===== SEARCH BAR MOBILE ANIMATION ===== */
    .search-container {
        position: relative;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }

    .search-icon {
        cursor: pointer;
        transition: transform 0.3s ease;
        z-index: 2;
        display: flex;
        /* Ensure icon is a flex container */
        align-items: center;
        /* Center SVG inside */
        height: 100%;
        /* Match container height */
    }

    .search-box {
        position: absolute;
        right: 0;
        top: 50%;
        /* Center vertically */
        transform: translateY(-50%);
        /* Center vertically */
        width: 0;
        opacity: 0;
        padding: 0.5rem 0;
        border: none;
        background: #F5F5F5;
        border-radius: 20px;
        color: #111;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .search-container.active .search-icon {
        transform: translateX(-150px);
    }

    .search-container.active .search-box {
        width: 180px;
        opacity: 1;
        padding: 0.5rem 1rem;
        pointer-events: auto;
    }

    .search-container.active .search-box::placeholder {
        color: rgba(0, 0, 0, 0.5);
    }

    /* ===== HERO SECTION MOBILE ===== */
    .hero {
        min-height: 100vh;
        padding: 5rem 1.25rem 3rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: 1rem;
        letter-spacing: -0.02em;
    }

    .hero-content h2 {
        font-size: clamp(1.3rem, 4vw, 1.75rem);
        line-height: 1.3;
        margin-bottom: 1rem;
        font-weight: 500;
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 2.5vw, 1.1rem);
        line-height: 1.7;
        margin-bottom: 2rem;
        opacity: 0.95;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 1.1rem 2rem;
        font-size: 1.05rem;
        justify-content: center;
        min-height: 48px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    /* ===== HERO CAROUSEL MOBILE ===== */
    .hero-card-carousel {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
        min-height: 220px !important;
        margin: 2rem auto 0 !important;
        perspective: none !important;
    }

    .hero-card-slide {
        position: absolute;
        width: 100%;
        height: auto;
        min-height: 200px;
        padding: 1.25rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }

    .hero-card-slide.active {
        opacity: 1;
        transform: translateX(0) scale(1);
        z-index: 2;
    }

    /* Journal slide mobile */
    .journal-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .journal-cover {
        width: 70px !important;
        height: 90px !important;
        margin-bottom: 0.5rem;
    }

    .journal-info {
        width: 100%;
    }

    .card-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem;
    }

    .card-content {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }

    .reading-time {
        justify-content: center;
        font-size: 0.8rem;
        margin-top: 0.75rem;
    }

    /* Crypto slide mobile */
    .card-header {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .crypto-row {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }

    /* Weather slide mobile */
    .weather-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .weather-temp {
        font-size: 3rem !important;
    }

    .weather-details {
        text-align: center;
    }

    /* AI News slide mobile */
    #ai-news-content {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        text-align: center;
    }

    /* Navigation dots mobile */
    .hero-card-nav {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        margin-top: 1.5rem;
        justify-content: center;
        padding-bottom: 1rem;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
        background: rgba(255, 255, 255, 0.4);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .hero-dot.active {
        width: 28px;
        border-radius: 5px;
        background: rgba(90, 143, 189, 0.9);
    }

    /* Touch feedback for carousel */
    .hero-card-slide:active {
        transform: scale(0.98);
    }

    /* ===== MOBILE API CAROUSEL BANNER ===== */
    @media (max-width: 768px) {

        /* Fixed carousel banner below navbar */
        .hero-card-carousel {
            display: none !important;
        }

        /* All slides in carousel banner */
        .hero-card-slide {
            position: absolute !important;
            top: 0;
            left: 0;
            width: 100% !important;
            height: 70px !important;
            min-height: 70px !important;
            padding: 0.75rem 1rem !important;
            margin: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            backdrop-filter: none !important;
            border: none !important;
            box-shadow: none !important;
            display: flex !important;
            align-items: center;
            opacity: 0 !important;
            transform: translateX(100%) !important;
            transition: all 0.5s ease !important;
            pointer-events: none;
        }

        .hero-card-slide.active {
            opacity: 1 !important;
            transform: translateX(0) !important;
            pointer-events: auto;
        }

        /* Journal slide */
        .hero-card-slide#slide-journal {
            cursor: pointer;
        }

        .hero-card-slide#slide-journal .journal-layout {
            flex-direction: row !important;
            align-items: center;
            gap: 1rem;
            width: 100%;
            text-align: left !important;
        }

        .hero-card-slide#slide-journal .journal-cover {
            width: 45px !important;
            height: 55px !important;
            margin: 0 !important;
        }

        .hero-card-slide#slide-journal .journal-info {
            flex: 1;
        }

        .hero-card-slide#slide-journal .card-title {
            font-size: 0.95rem !important;
            margin-bottom: 0.25rem !important;
            font-weight: 600;
        }

        .hero-card-slide#slide-journal .card-content {
            display: none;
        }

        .hero-card-slide#slide-journal .reading-time {
            font-size: 0.75rem;
            margin: 0;
            justify-content: flex-start;
        }

        /* Crypto slide */
        .hero-card-slide#slide-crypto .card-header {
            display: none;
        }

        .hero-card-slide#slide-crypto .card-content {
            display: flex;
            gap: 2rem;
            width: 100%;
            justify-content: center;
        }

        .hero-card-slide#slide-crypto .crypto-row {
            border: none !important;
            padding: 0 !important;
            font-size: 0.85rem;
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        /* Weather slide */
        .hero-card-slide#slide-weather .weather-main {
            flex-direction: row !important;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            width: 100%;
        }

        .hero-card-slide#slide-weather #weather-icon-container svg {
            width: 32px !important;
            height: 32px !important;
        }

        .hero-card-slide#slide-weather .weather-temp {
            font-size: 1.5rem !important;
            font-weight: 300 !important;
            margin: 0;
        }

        .hero-card-slide#slide-weather .weather-details {
            text-align: right;
        }

        .hero-card-slide#slide-weather .weather-details div {
            font-size: 0.85rem !important;
            font-weight: 300 !important;
        }

        /* AI News slide */
        .hero-card-slide#slide-ai .card-header {
            margin-bottom: 0.5rem;
        }

        .hero-card-slide#slide-ai .card-header svg {
            width: 20px;
            height: 20px;
        }

        .hero-card-slide#slide-ai .card-title {
            font-size: 0.9rem !important;
        }

        .hero-card-slide#slide-ai #ai-news-content {
            font-size: 0.8rem !important;
            line-height: 1.4 !important;
            text-align: left !important;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .hero-card-slide#slide-ai .card-content>div:last-child {
            display: none;
        }

        /* Hide navigation dots */
        .hero-card-nav {
            display: none !important;
        }

        /* Adjust hero section padding */
        .hero {
            padding-top: calc(5rem + 70px) !important;
        }
    }

    /* ===== SECTION À PROPOS MOBILE ===== */
    .section {
        padding: 4rem 1.5rem;
        min-height: auto;
    }

    .section-content {
        max-width: 100%;
    }

    .section h2 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
        margin-bottom: 1.5rem;
        text-align: center;
        letter-spacing: -0.01em;
        font-weight: 700;
    }

    .section p {
        font-size: clamp(0.95rem, 2.5vw, 1.05rem);
        line-height: 1.75;
        text-align: left;
        margin-bottom: 1.25rem;
        color: rgba(255, 255, 255, 0.95);
    }

    /* Bouton CV mobile */
    .cv-download-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 1.2rem 2rem;
        font-size: 1.05rem;
        margin-top: 2rem;
        box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .cv-download-btn:active {
        transform: scale(0.97);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    }

    /* Carrousel À propos mobile */
    .carousel-container {
        flex-direction: column !important;
        gap: 2rem !important;
        padding: 0 !important;
        touch-action: pan-y !important;
        /* Allow vertical scroll */
    }

    .carousel-content {
        max-width: 100% !important;
        order: 2 !important;
        text-align: center !important;
    }

    .carousel-title {
        font-size: 1.75rem !important;
        margin-top: 1rem !important;
        margin-bottom: 2rem !important;
        color: #2C3E50 !important;
        /* Dark color for visibility */
    }

    .carousel-description {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        color: #333 !important;
        /* Black text for visibility */
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 1.25rem !important;
        border-radius: 12px !important;
        margin-top: 1rem !important;
        height: 180px !important;
        /* Increased height */
        overflow-y: auto !important;
        /* Scroll if text is too long */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-dots {
        justify-content: center !important;
        margin-top: 1.5rem !important;
    }

    .carousel-images {
        order: 1 !important;
        height: 400px !important;
        width: 100% !important;
        margin-bottom: 2rem !important;
        margin-top: 1.5rem !important;
        /* Add space below title */
    }

    .cylinder-wrapper {
        width: 280px !important;
        height: 280px !important;
    }

    .cylinder-image {
        width: 160px !important;
        height: 280px !important;
    }

    /* ===== PROJETS SECTION MOBILE ===== */
    .projects-section {
        padding: 4rem 1.25rem;
        position: relative;
        z-index: 1;
        background: transparent;
        opacity: 1 !important;
        /* Force visibility */
        transform: none !important;
        /* Remove animation */
    }

    .projects-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .projects-header h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
        color: #2C3E50;
    }

    .projects-tabs {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .tab-button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        text-align: center;
        border-radius: 12px;
        min-height: 48px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        position: relative;
        z-index: 2;
    }

    .project-card {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
        transition: transform 0.3s ease;
        background: rgba(255, 255, 255, 0.98) !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    .project-card:active {
        transform: scale(0.98);
    }

    .project-image {
        height: 200px;
        width: 100%;
        object-fit: cover;
        display: block !important;
    }

    .project-content {
        padding: 1.5rem;
        background: rgba(255, 255, 255, 1) !important;
        display: block !important;
    }

    .project-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        color: #1a1a1a !important;
        font-weight: 700;
        display: block !important;
    }

    .project-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        color: #333 !important;
        display: block !important;
    }

    .project-tags {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .project-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        background: rgba(90, 143, 189, 0.2);
        color: #1a5f8f !important;
        font-weight: 600;
    }

    /* ===== EXPERIENCE SECTION MOBILE (HORIZONTAL CAROUSEL) ===== */
    .experience-section {
        padding: 4rem 1.25rem;
        min-height: 85vh !important;
        position: relative;
        background: #ffffff !important;
        /* White background */
    }

    /* Hide the old pseudo-element title */
    .experience-section::before {
        display: none !important;
    }

    /* Show and style the new mobile header */
    .experience-header-mobile {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
    }

    .experience-header-mobile .section-title {
        font-size: 2rem;
        font-weight: 800;
        color: #2C3E50 !important;
        text-transform: uppercase;
        margin-bottom: 0.5rem;
        position: relative;
        display: inline-block;
    }

    .experience-header-mobile .section-title::after {
        content: '';
        display: block;
        width: 50%;
        height: 4px;
        background: #5A8FBD;
        margin: 0.5rem auto 0;
        border-radius: 2px;
    }

    .experience-header-mobile .section-subtitle {
        font-size: 1rem;
        color: #6B7280 !important;
        font-weight: 400;
        margin-top: 1rem !important;
    }

    /* Restore Navigation & Indicators */
    .experience-timeline {
        display: none !important;
    }

    .experience-nav,
    .experience-indicators {
        display: flex !important;
    }

    .experience-nav {
        bottom: 1rem !important;
        right: 1rem !important;
        gap: 1rem;
        z-index: 10;
    }

    .experience-nav-btn {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .experience-nav-btn:active {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(0.95);
    }

    .experience-indicators {
        bottom: 1.5rem !important;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Carousel Container */
    .experience-carousel-container {
        height: 75vh !important;
        /* Increased height to fit content */
        width: 100% !important;
        position: relative;
        overflow: hidden;
        border-radius: 20px !important;
        margin-top: 0 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .experience-see-more-mobile {
        display: block !important;
        margin-top: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Slides Wrapper - Horizontal */
    .experience-slides {
        display: flex !important;
        flex-direction: row !important;
        width: 100%;
        height: 100%;
        gap: 0 !important;
        transform: inherit;
        /* Allow JS transform */
    }

    /* Individual Slide */
    .experience-slide {
        min-width: 100%;
        height: 100%;
        position: relative;
        padding: 1rem;
        /* Reduced padding for wider content */
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        /* Text at bottom */
    }

    /* Background Image */
    .experience-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        opacity: 1 !important;
        /* Visible */
    }

    /* Overlay */
    .experience-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
        /* Lighter gradient */
        /* Gradient overlay */
        z-index: 1;
    }

    /* Content Wrapper */
    .experience-content-wrapper {
        position: relative;
        z-index: 2;
        color: white;
        width: 100%;
    }

    .experience-header-section {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .experience-company-logo {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        background: white;
        padding: 5px;
        object-fit: contain;
    }

    .experience-header-text {
        text-align: left;
    }

    .experience-title-large {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .experience-company-large {
        font-size: 1.1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
    }

    .experience-period {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 0.25rem;
    }

    .experience-description-large {
        font-size: 1rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 1.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .experience-skills-large {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .experience-skill-large {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        border-radius: 20px;
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }



    /* Slide */
    .experience-slide {
        min-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        opacity: 1 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-bottom: 0 !important;
        background-size: cover !important;
        background-position: center !important;
    }

    /* Overlay */
    .experience-slide::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 1;
    }

    /* Content Wrapper */
    .experience-content-wrapper {
        width: 90% !important;
        max-width: 400px !important;
        padding: 2rem 1.5rem !important;
        margin: 0 auto;
        z-index: 2;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 20px !important;
    }

    /* Adjust text sizes for mobile */
    .experience-title-large {
        font-size: 1.8rem !important;
        color: white !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .experience-company-large {
        font-size: 1.1rem !important;
        color: #B8D4EC !important;
    }

    .experience-description-large {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        color: rgba(255, 255, 255, 0.95) !important;
        display: block !important;
        /* Show full text if possible, or clamp */
        -webkit-line-clamp: 8 !important;
    }

    .experience-skills-large {
        justify-content: center;
    }

    .experience-recommendation-large {
        display: none !important;
    }

    /* ===== ENGAGEMENTS SECTION MOBILE ===== */
    .engagements-section {
        padding: 4rem 1.25rem;
    }

    .engagements-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .engagements-header h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .engagements-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .engagement-card {
        flex-direction: column;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    .engagement-image-wrapper {
        height: 220px !important;
    }

    .engagement-card:active {
        transform: scale(0.98);
    }

    .engagement-image {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .engagement-content {
        padding: 1.5rem;
    }

    .engagement-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .engagement-role {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .engagement-period {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .engagement-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .engagement-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .engagement-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
    }

    /* ===== STATISTIQUES SECTION MOBILE ===== */
    .statistics-section {
        padding: 4rem 1.25rem;
    }

    .statistics-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .statistics-header h2 {
        font-size: 2rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
        margin: 0 auto;
    }

    .stat-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        text-align: center;
    }

    .stat-number {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* ===== SECTION VIDÉO MOBILE ===== */
    .video-section {
        padding: 4rem 1.25rem !important;
    }

    .video-section h2 {
        font-size: 2rem !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

    .video-container {
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
    }

    .video-container video {
        width: 100% !important;
        height: auto !important;
        border-radius: 12px !important;
    }

    /* ===== SECTION CONTACT MOBILE ===== */
    /* Le contact reste dans le dropdown navigation sur mobile */
    /* Les informations sont accessibles via le menu hamburger */

    /* Améliorer l'affichage du dropdown contact sur mobile */
    .nav-dropdown .contact-info {
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .contact-item {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
    }

    .contact-text {
        font-size: 0.9rem !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .dropdown-title {
        color: white !important;
        border-bottom-color: rgba(255, 255, 255, 0.2) !important;
    }

    /* ===== SCROLL INDICATOR MOBILE ===== */
    .scroll-indicator {
        bottom: 2rem;
    }

    .scroll-indicator svg {
        width: 32px;
        height: 32px;
    }

    /* ===== ACTIVE INDICATOR (barre de navigation) ===== */
    .active-indicator {
        height: 3px;
    }
}

/* ============================================
   PETITS MOBILES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {

    /* Hero encore plus compact */
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Sections titres */
    .section h2,
    .projects-header h2,
    .engagements-header h2,
    .statistics-header h2 {
        font-size: 1.75rem;
    }

    /* Projets compacts */
    .project-image {
        height: 180px;
    }

    .project-title {
        font-size: 1.15rem;
    }

    /* Experience compacte */
    .experience-title-large {
        font-size: 1.4rem;
    }

    .experience-company-large {
        font-size: 1rem;
    }

    .experience-company-logo {
        width: 50px;
        height: 50px;
    }

    .timeline-date {
        font-size: 0.65rem;
    }

    /* Navigation expérience */
    .experience-nav-button {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .experience-indicators {
        padding: 0.6rem 1rem;
        gap: 0.6rem;
    }

    .experience-indicator.active {
        width: 28px;
    }

    /* Engagements compacts */
    .engagement-image {
        height: 180px;
    }

    .engagement-title {
        font-size: 1.2rem;
    }

    /* Stats */
    .stat-number {
        font-size: 2.2rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }
}

/* ============================================
   TABLETTES (768px - 968px)
   ============================================ */
@media (min-width: 769px) and (max-width: 968px) {

    /* Navigation tablette */
    nav {
        padding: 1rem 2rem;
    }

    .nav-center {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    /* Hero tablette */
    .hero {
        min-height: 85vh;
        padding: 5rem 2rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

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

    /* Projets en 2 colonnes */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Experience tablette */
    .experience-main-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Stats en 2 colonnes */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* ============================================
   LANDSCAPE MOBILE (orientation paysage)
   ============================================ */
@media (max-width: 968px) and (orientation: landscape) {

    .hero {
        min-height: 100vh;
        padding: 3rem 1.25rem 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }

    .experience-section {
        min-height: auto;
        padding-bottom: 5rem;
    }

    .experience-content-wrapper {
        padding: 1.25rem;
    }

    .experience-nav {
        bottom: 1.5rem;
    }

    .experience-indicators {
        bottom: 1rem;
    }
}

/* ============================================
   OPTIMISATIONS TACTILES
   ============================================ */
@media (hover: none) and (pointer: coarse) {

    /* Zones tactiles minimales (Apple HIG: 44x44px) */
    .nav-link,
    .tab-button,
    .btn,
    .experience-nav-button,
    .timeline-point,
    .experience-indicator,
    .contact-item,
    .hero-dot {
        min-height: 44px;
        min-width: 44px;
    }

    /* Désactiver les effets hover */
    .nav-link:hover::before,
    .nav-link:hover,
    .project-card:hover,
    .engagement-card:hover,
    .stat-card:hover,
    .timeline-point:hover .timeline-dot {
        transform: none;
        box-shadow: none;
    }

    /* Feedback tactile actif avec effet premium */
    .btn:active,
    .tab-button:active,
    .experience-nav-button:active,
    .timeline-point:active,
    .experience-indicator:active,
    .nav-link:active {
        transform: scale(0.96);
        opacity: 0.85;
        transition: all 0.1s ease;
    }

    .project-card:active,
    .engagement-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Swipe hint for carousels */
    .hero-card-carousel::after,
    .carousel-images::after {
        content: '← Swipe →';
        position: absolute;
        bottom: -2rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
        pointer-events: none;
        animation: fadeInOut 3s ease-in-out infinite;
    }

    @keyframes fadeInOut {

        0%,
        100% {
            opacity: 0.3;
        }

        50% {
            opacity: 0.7;
        }
    }

    /* Improve scroll momentum */
    .nav-center,
    .contact-info,
    .dropdown-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Add pull-to-refresh feel */
    body {
        overscroll-behavior-y: contain;
    }
}

/* ============================================
   OPTIMISATIONS iOS
   ============================================ */
@media (max-width: 768px) {

    /* Éviter le zoom iOS sur les inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Safe area pour iPhone avec encoche */
    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .hero {
        padding-top: calc(5rem + env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .experience-indicators {
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    /* Smooth scroll iOS */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   OPTIMISATIONS PERFORMANCES MOBILE
   ============================================ */
@media (max-width: 768px) {

    /* Réduire la complexité des animations */
    * {
        animation-duration: 0.25s !important;
        transition-duration: 0.25s !important;
    }

    /* Ombres simplifiées */
    .project-card,
    .engagement-card,
    .stat-card,
    .experience-nav-button {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    }

    /* Optimiser le rendu */
    .project-card,
    .engagement-card,
    .experience-slide {
        will-change: transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* Réduire les filtres blur coûteux */
    .navbar,
    .experience-nav-button {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* ===== FOOTER MOBILE ===== */
    .footer {
        padding: 3rem 1.5rem 2rem !important;
        background: #1a1a1a !important;
    }

    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        grid-template-columns: none !important;
    }

    .footer-brand {
        max-width: 100% !important;
        text-align: center !important;
    }

    .footer-logo {
        justify-content: center !important;
        font-size: 1.5rem !important;
    }

    .footer-address {
        text-align: center !important;
        font-size: 0.9rem !important;
        color: #b0b0b0 !important;
    }

    .footer-contact {
        align-items: center !important;
    }

    .footer-contact-item {
        font-size: 0.9rem !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .footer-contact-label {
        min-width: auto !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 0.25rem !important;
    }

    .footer-contact a {
        color: #5A8FBD !important;
        text-align: center !important;
    }

    /* Cacher les sections Navigation et Réseaux sur mobile */
    .footer-section {
        display: none !important;
    }

    .footer-bottom {
        padding-top: 1.5rem !important;
        margin-top: 2rem !important;
    }

    .footer-copyright {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
}

/* ============================================
   ACCESSIBILITÉ MOBILE
   ============================================ */
@media (max-width: 768px) {

    /* Contraste amélioré pour mobile */
    .hero-subtitle,
    .project-description,
    .engagement-description,
    .experience-description-large {
        color: rgba(255, 255, 255, 0.95);
    }

    /* Focus visible pour navigation clavier */
    .nav-link:focus,
    .btn:focus,
    .tab-button:focus,
    .experience-nav-button:focus {
        outline: 2px solid rgba(184, 212, 236, 0.8);
        outline-offset: 2px;
    }

    /* Taille de police minimale pour lisibilité */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* ============================================
   DARK MODE MOBILE (si supporté)
   ============================================ */
@media (max-width: 768px) and (prefers-color-scheme: dark) {

    /* Assurer un bon contraste en dark mode */
    .project-card,
    .engagement-card,
    .stat-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .experience-nav-button {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
}