/* ==========================================================================
   Top bar
   ========================================================================== */

.top-bar {
    background-color: var(--light-pink-darker);
    color: black;
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
    padding-top: 6.5px;
    height: var(--header-top-height);
}

.top-bar-track {
    display: inline-flex;
    will-change: transform;
}

.top-bar-inner {
    display: inline-flex;
    flex-shrink: 0;
    white-space: nowrap;
}

.top-bar-item {
    padding: 0 1rem;
    flex-shrink: 0;
}

.top-bar-item::after {
    content: '·';
    margin-left: 2rem;
    position: relative;
    top: 0.1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 101;
    width: 100%;
}

.home-page .site-header {
    position: fixed;
}

.site-header-nav {
    z-index: 100;
    width: 100%;
    height: var(--header-nav-height);
    background-color: var(--light-pink);
    border-bottom: 4px solid white;
    transition: all 0.3s ease;
}

.site-header-nav.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
}

/* Sur la home : transparent au-dessus du hero, light-pink une fois passé */
.site-header-nav.is-over-hero {
    background-color: transparent;
    box-shadow: none;
    color: white;
    border-bottom: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo
   ========================================================================== */

.site-logo {
    position: relative;
    top: -3.5px;
    display: inline-flex;
    align-items: center;
}

.is-stuck .site-logo {
    top: -2px;
}

.site-logo svg {
    width: 340px;
    height: auto;
    transition: fill 0.2s ease, width 0.2s ease;
}

.is-stuck .site-logo svg {
    animation: logo-summer 2.5s ease-in-out;
    width: 240px;
}

.site-logo:hover svg,
.site-logo:focus svg {
    animation: logo-summer 2.5s ease-in-out infinite;
}

@keyframes logo-summer {
    0%   { fill: #3a9bd5; }   /* bleu mer */
    20%  { fill: #2ec4b6; }   /* turquoise */
    40%  { fill: #f4a261; }   /* sable chaud */
    60%  { fill: #e76f51; }   /* corail */
    80%  { fill: #f7c59f; }   /* lumière dorée */
    100% { fill: #3a9bd5; }
}

/* Navigation
   ========================================================================== */

.site-nav {
    display: flex;
    width: 30%;
}

.site-nav > ul {
    display: flex;
    align-items: stretch;
    height: 100%;
    gap: 0;
    text-transform: uppercase;
    font-weight: 500;
    gap: 3rem;
}

.site-nav li {
    display: flex;
}

.site-nav a {
    display: flex;
    align-items: center;
}

.site-nav a:hover {
    color: var(--blue);
}

.site-header-nav.is-over-hero .site-nav a:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-underline-thickness: 1.5px;
}

.site-nav--actions > ul {
    justify-content: flex-end;
    margin-left: auto;
}

/* Icône burger sur "Shop"
   ========================================================================== */

.nav-shop {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-shop-icon {
    position: relative;
    bottom: 1.5px;
    display: flex;
    flex-direction: column;
    gap: 3.5px;
    width: 20px;
}

.nav-shop-icon span {
    display: block;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: width 0.2s ease;
}

.nav-shop-icon span:nth-child(1) { width: 100%; }
.nav-shop-icon span:nth-child(3) { width: 70%; }

.nav-shop:hover .nav-shop-icon span,
.nav-shop[aria-expanded="true"] .nav-shop-icon span { 
    width: 100%;
}

.nav-shop[aria-expanded="true"] { 
    color: var(--blue);
}

/* Icônes Mon compte et Panier
   ========================================================================== */

.nav-account,
.nav-cart {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-account svg,
.nav-cart svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    position: relative;
    bottom: 1px;
}

.nav-account-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.nav-account-badge {
    position: absolute;
    bottom: -2px;
    right: -5px;
    width: 14px;
    height: 14px;
    background-color: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--light-pink);
}

.nav-account-badge svg {
    width: 7px;
    height: 7px;
    bottom: 0;
    stroke-width: 2;
}

.is-stuck .nav-account-badge {
    border-color: var(--light-pink);
}

.nav-cart-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.cart-count {
    position: absolute;
    bottom: -5px;
    right: -6px;
    width: 16px;
    height: 16px;
    background-color: var(--blue);
    color: white;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 3px;
    border: 1.5px solid var(--light-pink);
    box-sizing: border-box;
    line-height: 1;
}

