/* =========================================================
   GLOBAL BASE
========================================================= */

body,
button,
input,
textarea,
select,
a {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html,
body {
  background-color: #ffffff;
  color-scheme: light;
}

/* =========================================================
   GLOBAL SPACING
========================================================= */

:root {
  --mobile-gutter: 1rem;
  --tablet-gutter: 1.5rem;
  --desktop-gutter: clamp(1.5rem, 3vw, 3rem);
  --header-height: 5rem;
  --header-offset: 6rem;
  --page-top-space: 1.5rem;
}

/* =========================================================
   GLOBAL UNDERLINE SYSTEM
========================================================= */

[data-underline] {
  position: relative;
}

[data-underline]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right center;

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-underline]:hover::after,
[data-underline].is-active::after,
[data-underline]:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* =========================================================
   GLOBAL UNDERLINE SYSTEM — CTA / CATEGORIES / SUBCATS
========================================================= */

.cta,
.link_category_tab_mobile,
.subcathome-link,
.subcathome-link_all,
.cathome-link {
  position: relative;
  color: #000;
  text-decoration: none !important;
  cursor: pointer;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.9rem 0;
  margin-top: 2rem;

  font-family: var(--_typographie-principale---font-family);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.04em;

  transform-origin: center;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 1px;
  background: currentColor;

  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cta:hover {
  transform: scale(1.035);
}

.cta:hover::after,
.cta:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.cta:focus-visible {
  outline: none;
}


/* =========================================================
   GLOBAL CTA UNDERLINE
========================================================= */

[data-cta="underline"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;

  padding: 0 0 0.35rem 0;

  color: inherit;
  text-decoration: none;

  background: transparent;
  border: none;

  line-height: 1;

  cursor: pointer;
}

/* Underline */

[data-cta="underline"]::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(1);
  transform-origin: left center;

  transition: transform 320ms ease;
}

/* Hover */

[data-cta="underline"]:hover::after {
  transform: scaleX(0.55);
}


/* =========================================================
   HEADER ACTIONS — HARMONISATION
========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  height: 100%;

  line-height: 1;
}

.header-actions-custom {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 0.8rem;

  width: 100%;
  height: 100%;

  box-sizing: border-box;

  transform: translate(-1.5rem, 2rem);
}


/* =========================================================
   ACCOUNT
========================================================= */

.header-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 0.4rem;

  min-width: 0;

  color: inherit;
  text-decoration: none;

  font-family:
    var(--_typographie-principale---font-family);

  line-height: 1;
}

.header-account-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.5rem;
  height: 1.5rem;

  flex: 0 0 1.5rem;
}

.header-account-icon .header-action-icon,
.header-cart .header-action-icon {
  display: block;

  width: 1.15rem;
  height: 1.15rem;

  object-fit: contain;

  flex-shrink: 0;
}

.header-account-label {
  display: inline-block;

  font-family:
    var(--_typographie-principale---font-family);

  font-size: 0.72rem;
  line-height: 1;

  letter-spacing: 0.16em;
  text-transform: uppercase;

  white-space: nowrap;

  transform: translateY(-0.02rem);
}

.header-account-label:empty {
  display: none;
}


/* =========================================================
   CART
========================================================= */

.cart-preview-root {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
}

.header-cart {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.5rem;
  height: 1.5rem;

  padding: 0;

  color: inherit;
  text-decoration: none;

  font-family:
    var(--_typographie-principale---font-family);

  line-height: 1;
}

.header-cart-count {
  position: absolute;

  top: -0.18rem;
  right: -0.25rem;

  min-width: 0.8rem;

  font-family:
    var(--_typographie-principale---font-family);

  font-size: 0.65rem;
  line-height: 1;

  text-align: center;
}


/* =========================================================
   SHARED ICON BEHAVIOUR
========================================================= */

.header-account *,
.header-cart * {
  line-height: 1;
}


/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 767px) {

:root {
    --header-offset: 3.5rem;
    --header-height: 3.5rem;
  }
   
  .header-actions-custom {
    position: absolute;

    top: 50%;
    right: 1rem;

    width: auto;
    height: auto;

    transform: translateY(-50%);

    gap: 0.9rem;
  }

  .header-account {
    gap: 0;
  }

  .header-account-label {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;

    border: 0 !important;

    transform: none;
  }

  .header-cart-count {
    top: -0.15rem;
    right: -0.22rem;

    font-size: 0.62rem;
  }
}
