/* ═══════════════════════════════════════════════════
   Voltaire Immobilier — Filtre de biens
   À coller dans Apparence → Personnaliser → CSS additionnel
   ou dans style.css du thème enfant
═══════════════════════════════════════════════════ */

:root {
    --vf-blue:  #051d40;
    --vf-mid:   #3e5975;
    --vf-light: #809bab;
    --vf-pale:  #b0bdc1;
    --vf-sage:  #81887a;
    --vf-gold:  #c99a5b;
    --vf-white: #fff;
    --vf-off:   #f8f5f0;
    --vf-cream: #f5efe6;
}

/* ── Conteneur global ── */
.vf-wrap {
    position: relative;
    font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════
   FORMULAIRE
══════════════════════════ */
.vf-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    background: var(--vf-white);
    border: 1px solid rgba(5,29,64,0.08);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(5,29,64,0.06);
}

.vf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.vf-field--prix {
    flex: 2;
    min-width: 280px;
}

.vf-label {
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--vf-light);
    font-weight: 400;
}

/* Select commune */
.vf-select {
    border: 1.5px solid rgba(5,29,64,0.12);
    padding: 11px 36px 11px 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    color: var(--vf-blue);
    background: var(--vf-off);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23809bab' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s, background-color 0.2s;
    width: 100%;
}

.vf-select:focus {
    border-color: var(--vf-gold);
    background-color: var(--vf-white);
}


/* Boutons du formulaire */
.vf-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.vf-btn {
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    transition: background 0.25s, color 0.25s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

button.vf-btn--submit {
    background: var(--vf-gold);
    color: var(--vf-blue);
    padding: 14px 32px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

button.vf-btn--submit:hover {
    background: #b8894a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201,154,91,0.35);
}

button.vf-btn--submit:active {
    transform: translateY(0);
    box-shadow: none;
}

button.vf-btn--reset {
    background: none;
    border: none;
    color: var(--vf-sage);
    padding: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

button.vf-btn--reset::before {
    content: '×';
    font-size: 16px;
    line-height: 1;
    color: var(--vf-pale);
}

button.vf-btn--reset:hover { color: var(--vf-blue); background:none;}
button.vf-btn--reset:hover::before { color: var(--vf-gold); }

/* ══════════════════════════
   BARRE DE RÉSULTATS
══════════════════════════ */
.vf-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 18px;
    border-bottom: 1px solid rgba(5,29,64,0.07);
    margin-bottom: 24px;
}

.vf-count {
    font-size: 12px;
    color: var(--vf-sage);
    letter-spacing: 0.05em;
}

/* ══════════════════════════
   GRILLE
══════════════════════════ */
.vf-grid {
    display: grid;
    gap: 20px;
    transition: opacity 0.25s;
}

.vf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.vf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.vf-grid--4 { grid-template-columns: repeat(4, 1fr); }
.vf-grid--loading { opacity: 0.45; pointer-events: none; }

/* ══════════════════════════
   CARD
══════════════════════════ */
.vf-card {
    background: var(--vf-white);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.vf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(5,29,64,0.11);
}

.vf-card__img-wrap {
    display: block;
    overflow: hidden;
    position: relative;
}

.vf-card__img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.vf-card:hover .vf-card__img {
    transform: scale(1.04);
    filter: brightness(1);
}

.vf-card__img--placeholder {
    height: 220px;
    background: linear-gradient(135deg, var(--vf-off), var(--vf-cream));
}

.vf-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: var(--vf-gold);
    color: var(--vf-blue);
    padding: 5px 10px;
    font-weight: 500;
}

.vf-card__body {
    padding: 18px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vf-card__location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vf-light);
    margin-bottom: 7px;
}

.vf-card__location svg { color: var(--vf-gold); flex-shrink: 0; }

.vf-card__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 10px;
}

.vf-card__title a {
    color: var(--vf-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.vf-card__title a:hover { color: var(--vf-gold); }

.vf-card__specs {
    font-size: 12px;
    color: var(--vf-sage);
    margin-bottom: 14px;
}

.vf-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(5,29,64,0.07);
}

.vf-card__price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--vf-blue);
}

.vf-card__cta {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vf-gold);
    border: 1px solid rgba(201,154,91,0.4);
    padding: 8px 14px;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s;
}

.vf-card__cta:hover {
    background: var(--vf-gold);
    color: var(--vf-blue);
    border-color: var(--vf-gold);
}

/* ══════════════════════════
   ÉTAT VIDE
══════════════════════════ */
.vf-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: var(--vf-sage);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
}

.vf-empty__sub { margin-top: 8px; font-size: 13px; }
.vf-empty__sub a { color: var(--vf-gold); }

/* ══════════════════════════
   PAGINATION
══════════════════════════ */
.vf-pagination { margin-top: 36px; }

.vf-pages {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.vf-page {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(5,29,64,0.14);
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--vf-sage);
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.vf-page:hover {
    border-color: var(--vf-gold);
    color: var(--vf-blue);
}

.vf-page--active {
    background: var(--vf-blue);
    color: var(--vf-white);
    border-color: var(--vf-blue);
}

/* ══════════════════════════
   SPINNER
══════════════════════════ */
.vf-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.vf-spinner--active { display: block; }

.vf-spinner-ring {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(201,154,91,0.2);
    border-top-color: var(--vf-gold);
    border-radius: 50%;
    animation: vf-spin 0.7s linear infinite;
}

@keyframes vf-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */
@media (max-width: 900px) {
    .vf-grid--3,
    .vf-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .vf-form { padding: 18px 16px; flex-direction: column; }
    .vf-field, .vf-field--prix { min-width: 100%; flex: none; }
    .vf-actions { width: 100%; }
    .vf-btn--submit { flex: 1; justify-content: center; }
    .vf-grid--2,
    .vf-grid--3,
    .vf-grid--4 { grid-template-columns: 1fr; }
}

/* ── Tags filtres actifs ── */
.vf-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.vf-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(201,154,91,0.12);
    border: 1px solid rgba(201,154,91,0.35);
    color: var(--vf-blue);
    font-size: 11px;
    padding: 4px 10px;
    letter-spacing: 0.05em;
}

/* ── État de chargement ── */
.vf-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
    position: relative;
}

/* ── Actions — n'affiche que le reset ── */
.vf-actions:empty { display: none; }
