/**
 * KANY 3D Experience - Styles
 */

/* ========== CACHER TOUS LES ÉLÉMENTS PRESTASHOP SUR LA PAGE D'ACCUEIL ========== */
body.index #header,
body.index header#header,
body.index header.kany-header,
body.index .header-container,
body.index #notifications,
body.index .header-banner,
body.index .header-top,
body.index #block_myaccount_infos,
body.index .blockcms-footer,
body.index .block-social,
body.index .block-contact,
body.index .linklist,
body.index .copyright,
body.index .ps-emailsubscription,
body.index #block-reassurance,
body.index .displayFooter,
body.index .displayFooterBefore,
body.index .displayFooterAfter,
body.index .breadcrumb,
body.index .ps_imageslider,
body.index .ps_featuredproducts,
body.index .ps_banner,
body.index .ps_customtext,
body.index .ps_specials,
body.index .ps_newproducts,
body.index .ps_bestsellers,
body.index #carousel,
body.index .carousel,
body.index .carousel-inner,
body.index .carousel-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.index #wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.index #content-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.index main {
    padding: 0 !important;
    margin: 0 !important;
}

body.index {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    background: #000 !important;
    width: 100% !important;
    max-width: 100vw !important;
}

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

body.index .page-home {
    padding: 0 !important;
    margin: 0 !important;
}

/* ========== OPTIMISATIONS PERFORMANCE ========== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== SECTION PRINCIPALE PLEIN ÉCRAN ========== */
#kany-3d-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    z-index: 9999;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}


/* ========== VID�O DE FOND ========== */
#kany-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    background-size: cover;
    background-position: center 70%;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Compatibilité avec l'ancien sélecteur vidéo */
#kany-background-video {
    display: none !important;
}

#kany-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 42, 46, 0.25);
    z-index: 1;
}

/* ========== HEADER KANY 3D ========== */
.kany3d-header {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    opacity: 0;
    transform: translate3d(0, -30px, 0);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    min-height: 100px;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.kany3d-header::before,
.kany3d-header::after {
    display: none !important;
    content: none !important;
}

.kany3d-header.show {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.kany3d-logo {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translate3d(0, -15px, 0) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.kany3d-header.show .kany3d-logo {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition-delay: 0.15s;
}

.kany3d-logo img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    will-change: filter, transform;
}

.kany3d-logo img:hover {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    transform: scale(1.06);
}

/* ========== TITRE ========== */
.kany3d-main-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(10px);
    font-family: 'Anton', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #d0d0d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    text-align: center;
    line-height: 1.4;
    padding: 10px 20px;
    white-space: nowrap;
    will-change: opacity, transform;
    z-index: 1;
}

/* Page d'accueil : titre "Nos 4 saveurs uniques" */
#kanyTitle{
  font-size: 3rem !important;
}

/* Responsive : réduire le titre à partir de 1000px */
@media (max-width: 1000px) {
  #kanyTitle,
  .kany3d-main-title {
    font-size: 2.2rem !important;
    letter-spacing: 0.05em;
  }
}

.kany3d-header.show .kany3d-main-title {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.4s;
}

/* ========== BANDE SAVEURS ========== */
.kany-flavor-banner {
    position: absolute !important;
    top: 180px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    overflow: hidden !important;
    height: 1.6rem !important;
    width: 100% !important;
    max-width: 400px !important;
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%) !important;
    opacity: 1 !important;
    text-align: center !important;
    z-index: 5 !important;
    visibility: visible !important;
    display: block !important;
}

#kany-3d-section .kany-flavor-banner,
#kany-3d-section.loaded .kany-flavor-banner {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.kany-flavor-text {
    display: inline-block !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #f6edd9 !important;
    letter-spacing: 0.1em !important;
    animation: kanyScrollFlavor 8s linear infinite !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes kanyScrollFlavor {
    0% { transform: translateX(100%); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 1; }
}

/* ========== MENU NAVIGATION EN HAUT À DROITE ========== */
.kany3d-nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 35px;
    opacity: 0;
    transform: translate3d(0, -15px, 0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    white-space: nowrap;
}

.kany3d-header.show .kany3d-nav-menu {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.5s;
}

.kany3d-nav-link {
    font-family: 'Anton', sans-serif;
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: color, transform;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    padding: 0;
}

.kany3d-nav-link:hover {
    color: #ff9240 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
}

.kany3d-nav-link::after{
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff9240;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kany3d-nav-link:hover::after{
    width: 100%;
}

/* ========== ICÔNES PANIER ET COMPTE ========== */
.kany3d-nav-menu .kany-cart,
.kany3d-nav-menu .kany-account {
    color: #f6edd9;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: color, transform;
    line-height: 1;
    padding: 0;
}

.kany3d-nav-menu .kany-cart:hover,
.kany3d-nav-menu .kany-account:hover {
    color: #ff9240;
    text-decoration: none;
    transform: translateY(-2px);
    /* même style que CGV : dégradé vertical, orange dominant */
    background: linear-gradient(180deg, #ffffff 0%, #ff9240 18%, #ff9240 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kany3d-nav-menu .kany-cart i,
.kany3d-nav-menu .kany-account i {
    font-size: 24px;
}

/* ========== ÉCRAN DE CHARGEMENT ========== */
#kany-loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0e2a2e 0%, #1a3d42 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 99999;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

#kany-loading-screen.hidden {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}

.kany-loading-logo {
    margin-bottom: 30px;
    animation: kanypulse 2s ease-in-out infinite;
}

.kany-loading-logo img {
    height: 150px;
    width: auto;
    display: block;
}

@keyframes kanypulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.kany-liquid-loader {
    width: 300px;
    height: 4px;
    background: rgba(246, 237, 217, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.kany-liquid-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f6edd9, #ff9240);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: width;
}

#kanyLoadingText {
    color: #f6edd9;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

#kanyLoadingText {
    color: #f6edd9;
    font-size: 1rem;
    margin-top: 20px;
    font-weight: 400;
    opacity: 0.8;
}


/* ========== CONTENEUR BOUTEILLES ========== */
#kany-bottles-container {
    position: relative;
    width: 100%;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 6vh;
    z-index: 5;
}

.kany-bottle-wrapper {
    position: absolute;
    width: 18vw;
    height: 70vh;
    bottom: -8vh;
    transform: translateX(-100vw);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
}

.kany-bottle-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center bottom;
    backface-visibility: hidden;
    will-change: transform;
}

.kany-bottle-hitbox {
    position: absolute;
    width: 45%;
    height: 75%;
    bottom: 5%;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    border-radius: 10% 10% 35% 35%;
}

/* Effets hover sur les bouteilles */
#kany-bottle-acai.ready .kany-bottle-hitbox:hover ~ canvas {
    transform: scale(1.15) rotate(-3deg);
}
#kany-bottle-nectarine.ready .kany-bottle-hitbox:hover ~ canvas {
    transform: scale(1.15) rotate(3deg);
}
#kany-bottle-kiwi.ready .kany-bottle-hitbox:hover ~ canvas {
    transform: scale(1.15) rotate(-3deg);
}
#kany-bottle-yuzu.ready .kany-bottle-hitbox:hover ~ canvas {
    transform: scale(1.15) rotate(3deg);
}

.kany-bottle-label {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #f6edd9;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translate3d(0, 15px, 0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.kany-bottle-wrapper.ready .kany-bottle-label {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ========== FOOTER ========== */
.kany-footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    color: rgba(246, 237, 217, 0.9);
    font-size: 0.9rem;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 5;
    will-change: opacity, transform;
}

#kany-3d-section.loaded .kany-footer {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.3s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .kany-bottle-wrapper {
        width: 22vw;
    }
}

@media (max-width: 900px) {
    .kany3d-logo img {
        height: 90px;
    }
    .kany-bottle-wrapper {
        width: 28vw;
    }
    .kany3d-header {
        padding: 0 30px;
    }
    .kany3d-nav-menu {
        gap: 25px;
    }
    .kany3d-nav-link {
        font-size: 1rem;
    }
    #kanyTitle,
    .kany3d-main-title {
        font-size: 1.8rem !important;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 768px) {
    .kany3d-logo img {
        height: 72px;
    }
    .kany-bottle-wrapper {
        width: 34vw;
    }
    .kany3d-main-title {
        font-size: clamp(16px, 4.5vw, 26px);
        padding: 8px 15px;
        white-space: normal;
        line-height: 1.3;
    }
    .kany3d-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        top: 10px;
        padding: 0 15px;
    }
    .kany-bottle-label {
        font-size: 0.85rem;
    }
    .kany3d-nav-menu {
        width: 100%;
        justify-content: center;
        gap: 20px;
        order: 3;
    }
    .kany3d-nav-link {
        font-size: 0.9rem;
        letter-spacing: 0.08em;
    }
    .kany-flavor-banner {
        top: 140px;
    }

    /* ====== MOBILE: 1 bouteille + flèches ====== */
    .kany-mobile-nav {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 18vh;
        z-index: 20;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 18px;
        pointer-events: none; /* les boutons reprennent les events */
    }

    .kany-mobile-nav .kany-mobile-arrow {
        pointer-events: auto;
        width: 44px;
        height: 44px;
        border-radius: 999px;
        border: none;
        background: rgba(0, 0, 0, 0.35);
        color: #fff;
        font-size: 34px;
        line-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    }

    .kany-mobile-nav .kany-mobile-arrow:active {
        transform: scale(0.96);
    }

    /* Sur mobile, on n'affiche qu'une bouteille à la fois */
    #kany-bottles-container {
        height: 70vh;
        margin-bottom: 4vh;
        overflow: hidden;
    }

    .kany-bottle-wrapper {
        left: 50% !important;
        transform: translate3d(-50%, 0, 0) scale(1.25) !important;
        transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        opacity: 0 !important;
        pointer-events: none;
    }

    .kany-bottle-wrapper.is-active {
        opacity: 1 !important;
        pointer-events: auto;
        transform: translate3d(-50%, 0, 0) scale(1.35) !important;
    }
}

/* Très petits écrans : un peu plus grand */
/* ========== FORCER L'AFFICHAGE DU CHAT SUR TOUTES LES PAGES ========== */
#chat-bubble {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2147483647 !important;
}

@media (max-width: 480px) {
    .kany-bottle-wrapper {
        transform: translate3d(-50%, 0, 0) scale(1.35) !important;
    }
    .kany-bottle-wrapper.is-active {
        transform: translate3d(-50%, 0, 0) scale(1.45) !important;
    }
}