/**
 * BIIM — Wizard soumission résidence (aligné mobile)
 */
.submit-property-page .container,
.submit-property-page .submit-form-container,
.submit-property-page .ere-property-multi-step,
.submit-property-page .ere-submit-property-form {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.biim-wizard {
    max-width: 100%;
    min-width: 0;
}

:root {
    --biim-wiz-blue: #003366;
    --biim-wiz-blue-dark: #002244;
    --biim-wiz-orange: #c97516;
    --biim-wiz-green: #16a34a;
    --biim-wiz-bg: #f1f5f9;
    --biim-wiz-card: #ffffff;
    --biim-wiz-text: #1e293b;
    --biim-wiz-muted: #64748b;
    --biim-wiz-border: #e2e8f0;
    --biim-wiz-radius: 12px;
}

.submit-property-page.biim-create-mode.biim-wizard-active .submit-property-page-header,
.submit-property-page.biim-edit-mode.biim-wizard-active .submit-property-page-header,
body.biim-submit-create-wizard.biim-wizard-active .submit-property-page-header,
body.biim-submit-edit-mode.biim-wizard-active .submit-property-page-header {
    display: none;
}

.submit-property-page.biim-create-mode.biim-wizard-active .submit-property-ad-zone,
.submit-property-page.biim-edit-mode.biim-wizard-active .submit-property-ad-zone,
body.biim-submit-create-wizard.biim-wizard-active .submit-property-ad-zone,
body.biim-submit-edit-mode.biim-wizard-active .submit-property-ad-zone {
    border-bottom: none;
}

/* Conteneur formulaire */
.submit-property-page.biim-create-mode .submit-form-container,
.submit-property-page.biim-edit-mode .submit-form-container,
body.biim-submit-create-wizard .submit-form-container,
body.biim-submit-edit-mode .submit-form-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.submit-property-page.biim-create-mode .submit-property-content,
.submit-property-page.biim-edit-mode .submit-property-content,
body.biim-submit-create-wizard .submit-property-content,
body.biim-submit-edit-mode .submit-property-content {
    padding: 24px 16px 100px;
    background: var(--biim-wiz-bg);
}

/* Masquer navigation ERE native en mode wizard (création + édition) */
.submit-property-page.biim-create-mode .ere-property-multi-step .ere-steps,
.submit-property-page.biim-create-mode .ere-property-multi-step fieldset .ere-step-nav,
.submit-property-page.biim-create-mode .ere-property-multi-step .ere-btn-edit,
.submit-property-page.biim-create-mode .ere-property-multi-step .ere-btn-prev,
.submit-property-page.biim-create-mode .ere-property-multi-step .ere-btn-next,
.submit-property-page.biim-create-mode .ere-property-multi-step fieldset .btn-submit-property,
.submit-property-page.biim-edit-mode .ere-property-multi-step .ere-steps,
.submit-property-page.biim-edit-mode .ere-property-multi-step fieldset .ere-step-nav,
.submit-property-page.biim-edit-mode .ere-property-multi-step .ere-btn-edit,
.submit-property-page.biim-edit-mode .ere-property-multi-step .ere-btn-prev,
.submit-property-page.biim-edit-mode .ere-property-multi-step .ere-btn-next,
.submit-property-page.biim-edit-mode .ere-property-multi-step fieldset .btn-submit-property,
body.biim-submit-create-wizard .ere-property-multi-step .ere-steps,
body.biim-submit-create-wizard .ere-property-multi-step fieldset .ere-step-nav,
body.biim-submit-create-wizard .ere-property-multi-step .ere-btn-edit,
body.biim-submit-create-wizard .ere-property-multi-step .ere-btn-prev,
body.biim-submit-create-wizard .ere-property-multi-step .ere-btn-next,
body.biim-submit-create-wizard .ere-property-multi-step fieldset .btn-submit-property,
body.biim-submit-edit-mode .ere-property-multi-step .ere-steps,
body.biim-submit-edit-mode .ere-property-multi-step fieldset .ere-step-nav,
body.biim-submit-edit-mode .ere-property-multi-step .ere-btn-edit,
body.biim-submit-edit-mode .ere-property-multi-step .ere-btn-prev,
body.biim-submit-edit-mode .ere-property-multi-step .ere-btn-next,
body.biim-submit-edit-mode .ere-property-multi-step fieldset .btn-submit-property {
    display: none !important;
}

.submit-property-page.biim-create-mode .ere-property-multi-step.edit-form .ere-steps {
    display: none !important;
}

/* Shell wizard */
.biim-wizard {
    background: var(--biim-wiz-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
    border: 1px solid var(--biim-wiz-border);
}

/* Header bleu */
.biim-wizard__header {
    background: var(--biim-wiz-blue);
    color: #fff;
    padding: 16px 20px 0;
}

.biim-wizard__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.biim-wizard__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    flex: 1;
    text-align: center;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.biim-wizard__counter {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 12px;
    font-weight: 700;
}

.biim-wizard__progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}

.biim-wizard__progress-bar {
    height: 100%;
    background: var(--biim-wiz-orange);
    border-radius: 999px;
    transition: width 0.35s ease;
}

/* Stepper icônes */
.biim-wizard__stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    padding: 0 4px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.biim-wizard__stepper::-webkit-scrollbar {
    display: none;
}

.biim-wizard__step {
    flex: 1;
    min-width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    cursor: default;
    color: rgba(255, 255, 255, 0.55);
}

.biim-wizard__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
    z-index: 0;
}

.biim-wizard__step.is-done:not(:last-child)::after {
    background: var(--biim-wiz-green);
}

.biim-wizard__step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
}

.biim-wizard__step.is-active .biim-wizard__step-icon {
    background: var(--biim-wiz-orange);
    box-shadow: 0 0 0 4px rgba(201, 117, 22, 0.35);
    color: #fff;
}

.biim-wizard__step.is-done .biim-wizard__step-icon {
    background: var(--biim-wiz-green);
    color: #fff;
}

.biim-wizard__step-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    max-width: 72px;
}

.biim-wizard__step.is-active .biim-wizard__step-label {
    color: #fff;
    font-weight: 700;
}

/* Corps */
.biim-wizard__body {
    padding: 24px 24px 16px;
    background: var(--biim-wiz-bg);
    min-height: 320px;
}

.biim-wizard__intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.biim-wizard__intro-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--biim-wiz-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.biim-wizard__intro-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #003366 !important;
    -webkit-text-fill-color: #003366;
    line-height: 1.25;
}

.biim-wizard__intro-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--biim-wiz-muted);
    line-height: 1.4;
}

/* Contenu ERE dans le wizard */
.biim-wizard .ere-property-multi-step {
    background: transparent;
}

.biim-wizard .ere-property-multi-step form {
    margin: 0;
}

.biim-wizard .ere-property-multi-step fieldset {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.biim-wizard .ere-property-multi-step fieldset:not(.visible) {
    display: none !important;
}

.biim-wizard .ere-property-multi-step fieldset.visible {
    display: block !important;
}

.biim-wizard #biim-wizard-slot .ere-property-multi-step {
    margin: 0;
}

.biim-wizard .property-fields-title h2,
.biim-wizard .ere-heading-style2 h2 {
    display: none !important;
}

/* Sections avec titre orange */
.biim-wizard .property-fields-wrap {
    margin-bottom: 28px !important;
}

.biim-wizard .biim-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--biim-wiz-orange);
}

.biim-wizard .biim-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(201, 117, 22, 0.35);
}

/* Champs formulaire — style moderne */
.biim-wizard .form-group,
.biim-wizard .field-group {
    margin-bottom: 18px !important;
    background: #fff;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    padding: 12px 14px 14px;
}

.biim-wizard .form-control,
.biim-wizard input[type="text"],
.biim-wizard input[type="number"],
.biim-wizard input[type="email"],
.biim-wizard input[type="tel"],
.biim-wizard input[type="date"],
.biim-wizard input[type="url"],
.biim-wizard input[type="password"],
.biim-wizard textarea,
.biim-wizard select {
    width: 100% !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    background: #f8fafc !important;
    color: var(--biim-wiz-text) !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    min-height: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.biim-wizard textarea {
    min-height: 120px;
    resize: vertical;
}

.biim-wizard .form-control::placeholder,
.biim-wizard input::placeholder,
.biim-wizard textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.biim-wizard .form-control:focus,
.biim-wizard input:focus,
.biim-wizard textarea:focus,
.biim-wizard select:focus {
    border-color: var(--biim-wiz-blue) !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12) !important;
}

.biim-wizard label {
    display: block;
    font-weight: 700 !important;
    color: var(--biim-wiz-blue) !important;
    font-size: 12px !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 8px !important;
}

.biim-wizard .form-group label,
.biim-wizard .field-group label {
    margin-bottom: 8px !important;
}

/* Champs internes sans double carte */
.biim-wizard .form-group .form-group,
.biim-wizard .field-group .field-group {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 12px !important;
}

.biim-wizard .form-group .form-control,
.biim-wizard .form-group input,
.biim-wizard .form-group select,
.biim-wizard .form-group textarea {
    background: #fff !important;
}

/* Select multiple / chosen */
.biim-wizard select[multiple] {
    min-height: 120px;
    padding: 8px !important;
}

.biim-wizard .select2-container--default .select2-selection--single,
.biim-wizard .select2-container--default .select2-selection--multiple {
    border: 1px solid #dbe3ee !important;
    border-radius: 10px !important;
    min-height: 46px !important;
    background: #f8fafc !important;
}

.biim-wizard .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 12px !important;
    color: var(--biim-wiz-text) !important;
}

/* Panneau indisponibilités */
.biim-availability-panel {
    margin-top: 16px;
    margin-bottom: 28px;
    padding: 18px 16px 16px;
    background: #fff;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    clear: both;
    position: relative;
    z-index: 1;
}

.biim-availability-panel .biim-section-title {
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.biim-availability-panel .biim-section-title::after {
    min-width: 40px;
}

.biim-optional {
    font-size: 12px;
    font-weight: 600;
    color: var(--biim-wiz-muted);
    text-transform: none;
    letter-spacing: 0;
}

.biim-availability-panel__hint {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--biim-wiz-muted);
}

.biim-availability-panel__ranges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.biim-availability-panel__ranges:empty {
    display: none;
}

.biim-availability-panel__actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--biim-wiz-border);
}

.biim-submit-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--biim-wiz-border);
    border-radius: 10px;
}

.biim-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.biim-field label {
    font-size: 11px !important;
    text-transform: uppercase;
    margin-bottom: 0 !important;
}

.biim-field__input {
    background: #fff !important;
    min-width: 0;
}

.biim-submit-remove-range {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    margin-bottom: 0;
}

.biim-submit-remove-range:hover {
    background: #fee2e2;
}

.biim-availability-panel__add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid var(--biim-wiz-blue);
    background: #fff;
    color: var(--biim-wiz-blue);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.biim-availability-panel__add:hover {
    background: #eff6ff;
}

/* Supprimer tout espace des boutons ERE sous le panneau */
.submit-property-page.biim-create-mode .ere-property-multi-step fieldset .ere-step-nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: none !important;
}

.submit-property-page.biim-create-mode .biim-wizard__body {
    padding-bottom: 28px;
}

@media (max-width: 768px) {
    .biim-availability-panel {
        margin-bottom: 36px;
    }

    .biim-availability-panel__add {
        max-width: 100%;
    }

    .biim-submit-range-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .biim-submit-remove-range {
        width: 100%;
        height: 40px;
        justify-content: center;
    }
}

.biim-wizard #step-type .property-type .form-group,
.biim-wizard #step-features .property-feature .form-check.form-group {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.biim-wizard #step-type .property-type .row {
    display: block !important;
}

.biim-wizard #step-type .property-type .row > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.biim-wizard #step-type .biim-wizard-label-field,
.biim-create-mode.biim-wizard-active #step-type .biim-wizard-label-field {
    display: none !important;
}

.biim-type-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.biim-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 100px;
    padding: 16px 12px;
    border: 2px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.biim-type-card:hover {
    border-color: #94a3b8;
}

.biim-type-card.is-selected {
    border-color: var(--biim-wiz-blue);
    background: #eff6ff;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.12);
}

.biim-type-card__icon {
    font-size: 28px;
    color: var(--biim-wiz-muted);
    line-height: 1;
}

.biim-type-card.is-selected .biim-type-card__icon {
    color: var(--biim-wiz-blue);
}

.biim-type-card__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--biim-wiz-text);
    line-height: 1.25;
}

.biim-type-card.is-selected .biim-type-card__label {
    color: var(--biim-wiz-blue);
}

.biim-type-card__check {
    display: none;
    color: var(--biim-wiz-green);
    font-size: 14px;
}

.biim-type-card.is-selected .biim-type-card__check {
    display: block;
}

.biim-wizard #step-type select#property_type,
.biim-wizard #step-type select#property_label,
.submit-property-page.biim-create-mode #step-type select#property_type,
body.biim-submit-create-wizard #step-type select#property_type {
    display: none !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.biim-wizard #step-type .select2-container,
.submit-property-page.biim-create-mode #step-type .select2-container,
body.biim-submit-create-wizard #step-type .select2-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Compteurs +/- (caractéristiques) */
.biim-qty-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.biim-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
}

.biim-qty-row__icon {
    width: 32px;
    color: var(--biim-wiz-muted);
    text-align: center;
    flex-shrink: 0;
}

.biim-qty-row__label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--biim-wiz-text);
}

.biim-qty-row__control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.biim-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.biim-qty-btn--minus {
    background: #f1f5f9;
    color: var(--biim-wiz-muted);
}

.biim-qty-btn--plus {
    background: #ffedd5;
    color: var(--biim-wiz-orange);
}

.biim-qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--biim-wiz-blue);
}

.biim-wizard #step-details .property-detail input[type="number"].biim-qty-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Pills état / ameublement */
.biim-wizard #step-details .biim-pill-block {
    margin-top: 8px;
}

.biim-wizard #step-details .biim-pill-field {
    margin-bottom: 18px !important;
    background: transparent;
    border: none;
    padding: 0;
}

.biim-wizard #step-details .biim-pill-field__label {
    display: block;
    font-weight: 700 !important;
    color: var(--biim-wiz-blue) !important;
    font-size: 12px !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 10px !important;
}

.biim-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.biim-pill {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.biim-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.biim-pill span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--biim-wiz-border);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--biim-wiz-muted);
    transition: all 0.15s ease;
}

.biim-pill.is-selected span,
.biim-pill input[type="radio"]:checked + span {
    background: var(--biim-wiz-blue);
    border-color: var(--biim-wiz-blue);
    color: #fff;
}

.biim-wizard #step-details .biim-details-source-fields {
    display: none !important;
}

.biim-wizard #step-details .biim-garage-size-wrap {
    margin-bottom: 20px;
}

.biim-wizard #step-details .biim-garage-size-wrap.hide {
    display: none !important;
}

.biim-wizard #step-details .biim-garage-size-wrap .form-group {
    margin-bottom: 0 !important;
}

.biim-wizard .hide {
    display: none !important;
}

/* Équipements — grille cartes */
.biim-wizard #step-features .property-feature .row.biim-equipements-grid,
.biim-wizard #step-features .property-feature .row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.biim-wizard #step-features .property-feature .row > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.biim-wizard #step-features .biim-features-main-title {
    display: none !important;
}

.biim-wizard #step-features .property-feature .form-check-label {
    min-height: 72px !important;
    border-radius: var(--biim-wiz-radius) !important;
    border: 1px solid var(--biim-wiz-border) !important;
    background: #fff !important;
    padding: 14px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--biim-wiz-text) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.biim-wizard #step-features .property-feature .form-check-input:checked + .form-check-label,
.biim-wizard #step-features .property-feature .form-check-label:has(input:checked) {
    border-color: var(--biim-wiz-blue) !important;
    background: #eff6ff !important;
    color: var(--biim-wiz-blue) !important;
}

/* Médias */
.biim-wizard #step-features .biim-media-section-heading {
    margin: 28px 0 16px;
}

.biim-wizard #step-features .biim-section-title--media {
    color: var(--biim-wiz-orange);
    border-bottom: 2px solid var(--biim-wiz-orange);
    padding-bottom: 8px;
    margin-bottom: 0;
}

.biim-wizard #step-features .biim-info-block--media .biim-media-specs {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--biim-wiz-muted);
}

.biim-wizard #step-features .biim-info-block--media .ere-property-gallery,
.biim-wizard #step-features .biim-info-block--media .property-media,
.biim-wizard #step-media .biim-media-note {
    border-radius: var(--biim-wiz-radius);
}

.biim-wizard #step-features .biim-info-block--media .ere-property-gallery,
.biim-wizard #step-features .biim-info-block--media .property-media {
    background: #fff;
    border-radius: var(--biim-wiz-radius);
    padding: 16px;
    border: 1px solid var(--biim-wiz-border);
}

.biim-media-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.biim-media-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 88px;
    padding: 16px 12px;
    border: none;
    border-radius: var(--biim-wiz-radius);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.biim-media-btn:hover {
    opacity: 0.92;
}

.biim-media-btn i {
    font-size: 22px;
}

.biim-media-btn--featured {
    background: var(--biim-wiz-blue);
}

.biim-media-btn--gallery {
    background: var(--biim-wiz-orange);
}

.biim-media-preview {
    margin-top: 14px;
}

.biim-media-empty {
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px dashed var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    background: #f8fafc;
    color: var(--biim-wiz-muted);
    font-size: 13px;
    text-align: center;
}

.biim-media-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 !important;
}

.biim-media-grid.has-images {
    margin-top: 4px !important;
}

.biim-media-grid > .biim-media-item {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.biim-media-item__figure {
    position: relative;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--biim-wiz-border);
    background: #f1f5f9;
    aspect-ratio: 1 / 1;
}

.biim-media-item.is-featured .biim-media-item__figure {
    border-color: var(--biim-wiz-orange);
    box-shadow: 0 0 0 1px rgba(201, 117, 22, 0.25);
}

.biim-media-item__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.biim-media-item__badge {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--biim-wiz-orange);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
}

.biim-media-item__overlay {
    position: absolute;
    inset: auto 4px 4px 4px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.biim-media-item__star,
.biim-media-item__remove {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 51, 102, 0.82);
    font-size: 12px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.biim-media-item__star.is-active {
    background: var(--biim-wiz-orange);
}

.biim-media-item__remove {
    background: rgba(15, 23, 42, 0.78);
}

.biim-media-item__star:hover,
.biim-media-item__remove:hover {
    transform: scale(1.05);
}

.biim-media-item__loading {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--biim-wiz-muted);
    font-size: 11px;
    font-weight: 600;
    border: 1px dashed var(--biim-wiz-border);
    border-radius: 8px;
    background: #f8fafc;
}

.biim-media-item.is-removing {
    opacity: 0.45;
    pointer-events: none;
}

.biim-media-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.4;
}

.biim-plupload-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

.biim-wizard #step-media .ere-property-gallery,
.biim-wizard #step-media .property-media {
    background: #fff;
    border-radius: var(--biim-wiz-radius);
    padding: 16px;
    border: 1px solid var(--biim-wiz-border);
}

/* Publication — coordonnées / autre contact */
.biim-wizard #step-contact .biim-contact-main-title {
    display: none !important;
}

.biim-wizard #step-contact .biim-contact-question {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--biim-wiz-text);
}

.biim-wizard #step-contact .biim-contact-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.biim-wizard #step-contact .biim-contact-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 14px 12px;
    border: 2px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.biim-wizard #step-contact .biim-contact-option.is-selected {
    border-color: var(--biim-wiz-blue);
    background: #eff6ff;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.1);
}

.biim-wizard #step-contact .biim-contact-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.biim-wizard #step-contact .biim-contact-option__icon {
    font-size: 24px;
    color: var(--biim-wiz-muted);
    line-height: 1;
}

.biim-wizard #step-contact .biim-contact-option.is-selected .biim-contact-option__icon {
    color: var(--biim-wiz-blue);
}

.biim-wizard #step-contact .biim-contact-option__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--biim-wiz-text);
    line-height: 1.3;
}

.biim-wizard #step-contact .biim-other-contact-panel {
    display: none;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    background: #fff;
}

.biim-wizard #step-contact .biim-other-contact-panel.is-open {
    display: block;
}

.biim-wizard #step-contact .biim-other-contact-hint {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--biim-wiz-muted);
}

.biim-wizard #step-contact .biim-other-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.biim-wizard #step-contact .biim-other-contact-grid__full {
    grid-column: 1 / -1;
}

.biim-wizard #step-contact .biim-other-contact-grid .form-group {
    margin-bottom: 0 !important;
}

.biim-wizard #step-contact .biim-other-contact-grid label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--biim-wiz-text);
}

.biim-wizard #step-contact .biim-wizard-summary {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    background: #f8fafc;
}

@media (max-width: 640px) {
    .biim-wizard #step-contact .biim-contact-options,
    .biim-wizard #step-contact .biim-other-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer navigation */
.biim-wizard__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 20px;
    background: #fff;
    border-top: 1px solid var(--biim-wiz-border);
    position: sticky;
    bottom: 0;
    z-index: 30;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.biim-wizard__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--biim-wiz-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-height: 48px;
    flex: 0 0 auto;
    min-width: 130px;
}

.biim-wizard__btn--prev {
    margin-right: auto;
    background: #fff;
    color: var(--biim-wiz-blue);
    border: 2px solid var(--biim-wiz-blue);
}

.biim-wizard__btn--prev:hover {
    background: #f8fafc;
}

.biim-wizard__btn--prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.biim-wizard__btn--next {
    background: var(--biim-wiz-blue);
    color: #fff;
}

.biim-wizard__btn--next:hover {
    background: var(--biim-wiz-blue-dark);
}

.biim-wizard__btn--submit {
    background: var(--biim-wiz-orange);
    color: #fff;
}

.biim-wizard__btn--submit:hover {
    background: #b86514;
}

/* Récapitulatif publication */
.biim-wizard-summary {
    background: #fff;
    border: 1px solid var(--biim-wiz-border);
    border-radius: var(--biim-wiz-radius);
    padding: 16px 18px;
    margin-bottom: 20px;
}

.biim-wizard-summary h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--biim-wiz-blue);
}

.biim-wizard-summary dl {
    margin: 0;
    display: grid;
    gap: 8px;
}

.biim-wizard-summary dt {
    font-size: 12px;
    color: var(--biim-wiz-muted);
    font-weight: 600;
}

.biim-wizard-summary dd {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--biim-wiz-text);
}

@media (max-width: 768px) {
    .submit-property-page.biim-create-mode .submit-property-content {
        padding: 16px 10px 90px;
    }

    .biim-wizard__body {
        padding: 18px 14px 24px;
    }

    .biim-type-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .biim-wizard__btn {
        min-width: 110px;
        padding: 12px 14px;
    }

    .biim-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
}

@media (min-width: 769px) {
    .biim-wizard__stepper {
        max-width: 640px;
        margin: 0 auto;
    }
}

/* Icônes Font Awesome dans le wizard (après typographie Source Sans 3) */
.biim-wizard .fa,
.biim-wizard i.fa,
.biim-wizard i[class*="fa-"] {
    font-family: 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    display: inline-block;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.biim-wizard .fa::before,
.biim-wizard i.fa::before,
.biim-wizard i[class*="fa-"]::before {
    font-family: 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: normal !important;
}

/* Étape 2 — Informations unifiées */
.biim-wizard #step-title_des .biim-price-grid,
.biim-wizard #step-title_des .biim-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.biim-wizard #step-title_des .biim-price-grid > [class*="col-"],
.biim-wizard #step-title_des .biim-location-grid > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding: 0;
    flex: none;
}

.biim-wizard #step-title_des .biim-location-address {
    grid-column: 1 / -1;
}

.biim-wizard #step-title_des .biim-info-block--price {
    margin-bottom: 20px !important;
}

.biim-wizard #step-title_des .biim-info-block--price .property-fields-title {
    display: none !important;
}

.biim-title-char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--biim-wiz-muted);
    margin-top: 6px;
    padding-right: 2px;
}

.biim-wizard .biim-price-postfix-input {
    background: #eef2f7 !important;
    color: var(--biim-wiz-muted) !important;
    cursor: default;
    pointer-events: none;
}

.biim-wizard .biim-price-postfix-field .form-control {
    font-weight: 600;
}

.biim-wizard #step-title_des .biim-availability-panel__actions {
    display: flex;
    justify-content: flex-end;
    border-top: none;
    padding-top: 0;
    margin-top: 8px;
}

.biim-wizard #step-title_des .biim-availability-panel__add {
    width: auto;
    min-width: 140px;
    margin-left: auto;
}

@media (max-width: 640px) {
    .biim-wizard #step-title_des .biim-price-grid,
    .biim-wizard #step-title_des .biim-location-grid {
        grid-template-columns: 1fr;
    }

    .biim-wizard__footer {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px max(16px, env(safe-area-inset-bottom, 0px));
    }

    .biim-wizard__btn {
        min-width: 0;
        flex: 1 1 calc(50% - 5px);
        font-size: 14px;
        padding: 12px 10px;
    }

    .biim-wizard__btn--prev {
        flex: 1 1 100%;
        margin-right: 0;
    }

    .biim-wizard__header {
        padding: 14px 12px 0;
    }

    .biim-wizard__title {
        font-size: 1rem;
    }

    .biim-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .biim-wizard .row {
        margin-left: 0;
        margin-right: 0;
    }

    .biim-wizard [class*="col-"] {
        max-width: 100%;
        flex: 0 0 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Localisation searchable (même principe page d'accueil) */
.biim-wizard .biim-searchable-input-container {
    position: relative;
}

.biim-wizard .biim-searchable-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 120;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--biim-wiz-border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.biim-wizard .biim-searchable-dropdown.is-open {
    display: block;
}

.biim-wizard .biim-searchable-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--biim-wiz-text);
}

.biim-wizard .biim-searchable-dropdown__item:hover,
.biim-wizard .biim-searchable-dropdown__item:focus {
    background: #f8fafc;
    outline: none;
}

.biim-wizard .biim-searchable-dropdown__icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.biim-wizard .biim-searchable-dropdown__text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.biim-wizard .biim-searchable-dropdown__meta {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--biim-wiz-muted);
    margin-top: 2px;
}

.biim-wizard .biim-searchable-dropdown__empty,
.biim-wizard .biim-searchable-dropdown__more {
    padding: 14px;
    font-size: 13px;
    color: var(--biim-wiz-muted);
    text-align: center;
}

.biim-wizard .biim-submit-commune-wrap.hide {
    display: none !important;
}

.biim-wizard .biim-location-secondary .biim-searchable-field + .biim-searchable-field {
    margin-top: 0;
}

.biim-wizard .biim-submit-commune-wrap:not(.hide) + .biim-submit-quartier-wrap {
    margin-top: 12px;
}

.biim-wizard .biim-searchable-input:disabled {
    background: #eef2f7 !important;
    cursor: not-allowed;
}
