/* Petites annonces (maquettes 6a desktop, 6e mobile) */

.wpn-top { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.wpn-head { display: flex; align-items: flex-end; gap: 24px; }
.wpn-head__copy { flex: 1; min-width: 0; }
.wpn-h1 { font-size: 44px; font-weight: 900; letter-spacing: -.03em; line-height: 1; margin-top: 4px; text-wrap: balance; }
.wpn-lead { margin-top: 8px; font-size: 16px; color: var(--wp-ink-2); }
.wpn-head__cta { flex-shrink: 0; }

.wpn-search { display: flex; gap: 8px; background: var(--wp-paper); border-radius: var(--wp-r-lg); padding: 8px; }
.wpn-search__q { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; position: relative; }
.wpn-search__q > .lw-icon { font-size: 20px; color: var(--wp-faint); }
.wpn-search__q input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 16px/1.3 var(--wp-sans); color: var(--wp-ink); padding: 12px 0; outline: none; }
.wpn-search__q input::placeholder { color: var(--wp-faint); }
.wpn-search__sel {
  border: 0; border-left: 1px solid var(--wp-line); background: transparent; font: 400 15px/1.3 var(--wp-sans); color: var(--wp-ink);
  padding: 12px 34px 12px 16px; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 210px;
  background-image: linear-gradient(45deg, transparent 50%, var(--wp-ink) 50%), linear-gradient(135deg, var(--wp-ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.wpn-search__sel:focus-visible { outline: 2px solid var(--wp-acc); outline-offset: -2px; border-radius: 8px; }
.wpn-search__go { border: 0; border-radius: 10px; background: var(--wp-dark); color: var(--wp-paper); font: 800 15px/1 var(--wp-sans); padding: 12px 22px; cursor: pointer; }
.wpn-search__go:hover { background: var(--wp-ink); }

.wpn-suggest {
  position: absolute; z-index: 40; top: calc(100% + 12px); left: 0; right: 0; min-width: 300px; list-style: none; margin: 0;
  background: var(--wp-paper); border: 1px solid var(--wp-line); border-radius: var(--wp-r-lg); box-shadow: var(--wp-shadow-pop);
  padding: 6px; max-height: 360px; overflow-y: auto;
}
.wpn-suggest[hidden] { display: none; }
.wpn-suggest__i {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; font: 400 14px/1.3 var(--wp-sans); color: var(--wp-ink); cursor: pointer;
}
.wpn-suggest__i:hover, .wpn-suggest__i.is-on { background: var(--wp-sand); }
.wpn-suggest__i small { font: 400 11px/1.2 var(--wp-mono); color: var(--wp-muted); flex-shrink: 0; }
.wpn-suggest mark { background: transparent; color: var(--wp-acc-2); font-weight: 700; }

.wpn-types .wp-chip { font-size: 13px; padding: 7px 12px; white-space: nowrap; }
.wpn-types .wp-chip span { font: 400 11px/1 var(--wp-mono); opacity: .6; }

.wpn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-top: 22px; padding-bottom: 40px; }
.wpn-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.wpn-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wpn-card { background: var(--wp-paper); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 20px; }
.wpn-card__media { position: relative; height: 160px; background: var(--wp-sand-2); }
.wpn-card__media > a { display: block; height: 100%; }
.wpn-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpn-card__ph { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--wp-faint); }
.wpn-card__ph .lw-icon { font-size: 40px; }
.wpn-tag {
  position: absolute; left: 8px; top: 8px; background: var(--wp-dark); color: var(--wp-paper); border-radius: 4px; padding: 4px 8px;
  font: 500 10px/1.2 var(--wp-mono); text-transform: uppercase; letter-spacing: .04em;
}
.wpn-tag--vends { background: #1B1A17; }
.wpn-tag--donne { background: #2E7D3A; }
.wpn-tag--prete { background: #2F5C8A; }
.wpn-tag--cherche { background: #7A3B2A; }
.wpn-tag--urgent { top: auto; bottom: 8px; background: var(--wp-danger); }
.wpn-card__media form { display: contents; }
.wpn-heart {
  position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--wp-paper); color: var(--wp-ink);
  display: flex; align-items: center; justify-content: center; font: 400 15px/1 var(--wp-sans); cursor: pointer; padding: 0;
}
.wpn-heart:hover, .wpn-heart.is-on { color: var(--wp-acc-2); }
.wpn-card__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wpn-card__t { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.wpn-card__t a::after { content: ''; position: absolute; inset: 0; }
.wpn-card { position: relative; }
.wpn-card__media > a, .wpn-heart, .wpn-tag { z-index: 1; }
.wpn-card__x { font-size: 13px; line-height: 1.4; color: var(--wp-muted); }
.wpn-card__ft { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.wpn-card__p { font-size: 20px; font-weight: 900; color: var(--wp-acc-2); white-space: nowrap; }
.wpn-card__m { font-size: 12px; color: var(--wp-faint); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wpn-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wpn-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wpn-pager .wp-pager { margin-top: 0; }
.wpn-pager .wp-pager a, .wpn-pager .wp-pager span { border-radius: 8px; }

.wpn-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wpn-side__h { font-size: 16px; font-weight: 800; }
.wpn-side__p { font-size: 13px; line-height: 1.5; color: var(--wp-ink-2); }
.wpn-side__a { font-size: 13px; font-weight: 700; }
.wpn-rubs { gap: 8px; }
.wpn-rubs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.wpn-rubs__list a { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; border-bottom: 1px solid var(--wp-line); padding-bottom: 7px; }
.wpn-rubs__n { font: 400 12px/1.4 var(--wp-mono); color: var(--wp-muted); }

.wpn-alert { gap: 8px; scroll-margin-top: 20px; }
.wpn-alert__h { font-size: 18px; font-weight: 900; line-height: 1.15; color: var(--wp-on-dark); }
.wpn-alert__p { font-size: 13px; line-height: 1.45; color: var(--wp-on-dark-2); }
.wpn-alert__form { display: flex; flex-direction: column; gap: 8px; }
.wpn-alert__in {
  width: 100%; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--wp-on-dark); font: 400 14px/1.3 var(--wp-sans);
  padding: 10px 12px; appearance: none; -webkit-appearance: none;
}
.wpn-alert__in::placeholder { color: var(--wp-on-dark-2); }
.wpn-alert__in:focus-visible { outline: 2px solid var(--wp-acc); outline-offset: 0; }
select.wpn-alert__in { cursor: pointer; }
select.wpn-alert__in option { color: var(--wp-ink); background: var(--wp-paper); }
.wpn-alert__mine { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 4px; }
.wpn-alert__mine li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--wp-on-dark-2); }
.wpn-alert__mine form { display: contents; }
.wpn-alert__mine button { border: 0; background: transparent; color: var(--wp-on-dark-2); font: 400 18px/1 var(--wp-sans); cursor: pointer; padding: 2px 6px; }
.wpn-alert__mine button:hover { color: var(--wp-acc); }

.wpn-communes { background: var(--wp-paper); padding: 24px 0; }
.wpn-communes__in { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-size: 14px; }
.wpn-communes__h { font-size: 16px; font-weight: 800; }
.wpn-communes__all { font-weight: 700; }

/* Rubriques (animaux, emploi, garde d’enfants…) : même grille que les petites annonces */
.wpn-tag--perdu { background: var(--wp-danger); }
.wpn-tag--trouve { background: #2E7D3A; }
.wpn-tag--adopter, .wpn-tag--propose { background: #2F5C8A; }
.wpr-head__copy { flex: 1; min-width: 0; }
.wpr-doors { display: grid; gap: 12px; }
.wpr-doors--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wpr-doors--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wpr-doors .wpx-door { padding: 18px; gap: 6px; }
.wpr-doors .wpx-door__t { font-size: 20px; }
.wpr-card__cta { font-size: 13px; font-weight: 700; color: var(--wp-acc-2); white-space: nowrap; }

@media (max-width: 1180px) {
  .wpn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .wpn-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .wpn-grid { grid-template-columns: minmax(0, 1fr); }
  .wpn-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .wpn-search { flex-wrap: wrap; }
  .wpn-search__q { flex: 1 1 100%; }
}

/* ---------- Mobile (maquette 6e) ---------- */
@media (max-width: 760px) {
  .wpn-top { padding-top: 10px; gap: 10px; }
  .wpn-head { display: block; }
  .wpn-head__copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .wpn-head__cta { display: none; }

  .wpn-search { background: transparent; padding: 0; gap: 6px; }
  .wpn-search__q { background: var(--wp-paper); border: 2px solid var(--wp-ink); border-radius: 12px; padding: 0 12px; }
  .wpn-search__q input { font-size: 14px; padding: 10px 0; }
  .wpn-search__sel { flex: 1 1 0; min-width: 0; border: 1px solid var(--wp-line-2); border-radius: 999px; background-color: var(--wp-paper); font-size: 12px; padding: 7px 24px 7px 10px; background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; }
  .wpn-search__go { display: none; }
  .wpn-suggest { min-width: 0; left: -2px; right: -2px; top: calc(100% + 6px); }

  .wpn-types { margin: 0 calc(var(--wp-gut) * -1); padding: 0 var(--wp-gut); }
  .wpn-types::-webkit-scrollbar { display: none; }
  .wpn-types .wp-chip { font-size: 12px; padding: 6px 10px; }
  .wpn-types .wp-chip span { display: none; }

  .wpn-grid { padding-top: 6px; gap: 20px; padding-bottom: 28px; }
  .wpn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wpn-card__media { height: 110px; }
  .wpn-tag { left: 6px; top: 6px; font-size: 9px; padding: 3px 6px; }
  .wpn-tag--urgent { top: auto; bottom: 6px; }
  .wpn-heart { width: 26px; height: 26px; right: 6px; top: 6px; font-size: 13px; }
  .wpn-card__body { padding: 8px 10px; gap: 4px; }
  .wpn-card__t { font-size: 13px; line-height: 1.2; height: 31px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .wpn-card__x { display: none; }
  .wpn-card__ft { padding-top: 0; }
  .wpn-card__p { font-size: 14px; }
  .wpn-card__m { font-size: 10px; }
  .wpn-card__w { display: none; }
  .wpn-pager { justify-content: center; }
  .wpn-pager > .wp-small { display: none; }

  .wpn-side { display: flex; }
  .wpr-head .wpn-h1 { font-size: 28px; }
  .wpr-head .wpn-lead { font-size: 14px; }
  .wpr-head .wpn-head__cta { display: inline-flex; margin-top: 10px; }
  .wpr-doors { gap: 8px; }
  .wpr-doors--2, .wpr-doors--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wpr-doors .wpx-door { padding: 12px; border-radius: 12px; }
  .wpr-doors .wpx-door__t { font-size: 14px; }
  .wpr-doors .wpx-door__p { display: none; }
  .wpr-doors--3 .wpx-door:first-child { grid-column: 1 / -1; }
  .wpr-card__cta { font-size: 11px; }

  .wpn-communes { padding: 18px 0; }
  .wpn-communes__in { gap: 8px 16px; font-size: 13px; }
  .wpn-communes__h { flex: 1 1 100%; font-size: 15px; }
}
