/* Intégration au site — en-tête et barre d'onglets dans les pages existantes */
html,
body {
  background: var(--ff-bg);
}

.ff-header-host,
.ff-site-tabbar {
  --ff-font-size-xs: var(--ff-header-font-size-xs);
  --ff-font-size-s: var(--ff-header-font-size-s);
  --ff-font-size-m: var(--ff-header-font-size-m);
  --ff-font-size-l: var(--ff-header-font-size-l);
}

input.ff-field__control,
select.ff-field__control,
textarea.ff-field__control {
  font-size: max(16px, var(--ff-font-size-m));
}

@media (min-width: 621px) {
  input.ff-field__control,
  select.ff-field__control,
  textarea.ff-field__control {
    font-size: var(--ff-font-size-m);
  }
}

.ff-header-host {
  position: sticky;
  top: 0;
  z-index: 10000;
}

.ff-header--site {
  position: static;
  height: 60px;
  gap: var(--ff-space-6);
  padding: 0 var(--ff-space-8);
}

.ff-header--site .ff-header__emblem {
  width: 36px;
  height: 36px;
}

.ff-header--site .ff-header__name {
  font-size: var(--ff-font-size-l);
}

.ff-header--site .ff-header__tools {
  flex: 0 1 auto;
  min-width: 0;
}

.ff-header__search {
  width: 320px;
  height: 40px;
}

#search.ff-search__input,
#search.ff-search__input:focus {
  width: auto;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ff-text);
  line-height: normal;
}

.ff-header__account {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-color: transparent;
}

.ff-header__account > .fa-regular {
  font-size: 20px;
}

.ff-site-tabbar {
  display: none;
}

button.ff-tabbar__item {
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
}

@media (max-width: 1125px) {
  .ff-header--site {
    gap: var(--ff-space-4);
    padding: 0 var(--ff-space-4);
  }

  .ff-header--site .ff-header__start {
    gap: var(--ff-space-4);
  }

  .ff-header__search {
    width: 240px;
  }
}

@media (max-width: 870px) {
  .ff-header__nav {
    display: none;
  }

  .ff-header--site .ff-header__tools {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .ff-header__search {
    flex: 0 1 320px;
    width: auto;
  }

  .ff-site-tabbar {
    position: fixed;
    right: var(--ff-space-4);
    bottom: var(--ff-space-3);
    left: var(--ff-space-4);
    z-index: 9998;
    display: flex;
    width: auto;
  }

  body {
    padding-bottom: 88px;
  }
}

@media (max-width: 620px) {
  .ff-header--site {
    flex-wrap: wrap;
    align-content: flex-start;
    height: 95px;
    row-gap: 0;
    padding: 0 var(--ff-space-4) var(--ff-space-2);
  }

  .ff-header--site .ff-header__start {
    flex: 1 1 0;
    order: 1;
    height: 46px;
  }

  .ff-header--site .ff-header__tools {
    display: contents;
  }

  .ff-header--site .ff-header__emblem {
    width: 32px;
    height: 32px;
  }

  .ff-header--site .ff-header__name {
    font-size: var(--ff-font-size-m);
  }

  .ff-header__account {
    position: relative;
    order: 2;
    width: 32px;
    height: 32px;
  }

  .ff-header__account > .fa-regular {
    font-size: 14px;
  }

  /* Zone d'appui de 44 px malgré le bouton visuel de 32 px */
  .ff-header__account::after {
    position: absolute;
    top: -6px;
    right: -6px;
    bottom: -6px;
    left: -6px;
    content: "";
  }

  .ff-header__search {
    flex: 0 0 100%;
    order: 3;
    width: 100%;
  }
}
