/* ==================================================================
   Recherche : barre de l'en-tete (champ + suggestions), page de resultats, menu ouvert sur l'accueil
   ================================================================== */

/* ---------- champ dans l'en-tete ---------- */
html body .tk-search { overflow: visible; position: relative; }
html body .tk-search__input {
  position: relative; width: 100%; height: 48px; margin: 0; padding: 0 12px 0 0; border: 0; border-radius: 0; background: transparent;
  color: inherit; font: inherit; line-height: 48px; outline: 0; box-shadow: none; -webkit-appearance: none; appearance: none;
}
html body .tk-search__input::placeholder { color: inherit; opacity: 0.85; }
html body .tk-search__input::-webkit-search-cancel-button, html body .tk-search__input::-webkit-search-decoration { -webkit-appearance: none; }
html body .tk-search:focus-within { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); }
@media (max-width: 999px) {
  html body .tk-search { display: block; }
  html body .tk-search__input { font-size: 14.4px; }
}
@media (min-width: 1000px) {
  html body .tk-search { display: flex; align-items: center; }
}

/* ---------- suggestions ---------- */
.tk-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 300; max-height: min(70vh, 560px); overflow: auto; padding: 16px;
  background: #fff; color: #111; border-radius: 8px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2); text-align: left;
  font: 400 0.9375rem/1.3 var(--tk-font);
}
.tk-suggest[hidden] { display: none; }
.tk-suggest__h { margin: 0 0 10px; font: 600 0.8125rem/1.2 var(--tk-font); letter-spacing: 0.02em; color: #111; }
.tk-suggest__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tk-suggest__chips a { padding: 0.55rem 0.85rem; border-radius: 6px; background: #f5f5f5; color: #111; font-size: 0.875rem; text-decoration: none; }
.tk-suggest__chips a:hover { background: #111; color: #fff; }
.tk-suggest__list { list-style: none; margin: 0 0 8px; padding: 0; }
.tk-suggest__list a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 6px; color: #111; text-decoration: none; }
.tk-suggest__list a:hover { background: #f5f5f5; }
.tk-suggest__list img, .tk-suggest__ph { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: #eee; }
.tk-suggest__t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.875rem; line-height: 1.3; }
.tk-suggest__p { font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.tk-suggest__all { display: block; margin-top: 6px; padding: 0.95rem; border-radius: 6px; background: #111; color: #fff !important; text-align: center; text-decoration: none; font-size: 0.875rem; }
.tk-suggest__none { margin: 0 0 14px; color: #555; }

/* ---------- page de resultats ---------- */
.tk-srch { max-width: 1240px; margin-inline: auto; padding: clamp(18px, 2.4vw, 34px) 20px clamp(40px, 6vw, 80px); font-family: var(--tk-font); }
.tk-srch__head { text-align: center; }
.tk-srch .v2-crumbs { justify-content: flex-start; }
.tk-srch__title { margin: clamp(18px, 2.6vw, 34px) 0 0; }
.tk-srch__count { margin: 0.6rem 0 0; font-size: 0.9375rem; color: #555; }
.tk-srch__form { position: relative; display: flex; align-items: center; max-width: 640px; margin: 1.6rem auto 2.2rem; padding: 0 0 0 44px; border-radius: 8px; background: #f5f5f5; }
.tk-srch__form svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: #666; }
.tk-srch__form input[type="search"] { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; font: 400 0.9375rem var(--tk-font); color: #111; outline: 0; -webkit-appearance: none; appearance: none; }
.tk-srch__go { height: 48px; padding: 0 1.4rem; border: 0; border-radius: 0 8px 8px 0; background: #111; color: #fff; font: 500 0.875rem var(--tk-font); cursor: pointer; }
.tk-srch__grid { margin-top: 0.5rem; }
.tk-srch__none { text-align: center; padding: 1rem 0 2rem; }
.tk-srch__msg { margin: 0 auto 1.6rem; max-width: 34rem; font-size: 1rem; line-height: 1.5; color: #333; }
.tk-srch__sub { margin: 0 0 1rem; font: 500 1rem var(--tk-font); }
.tk-srch__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 760px; margin-inline: auto; }
.tk-srch__chips a { padding: 0.9rem 1rem; border-radius: 6px; background: #f5f5f5; color: #111; font-size: 1rem; text-decoration: none; }
.tk-srch__chips a:hover { background: #111; color: #fff; }
html body:has(.tk-srch) { background: #fff; }

/* ---------- accueil : barre de recherche plus claire ; menu ouvert = en-tete blanc ---------- */
html body .mbtb-hdr--home .mbtb-hdr__tool--search { background: rgba(255, 255, 255, 0.24); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__bar { background: #fff; color: #000; box-shadow: 0 1px 0 #ececec; }
html body.mbtb-locked .mbtb-hdr--home, html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__link, html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__tool,
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__burger, html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__tools > .mbtb-hdr__tool:last-child::after { color: #000; }
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__logo img { filter: none; }
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__tool--search { background: #f5f5f5; color: #828282; -webkit-backdrop-filter: none; backdrop-filter: none; }
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__burger .mbtb-hdr__burger-icon span { background: #000; }
html body.mbtb-locked .mbtb-hdr--home .mbtb-hdr__count { background: #111; color: #fff; }
html.tk-scrolled body .mbtb-hdr--home .mbtb-hdr__tool--search { background: #f5f5f5; }
.tk-suggest__all { position: sticky; bottom: 0; }

/* accueil, ordinateur : en survolant le menu ou en ecrivant dans la recherche, l'en-tete passe en blanc */
@media (min-width: 1000px) {
  html body .mbtb-hdr--home:hover .mbtb-hdr__bar, html body .mbtb-hdr--home:focus-within .mbtb-hdr__bar { background: #fff; color: #000; box-shadow: 0 1px 0 #ececec; }
  html body .mbtb-hdr--home:hover, html body .mbtb-hdr--home:hover .mbtb-hdr__link, html body .mbtb-hdr--home:hover .mbtb-hdr__tool,
  html body .mbtb-hdr--home:focus-within, html body .mbtb-hdr--home:focus-within .mbtb-hdr__link, html body .mbtb-hdr--home:focus-within .mbtb-hdr__tool,
  html body .mbtb-hdr--home:hover .mbtb-hdr__tools > .mbtb-hdr__tool:last-child::after, html body .mbtb-hdr--home:focus-within .mbtb-hdr__tools > .mbtb-hdr__tool:last-child::after { color: #000; }
  html body .mbtb-hdr--home:hover .mbtb-hdr__logo img, html body .mbtb-hdr--home:focus-within .mbtb-hdr__logo img { filter: none; }
  html body .mbtb-hdr--home:hover .mbtb-hdr__tool--search, html body .mbtb-hdr--home:focus-within .mbtb-hdr__tool--search { background: #f5f5f5; color: #828282; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html body .mbtb-hdr--home:hover .mbtb-hdr__count, html body .mbtb-hdr--home:focus-within .mbtb-hdr__count { background: #111; color: #fff; }
}
