:root {
    --primary-color: #121212;
    --secondary-color: #f5f5f7;
    --accent-color: #0071e3;
    --text-color: #1d1d1f;
    --spacing: 100vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.section {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 5%;
    overflow: hidden;
}

.hero {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    flex-direction: column;
    text-align: center;
    padding-top: 80px; /* Ajout de padding pour éviter le chevauchement avec la navbar */
}

section.hero {
    padding: 80px 0 0 0; /* Modification du padding pour tenir compte de la navbar */
}


.logo-placeholder {
    width: 96px; /* 120px * 0.8 */
    height: 96px; /* 120px * 0.8 */
    margin-bottom: 1.6rem; /* 2rem * 0.8 */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
}

.product-placeholder {
    width: 64%; /* 80% * 0.8 */
    max-width: 480px; /* 600px * 0.8 */
    height: 320px; /* 400px * 0.8 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
    margin: 1.6rem 0; /* 2rem * 0.8 */
}

.image-placeholder {
    width: 36%; /* 45% * 0.8 */
    height: 48vh; /* 60vh * 0.8 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.3);
    margin-left: 80px; /* 100px * 0.8 */
}

.image-placeholder-different-sizes {
    width: 36%; /* 45% * 0.8 */
    height: 48vh; /* 60vh * 0.8 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.3);
    margin-left: 80px; /* 100px * 0.8 */
    padding-right: 75px;
}


.scroll-rotating-img {
    transition: transform 0.1s linear;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    width: 100%; /* Réduction de 20% */
}

.content-block {
    max-width: 480px; /* 600px * 0.8 */
    opacity: 0;
    transform: translateY(40px); /* 50px * 0.8 */
    transition: opacity 1s, transform 1s;
}

.content-left {
    transform: translateX(-80px); /* -100px * 0.8 */
}

.content-right {
    padding-top: 48px; /* 60px * 0.8 */
    transform: translateX(80px); /* 100px * 0.8 */
}

.visible {
    opacity: 1;
    transform: translate(0, 0);
}

h1 {
    font-size: 2.8rem; /* 3.5rem * 0.8 */
    font-weight: 700;
    margin-bottom: 0.8rem; /* 1rem * 0.8 */
    letter-spacing: -0.4px; /* -0.5px * 0.8 */
}

h2 {
    font-size: 2rem; /* 2.5rem * 0.8 */
    font-weight: 700;
    margin-bottom: 1.2rem; /* 1.5rem * 0.8 */
    letter-spacing: -0.4px; /* -0.5px * 0.8 */
}

h3 {
    font-size: 1.44rem; /* 1.8rem * 0.8 */
    font-weight: 600;
    margin-bottom: 0.8rem; /* 1rem * 0.8 */
    letter-spacing: -0.24px; /* -0.3px * 0.8 */
}

p {
    font-size: 0.96rem; /* 1.2rem * 0.8 */
    line-height: 1.6;
    margin-bottom: 1.2rem; /* 1.5rem * 0.8 */
}

.emphasis {
    color: var(--accent-color);
    font-weight: 600;
}

.flex-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem; /* 2rem * 0.8 */
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 9.6px 19.2px; /* 12px 24px * 0.8 */
    border-radius: 24px; /* 30px * 0.8 */
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.6rem; /* 2rem * 0.8 */
    transition: background-color 0.3s;
    font-size: 0.9rem; /* Réduction pour harmoniser */
}

.btn:hover {
    background-color: #0062c2;
}

.citation {
    font-style: italic;
    font-size: 0.72rem; /* 0.9rem * 0.8 */
    color: #555;
    margin-top: 0.4rem; /* 0.5rem * 0.8 */
}

.animated-earbud {
    position: relative;
    width: 160px; /* 200px * 0.8 */
    height: 160px; /* 200px * 0.8 */
    margin: 0 auto;
}
  
.earbud-structure {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 120px; /* 150px * 0.8 */
    z-index: 1;
}
  
.earbud-tip {
    position: absolute;
    top: -120px; /* -150px * 0.8 */
    left: -96px; /* -120px * 0.8 */
    width: 120px; /* 150px * 0.8 */
    z-index: 2;
    transform-origin: center;
    transition: all 0.6s ease-out;
}

.size-selector {
    margin-top: 16px; /* 20px * 0.8 */
    text-align: center;
    padding: 16px; /* 20px * 0.8 */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px; /* 15px * 0.8 */
    backdrop-filter: blur(8px); /* 10px * 0.8 */
    max-width: 320px; /* 400px * 0.8 */
    margin-left: 16%;
    margin-right: auto;
}

.size-selector h3 {
    color: var(--secondary-color);
    margin-bottom: 12px; /* 15px * 0.8 */
    font-size: 1.44rem; /* 1.8rem * 0.8 */
    font-weight: 600;
    letter-spacing: -0.24px; /* -0.3px * 0.8 */
}

.size-buttons {
    display: flex;
    justify-content: center;
    gap: 12px; /* 15px * 0.8 */
    margin-bottom: 12px; /* 15px * 0.8 */
}

.size-btn {
    width: 44px; /* 55px * 0.8 */
    height: 44px; /* 55px * 0.8 */
    border: 2px solid rgba(245, 245, 247, 0.3);
    background: rgba(245, 245, 247, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    font-size: 12.8px; /* 16px * 0.8 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.size-btn:hover {
    background: rgba(245, 245, 247, 0.2);
    border-color: rgba(245, 245, 247, 0.5);
    transform: scale(1.1);
}

.size-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 3.2px 12px rgba(0, 113, 227, 0.4); /* 4px 15px * 0.8 */
}

.size-description {
    color: rgba(245, 245, 247, 0.8);
    font-size: 0.8rem; /* 1rem * 0.8 */
    margin: 0;
    min-height: 16px; /* 20px * 0.8 */
    font-weight: 500;
    line-height: 1.4;
}

/* Tailles des embouts */
.earbud-tip.size-s {
    width: 96px; /* 120px * 0.8 */
}

.earbud-tip.size-m {
    width: 104px; /* 130px * 0.8 */
}

.earbud-tip.size-l {
    width: 128px; /* 160px * 0.8 */
}

.earbud-tip.size-xl {
    width: 136px; /* 170px * 0.8 */
}

.image-and-size {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px; /* 400px * 0.8 */
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-72px); /* -90px * 0.8 */
}

.dark {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.light {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    height: 80px;
    width: 100%;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-scrolled {
    background-color: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.white-nav .nav-links a {
    color: white !important;
}
  
.white-nav .nav-links a:hover {
    color: var(--accent-color) !important;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    width: 240px !important; /* 300px * 0.8 */
    height: auto !important;
}

.logo-dark,
.logo-light {
    transition: opacity 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 1.6rem; /* 2rem * 0.8 */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem; /* Légère réduction */
    transition: color 0.3s;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem; /* 2rem * 0.8 */
    margin: 1.6rem 0; /* 2rem * 0.8 */
}

.stat-item {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1.2rem; /* 1.5rem * 0.8 */
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 2.4rem; /* 3rem * 0.8 */
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.4rem; /* 0.5rem * 0.8 */
}

.causes-list {
    margin: 1.6rem 0; /* 2rem * 0.8 */
}

.cause-item {
    margin-bottom: 1.2rem; /* 1.5rem * 0.8 */
}

.cause-item h4 {
    font-size: 1.04rem; /* 1.3rem * 0.8 */
    margin-bottom: 0.4rem; /* 0.5rem * 0.8 */
    font-weight: 600;
}

.scroll-gallery {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    background: transparent;
    position: relative; 
}

.scroll-track {
    display: flex;
    gap: 3rem;
    transition: transform 0.2s ease-out;
    will-change: transform;
    padding: 1rem 0;
}


.carousel-image {
    
    height: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: levitate 2s ease-in-out infinite alternate;
    cursor: pointer;
}

.floating-img {
    width: 64%; /* 80% * 0.8 */
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: levitate 3s ease-in-out infinite alternate;
    cursor: pointer;
}
.carousel-nav {
    display: none;
}

@keyframes levitate {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-8px); /* -10px * 0.8 */
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        touch-action: pan-y;
    }
    .section {
        padding: 2rem 1rem;
        height: auto;
        min-height: 100vh;
    }

    .hero {
        padding-top: 100px;
        padding-bottom: 2rem;
    }

    h1 {
        font-size: 2.2rem;
        text-align: center;
    }

    h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    p {
        font-size: 1rem;
        text-align: center;
    }

    .flex-container {
        flex-direction: column;
        gap: 2rem;
    }

    .content-block {
        max-width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        margin: 0 auto;
        overflow: visible;
        word-wrap: break-word;
    }
    .content-left, .content-right {
        margin-top: 1rem;
    }

    .image-placeholder {
        width: 100%;
        height: 300px;
        margin: 1rem auto;
        margin-left: 0;
    }
    .image-placeholder img {
        width: 100% !important;
        height: auto !important;
        max-width: 300px;
        object-fit: contain;
        margin: 0 auto;
        display: block;
        /* Ajout pour forcer le chargement */
        /* loading: eager; */
    }
    .image-placeholder-different-sizes {
        width: 100%;
        height: auto;
        margin: 1rem auto;
        margin-left: 0;
        padding-right: 0;
        overflow: visible;
    }

    .image-placeholder-different-sizes img {
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
        object-fit: contain;
        margin: 0 auto;
        display: block;
    }

    

    /* .image-placeholder-different-sizes img {
        width: 100% !important;
        max-width: 90vw !important;
        height: auto !important;
        object-fit: contain;
        margin: 0 auto;
        display: block;
    } */

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .header-logo img {
        width: 180px !important;
    }

    .scroll-gallery {
        padding: 1rem 0;
        overflow: hidden;
        position: relative;
        width: 100vw; /* Force la largeur */
    }


    .carousel-image {
        width: calc(50vw - 2rem);
        height: auto;
        max-height: 280px;
        object-fit: contain;
        flex-shrink: 0;
        animation: levitate 2s ease-in-out infinite alternate;
    }
    
    .carousel-nav {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }
    .nav-arrow {
        background: var(--accent-color);
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s;
    }

    .nav-arrow:hover {
        background: #0062c2;
    }

    .nav-arrow:disabled {
        background: #ccc;
        cursor: not-allowed;
    }


   
    
    .scroll-track {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-y;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    


    
  

   
    .btn {
        display: block;
        text-align: center;
        margin: 2rem auto;
        width: fit-content;
    }

    #fbx-container {
        width: 300px !important;
        height: 300px !important;
        margin: 0 auto;
    }

    .size-selector {
        margin-left: auto;
        margin-right: auto;
        max-width: 300px;
    }

    .image-and-size {
        transform: none;
        max-width: 100%;
    }

    .animated-earbud {
        width: 120px;
        height: 120px;
    }

    .earbud-structure {
        width: 100px;
    }

    .earbud-tip {
        width: 100px;
    }  
 
    .earbud-tip.size-s { width: 80px; }
    .earbud-tip.size-m { width: 85px; }
    .earbud-tip.size-l { width: 105px; }
    .earbud-tip.size-xl { width: 110px; }

    
}  





@media (max-width: 480px) {
    .header {
        padding: 8px 3%;
        height: 70px;
    }

    .hero {
        padding-top: 90px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .header-logo img {
        width: 150px !important;
    }

    .carousel-image {
        height: 200px;
    }

    .section {
        padding: 0 2%;
    }

    #fbx-container {
        width: 250px !important;
        height: 250px !important;
    }

    .size-selector {
        max-width: 250px;
        padding: 12px;
    }

    .size-btn {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }

    .content-block {
        padding: 1rem 1.5rem;
    }
    
    .section {
        padding: 1rem 0.5rem;
    }
}

#fbx-container {
    position: relative;
    width: 400px !important; /* 500px * 0.8 */
    height: 400px !important; /* 500px * 0.8 */
}

#rotate-hint {
    position: absolute;
    bottom: 8px; /* 10px * 0.8 */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6.4px 11.2px; /* 8px 14px * 0.8 */
    border-radius: 16px; /* 20px * 0.8 */
    font-size: 11.2px; /* 14px * 0.8 */
    font-family: sans-serif;
    animation: fadeOut 8s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        display: none;
    }
}

/* Bouton commander fixe pour mobile */
.mobile-order-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    display: none;
}

@media (max-width: 768px) {
    .mobile-order-btn {
        display: block !important;
    }
}