/**
 * Benin Immo Collections — Styles front-end
 * Archive de collection + Shortcode [bic_collections_grid]
 */

/* ══════════════════════════════════════════════════════════════════════════════
   GRILLE DE COLLECTIONS  [bic_collections_grid]
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-grid {
    display: grid;
    grid-template-columns: repeat( var(--bic-cols, 3), 1fr );
    gap: 20px;
    margin: 24px 0;
}

/* Responsive automatique */
@media (max-width: 1024px) {
    .bic-grid { grid-template-columns: repeat( min( var(--bic-cols, 3), 2 ), 1fr ); }
}
@media (max-width: 600px) {
    .bic-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Carte commune ──────────────────────────────────────────────────────────── */
.bic-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}

.bic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    color: #fff;
    text-decoration: none;
}

.bic-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.70) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
    z-index: 1;
    transition: background .25s ease;
}

.bic-card:hover .bic-card__overlay {
    background: linear-gradient(to top, rgba(0,0,0,.80) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
}

.bic-card__body {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.bic-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.bic-card__desc {
    font-size: .85rem;
    opacity: .88;
    margin: 0 0 8px;
    line-height: 1.5;
}

.bic-card__count {
    display: inline-block;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .3px;
}

/* ── Style : overlay (défaut) ───────────────────────────────────────────────── */
.bic-card--overlay {
    /* styles déjà définis ci-dessus */
}

/* ── Style : cards (carte blanche sous l'image) ─────────────────────────────── */
.bic-card--cards {
    flex-direction: column;
    align-items: stretch;
    background-size: cover !important;
    background-position: center !important;
    min-height: 200px;
    border: 1px solid rgba(255,255,255,.08);
}

.bic-card--cards .bic-card__body {
    background: #fff;
    color: #222;
    padding: 14px 16px;
    flex-shrink: 0;
}

.bic-card--cards .bic-card__overlay {
    bottom: auto;
    height: 200px;
}

.bic-card--cards .bic-card__title {
    color: #1a3c5e;
    font-size: 1rem;
    text-shadow: none;
}

.bic-card--cards .bic-card__count {
    background: #e8f0fe;
    color: #1a3c5e;
}

/* ── Style : minimal (texte centré, fond plein ou image) ─────────────────────── */
.bic-card--minimal {
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 160px;
}

.bic-card--minimal .bic-card__body {
    padding: 24px 16px;
}

.bic-card--minimal .bic-card__title {
    font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SUPPRESSION DU TITRE DUPLIQUÉ DANS LE LISTING (archives de collection)
   ──────────────────────────────────────────────────────────────────────────────
   Le plugin injecte bic_render_banner() via houzez_before_taxonomy_template,
   ce qui fournit le titre dans le hero AVANT la section listing.
   On cache ensuite le H1 redondant à l'intérieur de .listing-wrap
   (taxonomy-common.php ligne 82-88), en gardant breadcrumb et switcher.
   ══════════════════════════════════════════════════════════════════════════════ */

body.tax-property_collection .listing-wrap .page-title-wrap .page-title {
    display: none !important;
}

/* Description — full-bleed : sort de la colonne Houzez pour occuper toute la largeur */
.bic-term-description {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #f9f9f9;
    padding: 24px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.bic-desc-inner {
    font-size: .96rem;
    line-height: 1.8;
    color: #444;
    /* pas de max-width — le .container interne gère déjà la largeur */
}

.bic-desc-inner h2,
.bic-desc-inner h3 { color: #1a3c5e; margin-top: 0; }

/* Masque la description native de Houzez (dans .listing-wrap) — la nôtre est
   injectée par bic_render_collection_description() juste avant le listing */
body.tax-property_collection .listing-wrap .taxonomy-description {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   INTRO AU-DESSUS DU LISTING (page-collection.php)
   Contenu de l'éditeur WordPress ou description du terme.
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-page-intro {
    margin-bottom: 24px;
    font-size: .97rem;
    line-height: 1.75;
    color: #444;
}

.bic-page-intro h2,
.bic-page-intro h3 { color: #1a3c5e; margin-top: 0; }

.bic-page-intro p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════════════════
   BANNIÈRE D'ARCHIVE
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-banner {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #fff;
    overflow: hidden;
}

.bic-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1;
}

.bic-banner-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.bic-banner-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.bic-banner-desc {
    font-size: 1.05rem;
    opacity: .9;
    margin: 0 0 12px;
    line-height: 1.6;
}

.bic-banner-count {
    display: inline-block;
    background: rgba(255,255,255,.2);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: .9rem;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.bic-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s, color .2s;
}

.bic-pagination .page-numbers.current,
.bic-pagination .page-numbers:hover {
    background: #1a3c5e;
    color: #fff;
    border-color: #1a3c5e;
}

/* ══════════════════════════════════════════════════════════════════════════════
   TEXTE SEO
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-seo-text {
    margin-top: 48px;
    padding: 32px;
    background: #f9f9f9;
    border-left: 4px solid #1a3c5e;
    border-radius: 0 8px 8px 0;
    font-size: .95rem;
    line-height: 1.8;
    color: #444;
}

.bic-seo-text h2,
.bic-seo-text h3 { color: #1a3c5e; }

/* ══════════════════════════════════════════════════════════════════════════════
   BADGES SUR LES CARTES DE PROPRIÉTÉ
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.bic-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f0fe;
    color: #1a3c5e;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.bic-badge:hover {
    background: #1a3c5e;
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════════
   WIDGET SIDEBAR SEARCH
   ══════════════════════════════════════════════════════════════════════════════ */

.bic-widget-form select,
.bic-collection-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.bic-widget-form select:focus,
.bic-collection-select:focus {
    outline: none;
    border-color: #1a3c5e;
    box-shadow: 0 0 0 2px rgba(26,60,94,.15);
}
