/* v4 · Recherche globale (maquette 11a) */
.wps { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; padding-bottom: 56px; }
.wps-title { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.025em; line-height: 1.1; }

.wps-bar { display: flex; align-items: stretch; gap: 8px; background: var(--wp-paper); border: 2px solid var(--wp-ink); border-radius: 14px; padding: 6px; }
.wps-bar__field { flex: 1; min-width: 0; display: flex; align-items: center; position: relative; }
.wps-bar__q { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 40px 12px 14px; font: 600 20px/1.2 var(--wp-sans); color: var(--wp-ink); outline: none; }
.wps-bar__q::placeholder { color: var(--wp-faint); font-weight: 500; }
.wps-bar__q::-webkit-search-cancel-button { display: none; }
.wps-bar__clear { position: absolute; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 999px; background: var(--wp-sand); color: var(--wp-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wps-bar__clear .lw-icon { font-size: 17px; }
.wps-bar__commune { border: 0; border-left: 1px solid var(--wp-line); background: transparent; padding: 12px 34px 12px 16px; font: 500 15px/1.2 var(--wp-sans); color: var(--wp-ink); max-width: 230px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.wps-bar__go { border: 0; background: var(--wp-acc); color: var(--wp-ink); font: 800 15px/1 var(--wp-sans); padding: 12px 22px; border-radius: 10px; cursor: pointer; }
.wps-bar__go:hover { background: var(--wp-acc-2); color: var(--wp-paper); }
body.wp .wps-bar :focus-visible { outline: none; }
.wps-bar:focus-within { outline: 3px solid var(--wp-acc); outline-offset: 3px; box-shadow: none; }

.wps-scopes .wp-chip { font-size: 13px; font-weight: 600; padding: 7px 12px; background: transparent; cursor: pointer; }
.wps-scopes .wp-chip.is-on { background: var(--wp-dark); }
.wps-scopes .wp-chip.is-dim { opacity: .45; }
.wps-scopes .wp-chip__n:empty { display: none; }

.wps-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.wps-main, .wps-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wps-results, .wps-idle { display: flex; flex-direction: column; gap: 14px; }
.wps-results[hidden], .wps-idle[hidden], .wps-empty[hidden], .wps-recents[hidden], .wps-share[hidden], .wps-status[hidden], .wps-loading[hidden], .wp-pager[hidden] { display: none; }

.wps-status { margin: 0; font-size: 14px; color: var(--wp-muted); }
.wps-status b { color: var(--wp-ink); }
.wps-loading { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--wp-muted); }
.wps-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--wp-line-2); border-top-color: var(--wp-acc); animation: wps-spin .7s linear infinite; }
@keyframes wps-spin { to { transform: rotate(360deg); } }
.wps.is-loading .wps-results { opacity: .55; transition: opacity .15s; }

.wps-card { background: var(--wp-paper); border-radius: 14px; overflow: hidden; }
.wps-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--wp-line); font: 500 11px/1.3 var(--wp-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wp-muted); }
.wps-card__head a, .wps-link { color: var(--wp-ink); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.wps-card__head a:hover, .wps-link:hover { color: var(--wp-acc-2); }
.wps-card__pad { padding: 14px 16px; }

.wps-hit { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--wp-line); color: var(--wp-ink); text-decoration: none; outline: none; }
.wps-group .wps-hit:last-child { border-bottom: 0; }
.wps-hit:hover, .wps-hit.is-active, .wps-hit:focus-visible { background: var(--wp-bg); color: var(--wp-ink); }
.wps-hit__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wps-hit__t { font-size: 16px; font-weight: 700; line-height: 1.3; }
.wps-hit__m { font-size: 13px; color: var(--wp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wps-hit__flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.wps-hit__flags span { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--wp-sand); }
.wps-hit__side { flex: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wps-hit__side.is-open { color: var(--wp-ok, #2E7D3A); }
.wps-hit__side.is-closed { color: var(--wp-faint); }
.wps-hit__side.is-badge { font: 500 10px/1 var(--wp-mono); letter-spacing: .06em; color: var(--wp-muted); }
.wps mark { background: #FCE6CC; color: inherit; padding: 0 1px; border-radius: 2px; }
.wps-mark { display: inline-flex; vertical-align: -2px; color: var(--wp-acc-2); }
.wps-mark .lw-icon { font-size: 16px; }
.wps-pill { display: inline-block; vertical-align: 2px; margin-left: 4px; font: 500 10px/1 var(--wp-mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--wp-dark); color: var(--wp-paper); }
.wps-pill.is-acc { background: var(--wp-acc); color: var(--wp-ink); }

.wps-top { display: flex; align-items: center; gap: 16px; background: var(--wp-dark); color: var(--wp-on-dark, #F4F0E8); border-radius: 14px; padding: 16px 18px; }
.wps-top__logo { flex: none; width: 52px; height: 52px; border-radius: 12px; background: #8C5A3C; color: var(--wp-paper); display: flex; align-items: center; justify-content: center; font-weight: 900; overflow: hidden; }
.wps-top__logo img { width: 100%; height: 100%; object-fit: cover; }
.wps-top__logo.has-img { background: var(--wp-paper); }
.wps-top__logo.has-img span { display: none; }
.wps-top__body.wps-hit { flex: 1; padding: 0; border: 0; color: inherit; background: transparent; gap: 2px; flex-direction: column; align-items: flex-start; justify-content: center; }
.wps-top__body.wps-hit:hover, .wps-top__body.wps-hit.is-active { background: transparent; color: inherit; }
.wps-top__body.wps-hit:hover .wps-top__t, .wps-top__body.is-active .wps-top__t { text-decoration: underline; text-underline-offset: 3px; }
.wps-top__kick { font: 500 10px/1.2 var(--wp-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--wp-acc); }
.wps-top__t { font-size: 19px; font-weight: 800; line-height: 1.2; }
.wps-top__m { font-size: 13px; color: #BDB6A6; }
.wps-top__call { flex: none; display: inline-flex; align-items: center; gap: 6px; background: var(--wp-acc); color: var(--wp-ink); font-size: 13px; font-weight: 800; padding: 9px 14px; border-radius: 999px; text-decoration: none; }
.wps-top__call:hover { background: var(--wp-paper); color: var(--wp-ink); }
.wps-top__call .lw-icon { font-size: 16px; }

.wps-intents { display: flex; flex-direction: column; }
.wps-intent { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--wp-line); background: none; width: 100%; text-align: left; color: var(--wp-ink); font: inherit; cursor: pointer; text-decoration: none; }
.wps-intent:last-child { border-bottom: 0; }
.wps-intent:hover { background: var(--wp-bg); color: var(--wp-ink); }
.wps-intent > .lw-icon:first-child { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--wp-sand); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.wps-intent > span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.wps-intent strong { font-size: 15px; font-weight: 700; }
.wps-intent em { font-style: normal; font-size: 13px; color: var(--wp-muted); }
.wps-intent > .lw-icon:last-child { color: var(--wp-faint); }
.wps-recents .wp-chip .lw-icon { font-size: 15px; color: var(--wp-muted); margin-right: 2px; }

.wps-empty { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.wps-empty p { margin: 0; font-size: 15px; color: var(--wp-ink-2, #4A473F); }
.wps-empty__act { display: flex; flex-wrap: wrap; gap: 8px; }
.wps-empty__hint { font-size: 14px !important; color: var(--wp-muted) !important; }
.wps-empty__hint:empty { display: none; }
.wps-empty__hint a { text-decoration: underline; text-underline-offset: 3px; }

.wps-side { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wps-side__t { margin: 0; font-size: 15px; font-weight: 800; }
.wps-side__p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--wp-ink-2, #4A473F); }
.wps-side .wp-btn { margin-top: 2px; }
.wps-share { padding: 2px 2px 0; }

@media (max-width: 960px) {
  .wps-grid { grid-template-columns: 1fr; }
  .wps-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .wps-share { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .wps { padding-top: 18px; gap: 12px; }
  .wps-title { font-size: 24px; }
  .wps-bar { flex-wrap: wrap; padding: 4px; gap: 4px; }
  .wps-bar__field { flex: 1 1 100%; }
  .wps-bar__q { font-size: 18px; padding: 11px 40px 11px 10px; }
  .wps-bar__commune { flex: 1; max-width: none; border-left: 0; border-top: 1px solid var(--wp-line); border-radius: 0; padding: 11px 30px 11px 10px; font-size: 14px; }
  .wps-bar__go { padding: 11px 18px; }
  .wps-scopes { margin: 0 calc(var(--wp-gut) * -1); padding: 0 var(--wp-gut); }
  .wps-top { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .wps-top__body.wps-hit { flex: 1 1 0; min-width: 0; }
  .wps-top__call { width: 100%; justify-content: center; }
  .wps-hit { padding: 11px 14px; gap: 10px; }
  .wps-hit__t { font-size: 15px; }
  .wps-hit__side { max-width: 42%; white-space: normal; text-align: right; }
  .wps-aside { display: flex; }
}
