/*
 * Ajouts WordPress validés (absents de la V4.1) — mêmes couleurs, polices et formes que la V4.1.
 * 1. Loupe de recherche dans l'en-tête (décision LJC du 10/10/2026).
 * 2. Page de résultats de recherche et archives (domaines, rubriques, projets).
 * 3. Liste « Tous les articles » de la page Journal (visible seulement à partir de 2 articles).
 */

/* 1. Loupe */
.search-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none;
}
.search-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); }
.site-search {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid #e8edf1; box-shadow: 0 12px 24px rgba(17, 47, 73, .08);
  padding: 18px 0;
}
.site-search[hidden] { display: none; }
.search-form { display: flex; gap: 10px; max-width: 760px; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 18px;
  border: 1px solid #c9d3db; border-radius: 999px; background: #fff;
  font: 400 16px/1.2 var(--sans); color: var(--ink);
}
.search-form input[type="search"]:focus { outline: 3px solid rgba(34, 115, 172, .35); outline-offset: 1px; border-color: var(--blue); }
@media (max-width: 600px) {
  .search-toggle { width: 44px; height: 44px; }
  .search-form .btn { padding: 11px 14px; }
}
@media (max-width: 360px) {
  .search-form { flex-direction: column; }
}

/* 2. Recherche et archives */
.listing .section-head h1 {
  font-family: var(--serif); font-weight: 600; font-size: 46px; line-height: 1.05; margin: 9px 0 14px; color: var(--blue);
}
.listing .section-head h1::after { content: ""; display: block; width: 76px; height: 5px; margin-top: 16px; border-radius: 3px;
  background: linear-gradient(90deg, var(--wp--preset--color--bleu) 0 25%, var(--wp--preset--color--orange-charte) 25% 50%, var(--wp--preset--color--jaune) 50% 75%, var(--wp--preset--color--vert) 75% 100%); }
.listing .search-form { margin: -12px 0 18px; }
.search-count { color: var(--muted); margin: 0 0 28px; }
.listing .journal-small-title { margin: 36px 0 18px; }
.listing .projects + .journal-small-title { margin-top: 48px; }
.ljc-resultats { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.ljc-resultats li { padding: 20px 0; border-top: 1px solid var(--line); }
.ljc-resultats li:last-child { border-bottom: 1px solid var(--line); }
.ljc-resultats .journal-cat { margin: 0 0 4px; }
.ljc-resultats h3 { margin: 0 0 6px; font-size: 21px; font-family: var(--serif); font-weight: 600; }
.ljc-resultats h3 a { color: var(--blue); text-decoration: none; }
.ljc-resultats h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ljc-resultats p { margin: 0; color: var(--text-2); }
.search-empty { font-size: 17px; }
.search-empty a { color: var(--blue); }
.listing .nav-links { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.listing .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.listing .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
@media (max-width: 600px) {
  .listing .section-head h1 { font-size: 36px; }
}

/* 3. Liste des autres articles (page Journal) */
.journal-list { margin-top: 56px; }
.journal-list .journal-small-title { margin-bottom: 20px; }
.journal-list .teaser-card + .teaser-card { margin-top: 24px; }

/* Petits téléphones (361–400 px) : la loupe tient dans l'en-tête sans débordement. */
@media (max-width: 400px) {
  .nav { gap: 8px; }
  .search-toggle { width: 38px; height: 38px; }
  .search-toggle svg { width: 18px; height: 18px; }
}
