/* ============================================================
   BaugéPlus Annonces — v1.0.0
   DA : navy #1a2b5e · orange #f47920 · Poppins
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

.bpa-wrap { font-family: 'Poppins', sans-serif; max-width: 1200px; margin: 0 auto; padding: 0 16px 60px; }

/* ── Barre de recherche ──────────────────────────────────── */
.bpa-searchbar {
    background: #1a2b5e;
    border-radius: 14px;
    padding: 20px 24px;
    margin: 24px 0;
}
.bpa-search-inner {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.bpa-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    font-size: 14px;
}
.bpa-search-field.bpa-search-loc { flex: 0 0 260px; }
.bpa-search-field input,
.bpa-search-field select {
    flex: 1; border: none; outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px; background: transparent;
    color: #1a2b5e;
}
.bpa-search-field select { cursor: pointer; }
.bpa-icon-search, .bpa-icon-pin { font-size: 16px; flex-shrink: 0; }
.bpa-btn-search {
    background: #f47920; color: #fff; border: none;
    border-radius: 10px; padding: 0 28px; height: 48px;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}
.bpa-btn-search:hover { background: #e06810; }
@media (max-width: 680px) {
    .bpa-search-inner { flex-direction: column; }
    .bpa-search-field.bpa-search-loc { flex: 1; }
}

/* ── Layout listing ──────────────────────────────────────── */
.bpa-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 860px) {
    .bpa-layout { grid-template-columns: 1fr; }
    .bpa-filters { order: 2; }
    .bpa-main   { order: 1; }
}

/* ── Sidebar filtres ─────────────────────────────────────── */
.bpa-filters { position: sticky; top: 80px; }
.bpa-filter-card {
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
}
.bpa-filter-title {
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em;
    color: #1a2b5e; margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f47920;
}
.bpa-filter-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.bpa-filter-list a {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    color: #444 !important; text-decoration: none !important;
    transition: background .12s, color .12s;
}
.bpa-filter-list a:hover,
.bpa-filter-list a.active {
    background: #f0f4ff; color: #1a2b5e !important; font-weight: 700;
}
.bpa-filter-list a.active { border-left: 3px solid #f47920; padding-left: 7px; }
.bpa-cat-icon { font-size: 16px; }
.bpa-cat-count {
    margin-left: auto; background: #f0f4ff;
    color: #1a2b5e; font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 999px;
}
.bpa-price-range {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}
.bpa-price-range input {
    flex: 1; height: 38px; border: 1.5px solid #ddd;
    border-radius: 8px; padding: 0 10px;
    font-family: 'Poppins', sans-serif; font-size: 13px;
}
.bpa-price-range span { font-size: 14px; font-weight: 700; color: #666; }
.bpa-btn-filter-apply {
    width: 100%; height: 36px; border: none;
    background: #1a2b5e; color: #fff; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.bpa-btn-filter-apply:hover { background: #f47920; }
.bpa-btn-filter-reset {
    display: block; text-align: center; margin-top: 8px;
    font-size: 12px; color: #999 !important; text-decoration: none !important;
}
.bpa-btn-filter-reset:hover { color: #f47920 !important; }
.bpa-filter-cta { background: #f0f4ff; border-color: #c8d4ff; text-align: center; }
.bpa-filter-cta p { font-size: 13px; color: #555; margin: 0 0 10px; }

/* ── Toolbar ─────────────────────────────────────────────── */
.bpa-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.bpa-count { font-size: 14px; font-weight: 700; color: #1a2b5e; }
.bpa-sort { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #888; }
.bpa-sort a { color: #666 !important; text-decoration: none !important; padding: 4px 10px; border-radius: 6px; }
.bpa-sort a.active,
.bpa-sort a:hover { background: #f0f4ff; color: #1a2b5e !important; font-weight: 600; }

/* ── Grille annonces ─────────────────────────────────────── */
.bpa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.bpa-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .bpa-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .bpa-grid { grid-template-columns: repeat(2,1fr); } .bpa-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 380px) { .bpa-grid, .bpa-grid-4 { grid-template-columns: 1fr; } }

/* ── Carte annonce ───────────────────────────────────────── */
.bpa-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.bpa-card:hover {
    box-shadow: 0 8px 28px rgba(26,43,94,.12);
    transform: translateY(-3px);
    border-color: #f47920;
}
.bpa-card-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f4ff;
}
.bpa-card-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s;
}
.bpa-card:hover .bpa-card-img img { transform: scale(1.04); }
.bpa-card-noimg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
}
.bpa-card-cat {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(26,43,94,.85); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
    backdrop-filter: blur(4px);
}
.bpa-card-pro {
    position: absolute; top: 8px; right: 8px;
    background: #f47920; color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 4px;
    letter-spacing: .5px;
}
.bpa-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.bpa-card-title {
    font-size: 13px; font-weight: 600; color: #1a2b5e;
    margin: 0; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bpa-card-price { display: flex; align-items: center; gap: 8px; }
.bpa-card-price strong { font-size: 16px; font-weight: 800; color: #1a2b5e; }
.bpa-gratuit { color: #0b8a4e !important; }
.bpa-nego { font-size: 11px; color: #888; }
.bpa-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.bpa-card-meta span { font-size: 11px !important; color: #999; line-height: 1.4; }
.bpa-ico { font-style: normal; font-size: 11px !important; line-height: 1; display: inline; vertical-align: middle; }

/* ── Pagination ──────────────────────────────────────────── */
.page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; margin: 2px;
    font-size: 14px; font-weight: 600;
    color: #1a2b5e !important; text-decoration: none !important;
    border: 1.5px solid #e0e4f0;
    transition: background .12s, border-color .12s;
}
.page-numbers:hover { background: #f0f4ff; border-color: #1a2b5e; }
.page-numbers.current { background: #1a2b5e; color: #fff !important; border-color: #1a2b5e; }

/* ── Empty state ─────────────────────────────────────────── */
.bpa-empty { text-align: center; padding: 60px 20px; }
.bpa-empty-icon { font-size: 56px; margin-bottom: 16px; }
.bpa-empty h3 { font-size: 20px; color: #1a2b5e; margin: 0 0 8px; }
.bpa-empty p { color: #666; font-size: 14px; }

/* ── Bouton déposer ──────────────────────────────────────── */
.bpa-btn-deposer {
    display: inline-flex; align-items: center; gap: 8px;
    background: #f47920; color: #fff !important;
    font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 700;
    text-decoration: none !important;
    padding: 10px 22px; border-radius: 10px; border: none; cursor: pointer;
    transition: background .15s, transform .15s;
    width: 100%; justify-content: center;
}
.bpa-btn-deposer:hover { background: #e06810; transform: translateY(-1px); }
.bpa-btn-deposer.bpa-btn-lg { height: 52px; font-size: 15px; border-radius: 12px; }

/* ════════════════════════════════════════════════════════════
   PAGE SINGLE ANNONCE
   ════════════════════════════════════════════════════════════ */
.bpa-single-wrap { font-family: 'Poppins', sans-serif; max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }

.bpa-breadcrumb {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 13px; color: #888; padding: 16px 0;
}
.bpa-breadcrumb a { color: #1a2b5e !important; text-decoration: none !important; }
.bpa-breadcrumb a:hover { color: #f47920 !important; }
.bpa-breadcrumb span { color: #bbb; }

.bpa-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 820px) {
    .bpa-single-layout { grid-template-columns: 1fr; }
}

/* Galerie */
.bpa-gallery { margin-bottom: 24px; }
.bpa-gallery-main {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f0f4ff;
}
.bpa-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bpa-gallery-noimg { aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; font-size: 80px; background: #f0f4ff; border-radius: 14px; }
.bpa-gal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.9); border: none; cursor: pointer;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    transition: background .12s;
}
.bpa-gal-nav:hover { background: #fff; }
.bpa-gal-prev { left: 12px; }
.bpa-gal-next { right: 12px; }
.bpa-gal-counter {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,.5); color: #fff;
    font-size: 12px; font-weight: 600;
    padding: 3px 10px; border-radius: 999px;
}
.bpa-gallery-thumbs {
    display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.bpa-gal-thumb {
    width: 72px; height: 56px; object-fit: cover;
    border-radius: 8px; cursor: pointer;
    border: 2.5px solid transparent;
    transition: border-color .12s, opacity .12s;
    opacity: .7;
}
.bpa-gal-thumb.active,
.bpa-gal-thumb:hover { border-color: #f47920; opacity: 1; }

/* Contenu annonce */
.bpa-single-title { font-size: 24px; font-weight: 800; color: #1a2b5e; margin: 0 0 12px; }
.bpa-single-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bpa-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700;
}
.bpa-badge-cat  { background: #f0f4ff; color: #1a2b5e; }
.bpa-badge-etat { background: #f0faf5; color: #0b8a4e; }
.bpa-badge-pro  { background: #fff4ec; color: #f47920; }
.bpa-single-content { font-size: 15px; line-height: 1.75; color: #333; margin-bottom: 20px; }
.bpa-single-meta-row {
    display: flex; flex-wrap: wrap; gap: 16px;
    font-size: 13px; color: #888;
    padding-top: 16px; border-top: 1px solid #eee;
}

/* Aside sticky */
.bpa-single-aside { position: sticky; top: 80px; }
.bpa-aside-card {
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 14px;
}
.bpa-price-card { border-top: 4px solid #f47920; }
.bpa-big-price { font-size: 32px; font-weight: 800; color: #1a2b5e; }
.bpa-nego-label { font-size: 12px; color: #888; margin-top: 4px; }

/* Vendeur */
.bpa-seller-card { display: flex; gap: 14px; align-items: flex-start; }
.bpa-seller-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: #1a2b5e; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.bpa-seller-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bpa-seller-info strong { font-size: 15px; color: #1a2b5e; }
.bpa-seller-info span { font-size: 12px; color: #888; }
.bpa-btn-tel {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 7px 14px;
    background: #f0faf5; color: #0b8a4e !important;
    border: 1.5px solid #0b8a4e; border-radius: 8px;
    font-size: 13px; font-weight: 700;
    text-decoration: none !important;
    transition: background .12s;
}
.bpa-btn-tel:hover { background: #0b8a4e; color: #fff !important; }

/* Messagerie */
.bpa-msg-title { font-size: 14px; font-weight: 700; color: #1a2b5e; margin: 0 0 14px; }
.bpa-input {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid #dde0ea; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 13px;
    color: #1a2b5e; outline: none;
    transition: border-color .12s;
    margin-bottom: 8px;
    display: block;
}
.bpa-input:focus { border-color: #f47920; }
.bpa-textarea { resize: vertical; min-height: 90px; }
.bpa-btn-send {
    width: 100%; height: 42px; border: none;
    background: #1a2b5e; color: #fff;
    border-radius: 8px; font-family: 'Poppins', sans-serif;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .15s;
}
.bpa-btn-send:hover { background: #f47920; }
#bpa-msg-feedback {
    margin-top: 10px; padding: 10px 14px;
    border-radius: 8px; font-size: 13px; font-weight: 600;
}
#bpa-msg-feedback.ok { background: #f0faf5; color: #0b8a4e; }
#bpa-msg-feedback.err { background: #fff0f0; color: #e02; }

/* Partage */
.bpa-share-card h4 { font-size: 13px; font-weight: 700; color: #1a2b5e; margin: 0 0 10px; }
.bpa-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bpa-share-btn {
    flex: 0 0 auto; height: 34px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 12px; font-weight: 700;
    text-decoration: none !important; cursor: pointer; border: none;
    font-family: 'Poppins', sans-serif; white-space: nowrap;
    transition: opacity .12s;
}
.bpa-share-btn:hover { opacity: .85; }
.bpa-fb   { background: #1877f2; color: #fff !important; }
.bpa-wa   { background: #25d366; color: #fff !important; }
.bpa-copy { background: #f0f4ff; color: #1a2b5e !important; }

/* Similaires */
.bpa-similaires { margin-top: 48px; }
.bpa-similaires-title {
    font-size: 18px; font-weight: 800; color: #1a2b5e;
    margin: 0 0 20px; padding-bottom: 10px;
    border-bottom: 3px solid #f47920; display: inline-block;
}

/* ════════════════════════════════════════════════════════════
   FORMULAIRE DÉPÔT
   ════════════════════════════════════════════════════════════ */
.bpa-form-wrap { font-family: 'Poppins', sans-serif; max-width: 800px; margin: 0 auto; }
.bpa-form-header { text-align: center; margin-bottom: 32px; }
.bpa-form-header h2 { font-size: 26px; font-weight: 800; color: #1a2b5e; margin: 0 0 8px; }
.bpa-form-header p { color: #666; font-size: 14px; }

.bpa-form-section {
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}
.bpa-form-section-title {
    font-size: 14px; font-weight: 800;
    color: #1a2b5e; margin: 0 0 20px;
    padding-bottom: 10px; border-bottom: 2px solid #f47920;
}
.bpa-form-row { margin-bottom: 16px; }
.bpa-form-row:last-child { margin-bottom: 0; }
.bpa-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bpa-form-row-3 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: end; }
.bpa-label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.bpa-label .req { color: #f47920; }
.bpa-form-hint { font-size: 12px; color: #999; margin-top: 4px; }
.bpa-checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #444; cursor: pointer; }
.bpa-checkbox-label input { margin-top: 2px; }
.bpa-checkbox-label a { color: #f47920 !important; }

/* Upload photos */
.bpa-photo-drop {
    border: 2px dashed #c0c8e0;
    border-radius: 12px; padding: 32px;
    text-align: center; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.bpa-photo-drop:hover,
.bpa-photo-drop.drag-over { border-color: #f47920; background: #fff8f0; }
.bpa-drop-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.bpa-photo-drop p { font-size: 14px; font-weight: 600; color: #444; margin: 0 0 4px; }
.bpa-drop-hint { font-size: 12px; color: #999; }
.bpa-photo-preview {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 12px;
}
.bpa-preview-item {
    position: relative; width: 90px; height: 90px;
}
.bpa-preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.bpa-preview-item button {
    position: absolute; top: -6px; right: -6px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #e02; border: none; color: #fff;
    cursor: pointer; font-size: 13px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.bpa-form-actions { margin-top: 24px; text-align: center; }
.bpa-form-error {
    margin-top: 16px; padding: 12px 16px;
    background: #fff0f0; color: #c0392b;
    border-radius: 8px; font-size: 13px; font-weight: 600;
}

/* Succès */
.bpa-success-msg {
    text-align: center; padding: 60px 20px;
    font-family: 'Poppins', sans-serif;
}
.bpa-success-icon { font-size: 64px; margin-bottom: 16px; }
.bpa-success-msg h3 { font-size: 24px; color: #0b8a4e; margin: 0 0 8px; }
.bpa-success-msg p { color: #666; margin-bottom: 24px; }

@media (max-width: 560px) {
    .bpa-form-row-2,
    .bpa-form-row-3 { grid-template-columns: 1fr; }
    .bpa-form-row-nego { display: none; }
}
