/**
 * Barre fixe au scroll : une ligne logo · nav · loupe (burger = mobile seulement).
 */

body.menu-open .cursor.js-cursor,
body.site-header-nav-hover .cursor.js-cursor {
  opacity: 0 !important;
  visibility: hidden !important;
  mix-blend-mode: normal !important;
}

.site-header__container {
  width: 100%;
  max-width: 100%;
}

.site-header__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
  min-height: 0;
}

.site-header__logo-col {
  flex: 0 0 auto;
  min-width: 0;
}

.site-header-chrome {
  flex: 1 1 auto;
  min-width: 0;
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.5vw, 18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}

.site-header.scrolled.awake .site-header-chrome {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.site-header-nav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.65vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header-nav__list a {
  display: inline-block;
  padding: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(12px, 0.78vw, 13px);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #868a9b;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.site-header-nav__list a:hover,
.site-header-nav__list a:focus-visible {
  color: #18191d;
  outline: none;
}

.site-header-nav__list a.is-active {
  color: #18191d;
  font-weight: 500;
}

.site-header-search__trigger {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #868a9b;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.site-header-search__trigger:hover,
.site-header-search__trigger:focus-visible {
  color: #18191d;
  background: rgba(24, 25, 29, 0.06);
  outline: none;
}

.site-header-search__icon {
  display: block;
}

/* Barre scrollée : logo + outils alignés sur une ligne */
.site-header.scrolled .site-header__container {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.site-header.scrolled .site-header__row {
  align-items: center;
  width: 100%;
  min-height: 80px;
}

.site-header.scrolled.awake .site-header__logo-col {
  display: flex;
  align-items: center;
  align-self: stretch;
}

.site-header.scrolled.awake .logo-wrap {
  display: flex;
  align-items: center;
  align-self: stretch;
  height: 100%;
}

.site-header.scrolled.awake .logo-wrap > a,
.site-header.scrolled.awake .logo {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Même rattrapage optique que style.css (SVG), adapté à la taille réduite */
.site-header.scrolled.awake .logo-wrap .logo img {
  width: clamp(108px, 11vw, 132px) !important;
  max-width: 132px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center center;
  -webkit-transform: translateY(-12px);
  transform: translateY(-12px);
}

/* Burger : tablette/desktop selon règles scroll ; jamais en portable */
.site-menu-burger-wrap {
  flex: 0 0 auto;
  display: none !important;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .site-menu-burger-wrap,
  .site-header.scrolled .site-menu-burger-wrap,
  .site-header .site-nav-toggle,
  .site-header.scrolled .site-nav-toggle {
    display: none !important;
  }

  .site-header-chrome,
  .site-header.scrolled .site-header-chrome,
  .site-header.scrolled.awake .site-header-chrome {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (min-width: 768px) {
  .site-menu-burger-wrap,
  .site-header .site-nav-toggle {
    display: none !important;
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  .site-header-nav__list {
    gap: clamp(10px, 1.2vw, 14px);
  }

  .site-header-nav__list a {
    font-size: 12px;
  }
}

/* ===== Recherche (panneau) ===== */
.site-search {
  position: fixed;
  inset: 0;
  z-index: 19980;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(88px, calc(env(safe-area-inset-top, 0px) + 72px)) 16px 24px;
  pointer-events: none;
  visibility: hidden;
}

.site-search:not([hidden]) {
  visibility: visible;
}

.site-search.is-open {
  pointer-events: auto;
}

.site-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 25, 29, 0.38);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-backdrop-filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-search.is-open .site-search__backdrop {
  opacity: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-search__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 3vw, 26px);
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 28px 80px rgba(24, 25, 29, 0.22),
    0 0 0 1px rgba(24, 25, 29, 0.06);
  outline: none;
  transform-origin: var(--site-search-origin-x, 50%) var(--site-search-origin-y, 88px);
  opacity: 0;
  transform: translate3d(0, -14px, 0) scale(0.94);
  filter: blur(6px);
  transition:
    opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.58s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.58s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

.site-search.is-open .site-search__panel {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  box-shadow:
    0 32px 88px rgba(24, 25, 29, 0.24),
    0 0 0 1px rgba(24, 25, 29, 0.05);
}

.site-search.is-open .site-search__eyebrow,
.site-search.is-open .site-search__field,
.site-search.is-open .site-search__hint,
.site-search.is-open .site-search__status,
.site-search.is-open .site-search__results,
.site-search.is-open .site-search__empty {
  animation: site-search-reveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.site-search.is-open .site-search__field {
  animation-delay: 0.06s;
}

.site-search.is-open .site-search__hint {
  animation-delay: 0.11s;
}

.site-search.is-open .site-search__status {
  animation-delay: 0.13s;
}

.site-search.is-open .site-search__results {
  animation-delay: 0.15s;
}

@keyframes site-search-reveal {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-search__backdrop,
  .site-search__panel {
    transition: none !important;
  }

  .site-search.is-open .site-search__eyebrow,
  .site-search.is-open .site-search__field,
  .site-search.is-open .site-search__hint,
  .site-search.is-open .site-search__status,
  .site-search.is-open .site-search__results,
  .site-search.is-open .site-search__empty {
    animation: none !important;
  }

  .site-search.is-open .site-search__panel {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .site-search.is-open .site-search__backdrop {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

.site-search__eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(24, 25, 29, 0.45);
}

.site-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid rgba(24, 25, 29, 0.12);
  border-radius: 999px;
  background: rgba(24, 25, 29, 0.03);
}

.site-search__loupe {
  flex-shrink: 0;
  display: flex;
  color: rgba(24, 25, 29, 0.5);
}

.site-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #18191d;
  outline: none;
}

.site-search__input::placeholder {
  color: rgba(24, 25, 29, 0.38);
}

.site-search__hint,
.site-search__status,
.site-search__empty {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(24, 25, 29, 0.52);
}

.site-search__results {
  flex: 1;
  min-height: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-search__results li {
  margin: 0;
  padding: 0;
}

.site-search__results a {
  display: block;
  padding: 11px 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.18s ease;
}

.site-search__results a:hover,
.site-search__results a:focus-visible,
.site-search__results a.is-active {
  background: rgba(24, 25, 29, 0.06);
  outline: none;
}

.site-search__result-kind {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(24, 25, 29, 0.42);
  margin-bottom: 2px;
}

.site-search__result-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #18191d;
  line-height: 1.35;
}

.site-search__result-title mark {
  background: rgba(255, 214, 120, 0.45);
  color: inherit;
  padding: 0 0.05em;
  border-radius: 2px;
}

.site-search__result-excerpt {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(24, 25, 29, 0.58);
}

html.site-dark .site-header-nav__list a {
  color: rgba(242, 243, 246, 0.55);
}

html.site-dark .site-header-nav__list a:hover,
html.site-dark .site-header-nav__list a:focus-visible,
html.site-dark .site-header-nav__list a.is-active {
  color: var(--dm-text, #f2f3f6);
  font-weight: 500;
}

html.site-dark .site-header-search__trigger {
  color: rgba(242, 243, 246, 0.55);
}

html.site-dark .site-header-search__trigger:hover,
html.site-dark .site-header-search__trigger:focus-visible {
  color: var(--dm-text, #f2f3f6);
  background: rgba(242, 243, 246, 0.08);
}

html.site-dark .site-search__panel {
  background: var(--dm-surface, #1a1b20);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

html.site-dark .site-search__field {
  border-color: rgba(242, 243, 246, 0.12);
  background: rgba(242, 243, 246, 0.04);
}

html.site-dark .site-search__input {
  color: var(--dm-text, #f2f3f6);
}

html.site-dark .site-search__result-title {
  color: var(--dm-text, #f2f3f6);
}

html.site-dark .site-search__results a:hover,
html.site-dark .site-search__results a.is-active {
  background: rgba(242, 243, 246, 0.08);
}
