/* Fiche annonce (maquette 6b) */

.wpl { padding-top: 28px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.wpl-preview { background: var(--wp-sand); border: 1px dashed var(--wp-line-2); border-radius: var(--wp-r); padding: 12px 16px; font-size: 14px; }
.wpl-preview a { font-weight: 700; margin-left: 6px; border-bottom: 1px solid currentColor; }
.wpl-crumbs > span:last-child { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.wpl-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wpl-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.wpl-gallery { display: grid; grid-template-columns: 3fr 1fr; grid-template-rows: 200px 200px; gap: 6px; }
.wpl-gallery.is-1 { grid-template-columns: 1fr; grid-template-rows: 400px; }
.wpl-gallery.is-2 { grid-template-columns: 2fr 1fr; grid-template-rows: 400px; }
.wpl-gallery__cell { position: relative; padding: 0; border: 0; background: var(--wp-sand-2); border-radius: 12px; overflow: hidden; cursor: zoom-in; min-height: 0; }
.wpl-gallery__cell:first-child { grid-row: span 2; }
.wpl-gallery.is-2 .wpl-gallery__cell:first-child { grid-row: auto; }
.wpl-gallery__cell.is-hidden { display: none; }
.wpl-gallery__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpl-gallery__more { position: absolute; inset: 0; background: rgba(27, 26, 23, .55); color: var(--wp-paper); display: flex; align-items: center; justify-content: center; font-weight: 800; }

.wpl-card { padding: 24px; gap: 12px; }
.wpl-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wpl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.wpl-tag { background: var(--wp-bg); color: var(--wp-ink); border-radius: 4px; padding: 4px 8px; font: 500 11px/1.2 var(--wp-mono); text-transform: uppercase; }
.wpl-tag--dark { background: var(--wp-ink); color: var(--wp-paper); }
.wpl-tag--alert { background: var(--wp-danger); color: #fff; }
.wpl-meta { font-size: 13px; color: var(--wp-muted); }
.wpl-titlerow { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.wpl-h1 { font-size: 38px; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; overflow-wrap: anywhere; text-wrap: balance; }
.wpl-price { font-size: 34px; font-weight: 900; color: var(--wp-acc-2); white-space: nowrap; }
.wpl-body { display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.6; color: var(--wp-ink-2); overflow-wrap: anywhere; }
.wpl-note { display: flex; gap: 10px; align-items: flex-start; background: var(--wp-bg); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.45; color: var(--wp-ink-2); }
.wpl-note .lw-icon { font-size: 20px; color: var(--wp-acc-2); flex-shrink: 0; }
.wpl-note--alert { background: #F6E3DA; }
.wpl-note--alert .lw-icon { color: var(--wp-danger); }
.wpl-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--wp-line); padding-top: 14px; margin: 0; font-size: 14px; }
.wpl-facts dt { font: 400 10px/1.3 var(--wp-mono); text-transform: uppercase; color: var(--wp-muted); }
.wpl-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.wpl-facts dd a { border-bottom: 1px solid var(--wp-line-2); }
.wpl-small { font-size: 13px; line-height: 1.45; color: var(--wp-muted); }

/* Commentaires */
.wpc-box { padding: 20px; gap: 12px; scroll-margin-top: 20px; }
.wpc-box__h { font-size: 20px; font-weight: 900; }
.wpc-box__empty { font-size: 14px; color: var(--wp-muted); }
.wpc-box__thread { display: flex; flex-direction: column; gap: 14px; }
.wpc { display: flex; gap: 12px; scroll-margin-top: 20px; }
.wpc__av { position: relative; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #C9A24A; color: var(--wp-paper); font-weight: 800; font-size: 14px; }
.wpc__av::before { content: attr(data-i); }
.wpc__av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wpc--reply .wpc__av { width: 30px; height: 30px; font-size: 12px; }
.wpc__body { flex: 1; min-width: 0; }
.wpc__meta { font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.wpc__role { font: 500 10px/1 var(--wp-mono); text-transform: uppercase; background: var(--wp-sand); padding: 3px 6px; border-radius: 4px; }
.wpc__when { color: var(--wp-muted); }
.wpc__text { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.wpc__acts { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--wp-muted); }
.wpc__acts form { display: contents; }
.wpc__acts button, .wpc__acts a { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.wpc__acts button:hover, .wpc__acts a:hover { color: var(--wp-acc-2); }
.wpc__replies { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding-left: 4px; border-left: 2px solid var(--wp-line); padding-left: 12px; }
.wpc-form { display: flex; flex-direction: column; gap: 6px; }
.wpc-form__hint { font-size: 13px; color: var(--wp-muted); }
.wpc-form__hint button { border: 0; background: none; padding: 0; font: 700 13px var(--wp-sans); color: var(--wp-ink); cursor: pointer; }
.wpc-form__row { display: flex; gap: 8px; align-items: flex-end; }
.wpc-form__row textarea {
  flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 160px; border: 0; border-radius: 22px; background: var(--wp-bg);
  padding: 12px 16px; font: 400 14px/1.4 var(--wp-sans); color: var(--wp-ink);
}
.wpc-form__row textarea:focus-visible { outline: 2px solid var(--wp-acc); outline-offset: 0; }
.wpc-form__row .wp-btn { padding: 12px 16px; font-size: 14px; }
.wpc-form.is-reply .wpc-form__row textarea { background: var(--wp-sand); }
.wpc-form__login { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--wp-bg); border-radius: 999px; padding: 11px 16px; font-size: 14px; color: var(--wp-faint); }
.wpc-form__login span { font-weight: 700; color: var(--wp-ink); }

/* Colonne */
.wpl-author { padding: 20px; gap: 12px; border-top: 4px solid var(--wp-acc); scroll-margin-top: 20px; }
.wpl-author__id { display: flex; gap: 12px; align-items: center; }
.wpl-author__av { position: relative; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #3F5A44; color: var(--wp-paper); font-weight: 800; font-size: 18px; }
.wpl-author__av::before { content: attr(data-i); }
.wpl-author__av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wpl-author__name { font-size: 17px; font-weight: 800; }
.wpl-author__sub { font-size: 13px; color: var(--wp-muted); }
.wpl-chips { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 600; }
.wpl-chips:empty { display: none; }
.wpl-chips span { background: var(--wp-bg); padding: 5px 9px; border-radius: 999px; }
.wpl-manage { display: flex; flex-direction: column; gap: 8px; }
.wpl-manage form { margin: 0; }
.wpl-danger { color: var(--wp-danger); border-color: var(--wp-danger); }
.wpl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.wpl-row > * { flex: 1; min-width: 0; }
.wpl-row form { margin: 0; display: flex; }
.wpl-row--two .wp-btn { font-size: 13px; padding: 9px; }
.wpl-row .wp-btn.is-on { color: var(--wp-acc-2); border-color: var(--wp-acc-2); }
.wpl-write { display: flex; flex-direction: column; }
.wpl-write > summary { list-style: none; cursor: pointer; }
.wpl-write > summary::-webkit-details-marker { display: none; }
.wpl-write[open] > summary { display: none; }
.wpl-write__form { display: flex; flex-direction: column; gap: 8px; }
.wpl-write__form .wp-textarea { min-height: 110px; }
.wpl-share { padding-top: 4px; }

.wpl-map { overflow: hidden; }
.wpl-map__canvas {
  position: relative; height: 150px; background-color: #DCD5C3;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px);
  background-size: 24px 24px; z-index: 0;
}
.wpl-map__ring { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; border-radius: 50%; background: rgba(232, 112, 31, .25); border: 2px solid var(--wp-acc); transform: translate(-50%, -50%); }
.wpl-map__canvas.is-ready .wpl-map__ring { display: none; }
.wpl-map__txt { padding: 12px 16px; font-size: 13px; line-height: 1.45; color: var(--wp-ink-2); }

.wpl-safety { padding: 18px; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--wp-ink-2); }
.wpl-safety strong { color: var(--wp-ink); }
.wpl-report { font-weight: 700; color: var(--wp-ink); }
.wpl-report:hover { color: var(--wp-danger); }

.wpl-list { padding: 18px; gap: 8px; }
.wpl-side__h { font-size: 15px; font-weight: 800; }
.wpl-side__a { font-size: 13px; font-weight: 700; }
.wpl-list__i { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--wp-line); padding-bottom: 8px; }
.wpl-list__i img, .wpl-list__ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--wp-sand-2); display: flex; align-items: center; justify-content: center; color: var(--wp-faint); }
.wpl-list__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wpl-list__t strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpl-list__t small { font-size: 12px; color: var(--wp-muted); }
.wpl-list__p { color: var(--wp-acc-2); font-weight: 800; white-space: nowrap; }

.wpl-cta { padding: 18px; gap: 6px; }
.wpl-cta strong { font-size: 16px; font-weight: 800; }
.wpl-cta p { font-size: 13px; line-height: 1.45; color: var(--wp-ink-2); margin-bottom: 4px; }

.wpl-mbar { display: none; }

@media (max-width: 1023px) {
  .wpl-grid { grid-template-columns: minmax(0, 1fr); }
  .wpl-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}

@media (max-width: 760px) {
  .wpl { padding-top: 12px; gap: 12px; padding-bottom: calc(var(--wp-tabbar-h) + 84px); }
  .wpl-crumbs { font-size: 12px; }
  .wpl-crumbs > span:last-child { display: none; }
  .wpl-gallery, .wpl-gallery.is-2 { grid-template-columns: 1fr; grid-template-rows: 260px; margin: 0 calc(var(--wp-gut) * -1); gap: 0; overflow-x: auto; grid-auto-flow: column; grid-auto-columns: 100%; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .wpl-gallery.is-1 { grid-template-rows: 260px; }
  .wpl-gallery__cell { border-radius: 0; scroll-snap-align: start; grid-row: auto !important; }
  .wpl-gallery__cell.is-hidden { display: none; }
  .wpl-card { padding: 18px 16px; }
  .wpl-titlerow { flex-direction: column; gap: 6px; }
  .wpl-h1 { font-size: 26px; letter-spacing: -.02em; }
  .wpl-price { font-size: 26px; }
  .wpl-body { font-size: 15px; }
  .wpl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wpc-box { padding: 16px; }
  .wpl-side { display: flex; }

  .wpl-mbar {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; z-index: 70;
    bottom: calc(var(--wp-tabbar-h) + env(safe-area-inset-bottom, 0px));
    background: var(--wp-paper); border-top: 1px solid var(--wp-line); padding: 10px var(--wp-gut);
  }
  .wpl-mbar__p { font-size: 22px; font-weight: 900; color: var(--wp-acc-2); white-space: nowrap; }
  .wpl-mbar__go { flex: 1; font-size: 15px; padding: 12px 16px; }
}
