﻿/* ========================================================= */
/* JOLIE CAPRICIEUSE PARIS                                  */
/* FILE : frontend/css/header.css                           */
/* VERSION : HEADER PREMIUM V8 / FINAL MECHANIC FIX         */
/* ADN : SWAROVSKI STRUCTURE + PANDORA MECHANIC + JCP ADN   */
/* ========================================================= */



/* ========================================================= */
/* TOPBAR                                                    */
/* ========================================================= */

.topbar {

    position: fixed;

    top: 0;

    left: 0;

    z-index: 1000;

    width: 100%;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    background-color: #000000;

    overflow: hidden;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease;

}


.topbar p {

    font-family: "Inter", sans-serif;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.22em;

    text-transform: uppercase;

    color: #ffffff;

}



/* ========================================================= */
/* TOPBAR COMPACT STATE                                      */
/* ========================================================= */

body.header-compact-active .topbar {

    transform: translateY(-100%);

    opacity: 0;

    pointer-events: none;

}



/* ========================================================= */
/* HEADER BASE                                               */
/* ========================================================= */

.header {

    position: fixed;

    top: 42px;

    left: 0;

    z-index: 950;

    width: 100%;

    color: #111111;

    transition:
        top 0.35s ease,
        color 0.35s ease,
        transform 0.35s ease;

}



/* ========================================================= */
/* HEADER OVERLAY                                            */
/* ========================================================= */

.header-overlay {

    position: absolute;

    inset: 0;

    z-index: 1;

    background-color:
        rgba(248, 245, 241, 0.52);

    backdrop-filter: blur(4px);

    -webkit-backdrop-filter: blur(4px);

    border-bottom:
        1px solid rgba(0, 0, 0, 0.035);

    transition:
        background-color 0.35s ease,
        backdrop-filter 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;

}



/* ========================================================= */
/* HEADER FULL STATE                                         */
/* ========================================================= */

.header.header-full {

    top: 42px;

    color: #ffffff;

}


.header.header-full .header-overlay {

    background-color:
        rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(1px);

    -webkit-backdrop-filter: blur(1px);

    border-bottom:
        1px solid rgba(255,255,255,0.06);

}



/* ========================================================= */
/* HEADER HOVER STATE                                        */
/* ========================================================= */

.header.header-hover {

    top: 42px;

    color: #111111;

}


.header.header-hover .header-overlay {

    background-color:
        rgba(248, 245, 241, 0.96);

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

    border-bottom:
        1px solid rgba(0, 0, 0, 0.06);

    box-shadow:
        0px 10px 28px rgba(0, 0, 0, 0.04);

}



/* ========================================================= */
/* HEADER COMPACT STATE                                      */
/* ========================================================= */

.header.header-compact {

    top: 0;

    color: #111111;

}


.header.header-compact .header-overlay {

    background-color:
        rgba(248, 245, 241, 0.98);

    backdrop-filter: blur(8px);

    -webkit-backdrop-filter: blur(8px);

    border-bottom:
        1px solid rgba(0, 0, 0, 0.06);

    box-shadow:
        0px 8px 22px rgba(0, 0, 0, 0.04);

}



/* ========================================================= */
/* HEADER CONTAINERS                                         */
/* ========================================================= */

.header-top,
.header-main,
.header-nav {

    position: relative;

    z-index: 5;

    width: min(100% - 120px, 1600px);

    margin-inline: auto;

}



/* ========================================================= */
/* HEADER TOP                                                */
/* ========================================================= */

.header-top {

    height: 40px;

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    transition:
        height 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;

}



/* ========================================================= */
/* HEADER TOP COMPACT                                        */
/* ========================================================= */

.header.header-compact .header-top {

    height: 0;

    opacity: 0;

    overflow: hidden;

    transform:
        translateY(-12px);

}



/* ========================================================= */
/* HEADER TOP ZONES                                          */
/* ========================================================= */

.header-top-left,
.header-top-center,
.header-top-right {

    display: flex;

    align-items: center;

}


.header-top-left {

    justify-content: flex-start;

}


.header-top-center {

    justify-content: center;

}


.header-top-right {

    justify-content: flex-end;

    gap: 20px;

}



/* ========================================================= */
/* HEADER SMALL LINKS                                        */
/* ========================================================= */

.header-small-link {

    position: relative;

    font-family: "Inter", sans-serif;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    color: currentColor;

    transition:
        color 0.3s ease,
        opacity 0.3s ease;

}


.header-small-link:hover {

    opacity: 0.62;

}



/* ========================================================= */
/* HEADER MAIN                                               */
/* ========================================================= */

.header-main {

    min-height: 112px;

    display: grid;

    grid-template-columns: 280px 1fr 210px;

    align-items: center;

    gap: 60px;

    transition:
        min-height 0.35s ease,
        height 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;

}



/* ========================================================= */
/* HEADER MAIN COMPACT                                       */
/* ========================================================= */

.header.header-compact .header-main {

    min-height: 0;

    height: 0;

    opacity: 0;

    overflow: hidden;

    transform:
        translateY(-14px);

}



/* ========================================================= */
/* LOGO                                                      */
/* ========================================================= */

.logo {

    position: relative;

    z-index: 10;

    display: flex;

    align-items: center;

    justify-content: flex-start;

    text-decoration: none;

}


.logo img {

    width: 440px;

    height: auto;

    object-fit: contain;

    display: block;

    image-rendering: auto;

    filter: none;

    opacity: 1;

    transition:
        width 0.35s ease,
        transform 0.35s ease,
        opacity 0.35s ease;

}


.logo:hover img {

    transform: scale(1.01);

    opacity: 0.96;

}



/* ========================================================= */
/* SEARCH BAR                                                */
/* ========================================================= */

.header-search {

    position: relative;

    z-index: 10;

    width: 100%;

    max-width: 520px;

    height: 52px;

    margin-inline: auto;

    display: flex;

    align-items: center;

    border-bottom:
        1px solid rgba(0, 0, 0, 0.16);

    opacity: 0.86;

    transition:
        opacity 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease;

}


.header-search:hover {

    opacity: 1;

}



/* ========================================================= */
/* SEARCH ICON                                               */
/* ========================================================= */

.search-icon {

    width: 20px;

    height: 20px;

    flex-shrink: 0;

    color: currentColor;

    transition:
        color 0.3s ease;

}


.header-search input {

    width: 100%;

    height: 100%;

    padding-inline: 16px;

    border: none;

    background: transparent;

    font-family: "Inter", sans-serif;

    font-size: 14px;

    font-weight: 400;

    color: currentColor;

}


.header-search input::placeholder {

    color: currentColor;

    opacity: 0.62;

}

.header.header-full .header-search {
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.header.header-full .header-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}


.header-search input:focus {

    outline: none;

}



/* ========================================================= */
/* HEADER ICONS                                              */
/* ========================================================= */

.header-icons {

    position: relative;

    z-index: 10;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;

}



/* ========================================================= */
/* HEADER CIRCLE BUTTON                                      */
/* ========================================================= */

.header-circle-button {

    position: relative;

    width: 50px;

    height: 50px;

    border-radius: 50%;

    border:
        1px solid rgba(0, 0, 0, 0.08);

    background-color:
        rgba(255, 255, 255, 0.62);

    color: currentColor;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    opacity: 0.96;

    transition:
        width 0.35s ease,
        height 0.35s ease,
        transform 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        opacity 0.3s ease,
        box-shadow 0.3s ease;

}

/* ========================================================= */
/* HERO STATE ICONS                                          */
/* ========================================================= */

.header.header-full .header-circle-button {

    background-color:
        rgba(255,255,255,0.08);

    border:
        1px solid rgba(255,255,255,0.18);

    color: #ffffff;

}


.header-circle-button svg {

    width: 19px;

    height: 19px;

    color: currentColor;

    transition:
        width 0.35s ease,
        height 0.35s ease;

}


.header-circle-button:hover {

    transform: translateY(-2px);

    opacity: 1;

    box-shadow:
        0px 8px 20px rgba(0, 0, 0, 0.04);

}



/* ========================================================= */
/* CART COUNT                                                */
/* ========================================================= */

.cart-count {

    position: absolute;

    top: -4px;

    right: -4px;

    width: 18px;

    height: 18px;

    border-radius: 50%;

    background-color: #000000;

    color: #ffffff;

    font-size: 9px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

}



/* ========================================================= */
/* HEADER NAVIGATION                                         */
/* ========================================================= */

.header-nav {

    position: relative;

    z-index: 10;

    height: 66px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 46px;

    border-top:
        1px solid rgba(0, 0, 0, 0.05);

    opacity: 1;

    transition:
        height 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease,
        gap 0.18s ease;

}



/* ========================================================= */
/* NAV COMPACT                                               */
/* ========================================================= */

.header.header-compact .header-nav {

    height: 54px;

    gap: 42px;

    border-top:
        1px solid rgba(0, 0, 0, 0.04);

}



/* ========================================================= */
/* HEADER NAV LINKS                                          */
/* ========================================================= */

.header-nav a {

    position: relative;

    font-family: "Inter", sans-serif;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    color: currentColor;

    transition:
        opacity 0.3s ease,
        color 0.3s ease,
        font-size 0.35s ease;

}


.header-nav a:hover {

    opacity: 0.62;

}



/* ========================================================= */
/* NAV LINKS COMPACT                                         */
/* ========================================================= */

.header.header-compact .header-nav a {

    font-size: 11px;

}



/* ========================================================= */
/* NAV UNDERLINE                                             */
/* ========================================================= */

.header-nav a::after {

    content: "";

    position: absolute;

    left: 0;

    bottom: -10px;

    width: 0%;

    height: 1px;

    background-color: currentColor;

    transition:
        width 0.3s ease;

}


.header-nav a:hover::after {

    width: 100%;

}



/* ========================================================= */
/* LARGE DESKTOP                                             */
/* ========================================================= */

@media screen and (max-width: 1600px) {

    .header-main {

        grid-template-columns: 250px 1fr 200px;

        gap: 42px;

    }

}



/* ========================================================= */
/* LAPTOP                                                    */
/* ========================================================= */

@media screen and (max-width: 1280px) {

    .header-top,
    .header-main,
    .header-nav {

        width: min(100% - 60px, 100%);

    }

    .header-main {

        grid-template-columns: 220px 1fr 180px;

        gap: 30px;

    }

    .header-search {

        max-width: 420px;

    }

    .header-nav {

        gap: 32px;

    }

    .header.header-compact .header-nav {

        gap: 28px;

    }

}



/* ========================================================= */
/* TABLET                                                    */
/* ========================================================= */

@media screen and (max-width: 980px) {

    .header-top {

        display: none;

    }

    .header-search {

        display: none;

    }

    .header-nav {

        display: none;

    }

    .header {

        top: 42px;

    }

    .header.header-compact {

        top: 0;

    }

    .header-main {

        width: min(100% - 40px, 100%);

        min-height: 90px;

        grid-template-columns: 1fr auto;

    }

    .header.header-compact .header-main {

        height: auto;

        min-height: 76px;

        opacity: 1;

        overflow: visible;

        transform: none;

        grid-template-columns: 1fr auto;

    }

    .logo img {

        width: 320px;

    }

    .header.header-compact .logo img {

        width: 180px;

    }

}



/* ========================================================= */
/* MOBILE                                                    */
/* ========================================================= */

@media screen and (max-width: 640px) {

    .topbar {

        height: 38px;

        padding-inline: 20px;

    }

    .topbar p {

        font-size: 9px;

        line-height: 1.4;

        text-align: center;

    }

    .header {

        top: 38px;

    }

    .header.header-compact {

        top: 0;

    }

    .header-main {

        width: min(100% - 28px, 100%);

        min-height: 82px;

    }

    .header.header-compact .header-main {

        height: auto;

        min-height: 70px;

        opacity: 1;

        overflow: visible;

        transform: none;

    }

    .logo img {

        width: 220px;

    }

    .header.header-compact .logo img {

        width: 210px;

    }

    .header-icons {

        gap: 10px;

    }

    .header-circle-button {

        width: 42px;

        height: 42px;

    }

    .header.header-compact .header-circle-button {

        width: 38px;

        height: 38px;

    }


}

/* ===================================================== */
/* PAGE PRODUIT                                           */
/* ===================================================== */

    .product-page .header {
        background: #FFFFFF;
        border-bottom: 1px solid #EAE4DD;
    }

    .product-page .header-top,
    .product-page .header-main,
    .product-page .header-navigation {
        background: #FFFFFF;
    }

    .product-page .header a {
        color: #111111;
    }

    .product-page .header svg {
        color: #111111;
    }

/* ========================================================= */
/* HEADER FULL — OVERRIDE FINAL                              */
/* ========================================================= */

    .header.header-full {
        color: #ffffff !important;
        background-color: transparent !important;
    }

    .header.header-full .header-overlay {
        background-color: transparent !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.12) !important;
        box-shadow: none !important;
    }

    .header.header-full .header-top,
    .header.header-full .header-main,
    .header.header-full .header-nav {
        background-color: transparent !important;
        background: transparent !important;
    }

    .header.header-full .header-nav {
        border-top: 1px solid rgba(255,255,255,0.12) !important;
    }

    .header.header-full .logo img {
        filter: none !important;
    }

    .header.header-full .header-search {
        border-bottom: 1px solid rgba(255,255,255,0.28) !important;
    }

    .header.header-full .header-search input,
    .header.header-full .header-search input::placeholder {
        color: rgba(255,255,255,0.82) !important;
    }

    .header.header-full .header-circle-button {
        background-color: rgba(255,255,255,0.06) !important;
        background: rgba(255,255,255,0.06) !important;
        border: 1px solid rgba(255,255,255,0.18) !important;
        color: #ffffff !important;
    }

/* ========================================================= */
/* MOBILE FIRST HEADER — JCP / SWAROVSKI + PANDORA LOGIC     */
/* Scope volontairement limité au mobile/tablette.            */
/* Desktop header states above remain untouched.              */
/* ========================================================= */

.mobile-menu-button,
.mobile-menu-backdrop,
.mobile-menu-panel {
    display: none;
}

@media screen and (max-width: 980px) {

    .mobile-menu-button {
        position: relative;
        z-index: 20;
        width: 42px;
        height: 42px;
        padding: 0;
        border: none;
        background: transparent;
        color: currentColor;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
    }

    .mobile-menu-button span {
        width: 21px;
        height: 1px;
        display: block;
        background: currentColor;
        transition: background-color 0.25s ease, transform 0.25s ease;
    }

    .header-top,
    .header-search,
    .header-nav {
        display: none !important;
    }

    .header {
        top: 42px;
        color: #ffffff;
    }

    .header.header-full,
    .header.header-full.hero-mode {
        top: 42px;
        color: #ffffff !important;
        background: transparent !important;
    }

    .header.header-hover,
    .header.header-compact,
    .header.scrolled {
        color: #111111 !important;
    }

    .header.header-compact {
        top: 0;
    }

    .header.header-full .header-overlay {
        background: transparent !important;
        background-color: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .header.header-hover .header-overlay,
    .header.header-compact .header-overlay,
    .header.scrolled .header-overlay {
        background: rgba(248, 245, 241, 0.98) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .header-main,
    .header.header-compact .header-main {
        width: min(100% - 34px, 100%);
        min-height: 74px;
        height: 74px;
        opacity: 1;
        overflow: visible;
        transform: none;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        gap: 0;
    }

    .logo {
        grid-column: 2;
        justify-content: center;
        justify-self: center;
        width: auto;
    }

    .logo img,
    .header.header-compact .logo img {
        width: 200px;
        max-width: 200px;
        height: auto;
    }

    .header-icons {
        grid-column: 3;
        justify-self: end;
        gap: 0;
        display: flex;
    }

    .header-icons .header-circle-button:not(.cart-button) {
        display: none !important;
    }

    .header-circle-button,
    .header.header-compact .header-circle-button {
        width: 42px;
        height: 42px;
        border-radius: 0;
        border: none;
        background: transparent !important;
        box-shadow: none !important;
        color: currentColor;
    }

    .header.header-full .header-circle-button {
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
    }

    .header-circle-button svg {
        width: 22px;
        height: 22px;
    }

    .cart-count {
        top: 4px;
        right: 0;
        width: 17px;
        height: 17px;
        background: #000000;
        color: #ffffff;
        font-size: 9px;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1900;
        display: block;
        background: rgba(0, 0, 0, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.32s ease;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1950;
        width: min(86vw, 380px);
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        background: #F8F5F1;
        color: #111111;
        box-shadow: 24px 0 54px rgba(0, 0, 0, 0.18);
        transform: translateX(-104%);
        transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .mobile-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.mobile-menu-open .mobile-menu-panel {
        transform: translateX(0);
    }

    .mobile-menu-head {
        min-height: 104px;
        padding: 24px 24px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .mobile-menu-logo {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }

    .mobile-menu-logo img {
        width: 220px;
        height: auto;
        display: block;
    }

    .mobile-menu-close {
        width: 44px;
        height: 44px;
        border: 1px solid rgba(0, 0, 0, 0.10);
        background: transparent;
        color: #111111;
        font-size: 34px;
        line-height: 1;
        font-weight: 200;
        cursor: pointer;
    }

    .mobile-menu-nav {
        padding: 26px 24px 20px;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-nav a {
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        color: #222222;
        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        text-decoration: none;
    }

    .mobile-menu-nav span {
        font-size: 28px;
        font-weight: 200;
        line-height: 1;
        opacity: 0.58;
    }

    .mobile-menu-utilities {
        margin-top: auto;
        padding: 18px 24px 28px;
        display: flex;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, 0.54);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .mobile-menu-utilities a {
        min-height: 46px;
        display: flex;
        align-items: center;
        gap: 14px;
        color: rgba(17, 17, 17, 0.74);
        font-family: "Inter", sans-serif;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
    }

    .mobile-menu-utilities span {
        width: 24px;
        display: inline-flex;
        justify-content: center;
        color: #111111;
        font-size: 22px;
        line-height: 1;
    }

}

@media screen and (max-width: 640px) {

    .topbar {
        height: 38px;
        padding-inline: 18px;
    }

    .topbar p {
        font-size: 9px;
        line-height: 1.35;
        text-align: center;
    }

    .header,
    .header.header-full,
    .header.header-full.hero-mode {
        top: 38px;
    }

    .header.header-compact {
        top: 0;
    }

    .header-main,
    .header.header-compact .header-main {
        width: min(100% - 28px, 100%);
        min-height: 70px;
        height: 70px;
    }

    .logo img,
    .header.header-compact .logo img {
        width: 200px;
        max-width: 200px;
    }

    .mobile-menu-panel {
        width: min(84vw, 360px);
    }

    .mobile-menu-head {
        min-height: 98px;
        padding-inline: 22px;
    }

    .mobile-menu-logo img {
        width: 138px;
    }

}


