/* JASP · En-tête — cotes relevées sur Figma (02-home, 1920 px) */
.j-header {
  display: flex; align-items: center;
  height: calc(182.2 * var(--u));           /* contenu centré sur y = 91 */
  margin-bottom: calc(14.35 * var(--u));    /* le hero démarre à y = 196.55 */
  padding-left: var(--j-gutter);
  padding-right: calc(102.8 * var(--u));
  max-width: 1920px; margin-inline: auto;
}

.j-header__logo { flex: none; display: block; width: calc(215.76 * var(--u)); position: relative; top: calc(-5.15 * var(--u)); }
.j-header__logo img { display: block; width: 100%; height: auto; }

.j-header__search {
  flex: none; display: flex; align-items: center; gap: calc(26 * var(--u));
  width: calc(449.87 * var(--u)); height: calc(62.565 * var(--u));
  padding-inline: calc(28 * var(--u));
  background: var(--j-grey-bg); border-radius: var(--j-radius-pill);
}
.j-header__search-icon { display: flex; flex: none; color: var(--j-black); cursor: pointer; }
.j-header__search .j-icon { width: calc(24.875 * var(--u)); height: calc(24.875 * var(--u)); }
.j-header__search input {
  flex: 1; min-width: 0; border: 0; background: none; padding: 0; outline: none;
  font-family: var(--j-font); font-size: calc(24 * var(--u)); line-height: 1;
  letter-spacing: -0.02em; color: var(--j-black);
}
.j-header__search input::placeholder { color: var(--j-black); opacity: 1; }
.j-header__search:focus-within { box-shadow: 0 0 0 2px var(--j-blue); }

.j-header__nav { flex: none; margin-left: calc(94.83 * var(--u)); }
.j-header__nav ul { display: flex; gap: calc(60 * var(--u)); list-style: none; }
.j-header__nav a {
  position: relative; display: block;
  font-size: calc(20 * var(--u)); line-height: 1; white-space: nowrap;
  color: var(--j-grey-nav); transition: color .2s ease;
}
.j-header__nav a:hover, .j-header__nav a[aria-current] { color: var(--j-black); }
.j-header__nav a[aria-current]::after {          /* point bleu de 9 px, 10 px sous le texte */
  content: ''; position: absolute; left: 50%; top: calc(100% + 10 * var(--u));
  width: calc(9.051 * var(--u)); height: calc(9.051 * var(--u));
  border-radius: 50%; background: var(--j-blue); transform: translateX(-50%);
}

.j-header__icons { flex: none; display: flex; align-items: center; gap: calc(29.93 * var(--u)); margin-left: auto; }
.j-header__icon { position: relative; display: block; color: var(--j-black); }
.j-header__icon .j-icon { display: block; }
.j-icon--account { width: calc(29.07 * var(--u)); height: calc(38.15 * var(--u)); }
.j-icon--bag { width: calc(31 * var(--u)); height: calc(36 * var(--u)); }
.j-header__badge {
  position: absolute; left: calc(15.46 * var(--u)); top: calc(-11.01 * var(--u));
  display: grid; place-items: center;
  width: calc(28.53 * var(--u)); height: calc(28.53 * var(--u));
  border-radius: 50%; background: var(--j-alert); color: var(--j-white);
  font-weight: 700; font-size: calc(20 * var(--u)); line-height: 1;
}

.j-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Recherche instantanée */
.j-header__search-wrap { position: relative; flex: none; margin-left: calc(94.83 * var(--u)); }
.j-header__search-wrap .j-header__search { margin-left: 0; }
.j-psearch {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 900; width: max(420px, calc(620 * var(--u)));
  padding: 14px; border-radius: 28px; background: var(--j-white); box-shadow: 0 24px 60px rgba(14, 49, 62, .16);
  font-family: var(--j-font);
}
.j-psearch[hidden] { display: none; }
.j-psearch ul { list-style: none; margin: 0; padding: 0; }
.j-psearch__head { margin: 10px 10px 8px; font-weight: 700; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--j-blue); }
.j-psearch__head:first-child { margin-top: 4px; }
.j-psearch__products a { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 18px; color: var(--j-ink); outline: none; }
.j-psearch a:hover, .j-psearch a:focus-visible { background: var(--j-grey-bg); }
.j-psearch__thumb { position: relative; width: 52px; height: 52px; border-radius: 14px; background: var(--j-grey-bg); overflow: hidden; }
.j-psearch__thumb img { position: absolute; left: -30%; top: -25%; width: 160%; max-width: none; height: auto; }
.j-psearch__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.j-psearch__txt strong { font-weight: 600; font-size: 16px; line-height: 1.15; }
.j-psearch__txt span { font-size: 13px; color: var(--j-grey-text); }
.j-psearch__price { font-weight: 600; font-size: 15px; white-space: nowrap; }
.j-psearch__links a { display: block; padding: 10px; border-radius: 14px; font-size: 15px; line-height: 1.25; color: var(--j-ink); outline: none; }
.j-psearch__empty { margin: 10px; font-size: 15px; color: var(--j-grey-nav); }
.j-psearch__all { display: block; margin-top: 8px; padding: 14px 10px 6px; border-top: 1px solid #ececec; border-radius: 0 0 14px 14px; font-weight: 600; font-size: 14px; color: var(--j-blue) !important; }

/* Espace client (composant Shopify) */
.j-header__account { display: flex; align-items: center; justify-content: center; color: var(--j-black); cursor: pointer;
  --shopify-account-font-heading: var(--j-font); --shopify-account-font-heading-weight: 600;
  --shopify-account-font-body: var(--j-font); --shopify-account-font-body-weight: 400;
  --shopify-account-radius-base: 28px; --shopify-account-radius-button: 55px; --shopify-account-radius-button-small: 55px; --shopify-account-radius-input: 18px;
  --shopify-account-color-background: #fff; --shopify-account-color-text: #0e313e;
  --shopify-account-color-accent: #0e313e; --shopify-account-color-accent-text: #fff;
  --shopify-account-dialog-position-top: calc(150 * var(--u));
}
.j-header__account-icon { display: block; }
.j-header__mobile { display: none; padding: 0; border: 0; background: none; cursor: pointer; color: var(--j-black); }
.j-header__mobile .j-icon { display: block; width: 22px; height: 22px; }

/* Menu mobile */
.j-mnav { position: fixed; inset: 0; z-index: 950; background: rgba(14, 49, 62, .35); opacity: 0; transition: opacity .25s ease; }
.j-mnav.is-open { opacity: 1; }
.j-mnav__panel { position: absolute; inset: 0 0 auto 0; max-height: 100dvh; overflow-y: auto; padding: 18px 20px 28px; border-radius: 0 0 28px 28px; background: var(--j-white); transform: translateY(-20px); transition: transform .25s ease; }
.j-mnav.is-open .j-mnav__panel { transform: none; }
.j-mnav__top { display: flex; align-items: center; justify-content: space-between; }
.j-mnav__logo img { display: block; width: 104px; height: auto; }
.j-mnav__close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--j-grey-bg); color: var(--j-ink); cursor: pointer; }
.j-mnav__search { display: flex; align-items: center; gap: 12px; height: 52px; margin-top: 18px; padding: 0 18px; border-radius: 55px; background: var(--j-grey-bg); }
.j-mnav__search .j-icon { flex: none; width: 20px; height: 20px; }
.j-mnav__search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-family: var(--j-font); font-size: 16px; color: var(--j-ink); }
.j-psearch--inline { position: static; width: auto; margin-top: 10px; padding: 4px 0 0; box-shadow: none; border-radius: 0; }
.j-mnav.is-searching .j-mnav__links, .j-mnav.is-searching .j-mnav__extra { display: none; }
.j-mnav__links { display: grid; margin-top: 14px; }
.j-mnav__links a { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px; border-bottom: 1px solid #ececec; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--j-ink); }
.j-mnav__links a span { color: var(--j-blue); font-weight: 400; }
.j-mnav__extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 24px; }
.j-mnav__extra .j-btn { width: 100%; height: 52px; font-size: 17px; }
.j-mnav__small { font-size: 15px; color: var(--j-grey-nav); text-decoration: underline; text-underline-offset: .2em; }

/* Écrans étroits : la maquette n'a pas de version mobile, adaptation sobre */
@media (max-width: 989px) {
  .j-header { height: 72px; margin-bottom: 8px; padding-inline: 20px; gap: 16px; }
  .j-header__logo { width: 104px; top: 0; }
  .j-header__search, .j-header__search-wrap, .j-header__nav { display: none; }
  .j-header__mobile { display: block; }
  .j-header__burger svg { display: block; }
  .j-header__icons { gap: 18px; }
  .j-icon--account { width: 22px; height: 29px; }
  .j-icon--bag { width: 24px; height: 28px; }
  .j-header__badge { width: 20px; height: 20px; font-size: 13px; left: 12px; top: -8px; }
}
