/*====================================================================================*/
/* Maisons Barberousse - Custom CSS for bundle v13 legacy views
/* Contains: Bootstrap grid, forms, modals, property listings, utilities
/*====================================================================================*/

/* ==========================================================================
   CSS VARIABLES (shared with app.css Tailwind theme)
   ========================================================================== */

:root {
    --primary: #4d3372;
    --primary-100: #7b5ea5;
    --primary-700: #3a2558;
    --primary-900: #1a0b31;
    --grey-100: #f5f5f5;
    --grey-500: #949494;
    --white: #ffffff;
    --black: #000000;
    --text-color: #333333;
    --font-primary: 'acumin-pro', 'Raleway', Arial, sans-serif;
    --transition-all: all 0.3s ease;
}

/* ==========================================================================
   MINIMAL BOOTSTRAP GRID SYSTEM
   ========================================================================== */

.container {
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
.container::after { content: ""; display: table; clear: both; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

[class*="col-"] {
    position: relative;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    min-height: 1px;
}

/* XS columns (always active) */
.col-xs-1 { width: 8.333333%; }
.col-xs-2 { width: 16.666667%; }
.col-xs-3 { width: 25%; }
.col-xs-4 { width: 33.333333%; }
.col-xs-5 { width: 41.666667%; }
.col-xs-6 { width: 50%; }
.col-xs-7 { width: 58.333333%; }
.col-xs-8 { width: 66.666667%; }
.col-xs-9 { width: 75%; }
.col-xs-10 { width: 83.333333%; }
.col-xs-11 { width: 91.666667%; }
.col-xs-12 { width: 100%; }

/* SM columns (>=768px) */
@media (min-width: 768px) {
    .container { max-width: 750px; }
    .col-sm-1 { width: 8.333333%; }
    .col-sm-2 { width: 16.666667%; }
    .col-sm-3 { width: 25%; }
    .col-sm-4 { width: 33.333333%; }
    .col-sm-5 { width: 41.666667%; }
    .col-sm-6 { width: 50%; }
    .col-sm-7 { width: 58.333333%; }
    .col-sm-8 { width: 66.666667%; }
    .col-sm-9 { width: 75%; }
    .col-sm-10 { width: 83.333333%; }
    .col-sm-11 { width: 91.666667%; }
    .col-sm-12 { width: 100%; }
    .col-sm-offset-1 { margin-left: 8.333333%; }
    .col-sm-offset-2 { margin-left: 16.666667%; }
    .col-sm-offset-3 { margin-left: 25%; }
}

/* MD columns (>=992px) */
@media (min-width: 992px) {
    .container { max-width: 970px; }
    .col-md-1 { width: 8.333333%; }
    .col-md-2 { width: 16.666667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-5 { width: 41.666667%; }
    .col-md-6 { width: 50%; }
    .col-md-7 { width: 58.333333%; }
    .col-md-8 { width: 66.666667%; }
    .col-md-9 { width: 75%; }
    .col-md-10 { width: 83.333333%; }
    .col-md-11 { width: 91.666667%; }
    .col-md-12 { width: 100%; }
    .col-md-offset-1 { margin-left: 8.333333%; }
    .col-md-offset-2 { margin-left: 16.666667%; }
    .col-md-offset-3 { margin-left: 25%; }
}

/* LG columns (>=1200px) */
@media (min-width: 1200px) {
    .container { max-width: 1170px; }
    .col-lg-1 { width: 8.333333%; }
    .col-lg-2 { width: 16.666667%; }
    .col-lg-3 { width: 25%; }
    .col-lg-4 { width: 33.333333%; }
    .col-lg-5 { width: 41.666667%; }
    .col-lg-6 { width: 50%; }
    .col-lg-7 { width: 58.333333%; }
    .col-lg-8 { width: 66.666667%; }
    .col-lg-9 { width: 75%; }
    .col-lg-10 { width: 83.333333%; }
    .col-lg-11 { width: 91.666667%; }
    .col-lg-12 { width: 100%; }
    .col-lg-offset-1 { margin-left: 8.333333%; }
    .col-lg-offset-2 { margin-left: 16.666667%; }
    .col-lg-offset-3 { margin-left: 25%; }
}

/* XL columns (>=1400px) */
@media (min-width: 1400px) {
    .col-xl-12 { width: 100%; }
}

/* No gutters */
.no-gutters { margin-left: 0; margin-right: 0; }
.no-gutters > [class*="col-"] { padding-left: 0; padding-right: 0; }

/* ==========================================================================
   BOOTSTRAP UTILITIES
   ========================================================================== */

/* Missing Tailwind gap-y utilities (not in purged app.css) */
.gap-y-6 { row-gap: 1.5rem; }
@media (min-width: 1024px) {
    .lg\:gap-y-2 { row-gap: 0.5rem; }
}

.container .text-center, .modal .text-center { text-align: center; }
.container .text-left, .modal .text-left { text-align: left; }
.container .text-right, .modal .text-right { text-align: right; }
.img-responsive { max-width: 100%; height: auto; display: block; }
.clearfix::after { content: ""; display: table; clear: both; }
.pull-left { float: left; }
.pull-right { float: right; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.w-50 { width: 50%; }
.overflow-hidden { overflow: hidden; }

/* ==========================================================================
   BOOTSTRAP FORMS (for bundle v13 form-filter, etc.)
   ========================================================================== */

.form-control {
    display: block;
    width: 100%;
    padding: 10px 15px;
    font-size: 15px;
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0;
    transition: border-color 0.15s ease;
}
.form-control:focus {
    border-color: var(--primary);
    outline: 0;
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: auto; }

.form-group { margin-bottom: 15px; }

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.form-check-input { margin-top: 0.25rem; }
.form-check-label { font-weight: 400; }

.container label,
.modal label { display: block; margin-bottom: 5px; font-weight: 600; }

/* ==========================================================================
   #vitahomeForm — styled to match live site design
   Underline inputs, clean checkboxes, pill submit button.
   ========================================================================== */

#vitahomeForm {
    font-family: var(--font-primary);
}

/* Row / grid spacing */
#vitahomeForm .row {
    margin-left: -8px;
    margin-right: -8px;
}
#vitahomeForm [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* Form groups */
#vitahomeForm .form-group {
    position: relative;
    margin-bottom: 0.25rem;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
}

/* Text inputs & textareas — underline style */
#vitahomeForm .form-control {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #737373;
    border-radius: 0;
    padding: 0.5rem 0.25rem;
    font-size: 15px;
    font-family: var(--font-primary);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}
#vitahomeForm .form-control:focus {
    border-bottom-color: var(--primary);
    color: var(--primary);
    outline: none;
    box-shadow: none;
}
#vitahomeForm .form-control::placeholder {
    color: #737373;
    opacity: 1;
}
#vitahomeForm textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* Checkbox section */
#vitahomeForm .text-left {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}
#vitahomeForm .text-left label {
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    cursor: pointer;
}
#vitahomeForm .text-left label input[type="checkbox"] {
    margin-top: 4px;
    margin-right: 8px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    display: block;
    float: left;
}
}
#vitahomeForm .text-left label a {
    color: var(--primary);
    text-decoration: underline;
}

/* Submit button — pill style */
#vitahomeForm .send-btn {
    padding-top: 1rem;
}
#vitahomeForm .send-btn .btn {
    display: block;
    width: max-content;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 9999px;
    padding: 0.5rem 2rem;
    border: 1px solid var(--primary);
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s ease;
    text-decoration: none;
}
#vitahomeForm .send-btn .btn:hover {
    background-color: var(--primary-100);
    border-color: var(--primary-100);
}

/* Location autocomplete */
#vitahomeForm .location-container {
    margin-bottom: 0.25rem;
}
#vitahomeForm #alert-location {
    font-size: 13px;
    color: #e74c3c;
}

/* Small text */
#vitahomeForm > p small {
    color: #737373;
    font-size: 12px;
}

/* Typeahead dropdown (Bootstrap typeahead appended to body) */
ul.typeahead.dropdown-menu {
    position: absolute;
    z-index: 9999;
    float: left;
    min-width: 160px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    font-size: 14px;
}
ul.typeahead.dropdown-menu li {
    cursor: pointer;
}
ul.typeahead.dropdown-menu li a {
    display: block;
    padding: 6px 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}
ul.typeahead.dropdown-menu li:hover a,
ul.typeahead.dropdown-menu li.active a {
    background-color: var(--primary);
    color: #fff;
}

/* ==========================================================================
   BOOTSTRAP BUTTONS (scoped to legacy bundle views only)
   The Tailwind .btn (pill, transparent, bordered) from app.css is the default.
   These overrides only apply inside .container / .modal / #vitahomeForm.
   ========================================================================== */

.container .btn,
.modal .btn {
    display: inline-block;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0;
    transition: var(--transition-all);
    text-decoration: none;
}
.container .btn-primary,
.modal .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.container .btn-primary:hover,
.modal .btn-primary:hover {
    background-color: var(--primary-100);
    border-color: var(--primary-100);
    color: #fff;
    text-decoration: none;
}
.container .btn-secondary,
.modal .btn-secondary { background-color: #6c757d; border-color: #6c757d; color: #fff; }
.container .btn-block,
.modal .btn-block { display: block; width: 100%; }
.container .btn-sm,
.modal .btn-sm { padding: 5px 10px; font-size: 12px; }
.container .btn-md,
.modal .btn-md { padding: 8px 16px; font-size: 14px; }
.container .btn-lg,
.modal .btn-lg { padding: 12px 24px; font-size: 16px; }

/* ==========================================================================
   BOOTSTRAP MODALS (for bundle v13 call-me, etc.)
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal.in, .modal.show, .modal.fade.in { display: block; }
.modal-dialog {
    position: relative;
    margin: 10% auto;
    max-width: 600px;
    padding: 0 15px;
}
.modal-lg { max-width: 900px; }
.modal-sm { max-width: 300px; }
.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}
.modal-title { font-size: 18px; font-weight: 600; margin: 0; }
.modal-body { padding: 15px; }
.modal-footer {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}
.modal-header .close,
.modal-header [data-dismiss="modal"] {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-backdrop { display: none; }
.fade { opacity: 1; }

/* ==========================================================================
   BOOTSTRAP PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: center;
    gap: 4px;
}
.pagination > li > a,
.pagination > li > span {
    display: block;
    padding: 6px 12px;
    color: var(--primary);
    background-color: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
}
.pagination > li.active > a,
.pagination > li.active > span,
.pagination > li.active > a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination > li.disabled > a,
.pagination > li.disabled > span {
    color: #999;
    cursor: not-allowed;
}
.page-item { list-style: none; }
.page-link {
    display: block;
    padding: 6px 12px;
    color: var(--primary);
    background-color: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
}
.page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.page-item.disabled .page-link { color: #999; cursor: not-allowed; }

/* ==========================================================================
   TABS (jQuery UI tabs for filter)
   ========================================================================== */

.ui-tabs .ui-tabs-nav {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}
.ui-tabs .ui-tabs-nav li { list-style: none; }
.ui-tabs .ui-tabs-nav li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.8);
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
.ui-tabs .ui-tabs-nav li.ui-state-active a {
    background: var(--primary);
    color: #fff;
}
.ui-tabs .ui-tabs-panel { padding: 20px; background: #fff; }
.ui-tabs .ui-tabs-hide { display: none; }

/* ==========================================================================
   LEGACY LAYOUT & MODULE STYLES
   ========================================================================== */

.module { position: relative; padding: 60px 0; }
.module.no-padding { padding: 0; }
.module-header { margin-bottom: 50px; text-align: center; }
.module-header h2 { font-weight: 300; font-size: 30px; margin-bottom: 15px; }
.module-header img { margin-bottom: 15px; }

.left { float: left; }
.right { float: right; }
.center { text-align: center; margin: 0 auto; }
.clear { clear: both; }
.show-none { display: none; }
.divider { width: 100%; height: 1px; background: rgba(0,0,0,0.1); margin: 20px 0; }

.content p { line-height: 1.8; margin-bottom: 27px; }
.content ul li { list-style-type: disc; margin-left: 20px; }

.blue-skin .button,
.blue-skin .subheader .overlay { background: var(--primary); }
.blue-skin a { color: var(--primary); }
.blue-skin a:hover { color: var(--primary-100); }
.blue-skin .button:hover { background: var(--primary-100); }

.button {
    display: inline-block;
    padding: 10px 25px;
    color: var(--white);
    background: var(--primary);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-all);
}
.button:hover { background: var(--primary-100); color: var(--white); text-decoration: none; }

/* ==========================================================================
   SUBHEADER / PAGE TITLE
   ========================================================================== */

.subheader {
    position: relative;
    padding: 140px 0 80px;
    background-size: cover;
    background-position: center;
    color: var(--white);
}
.subheader .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.subheader .container { position: relative; z-index: 2; }
.subheader h1 { font-size: 2.5rem; font-weight: 700; }
.subheader .breadcrumb { background: none; padding: 0; margin: 10px 0 0; font-size: 14px; }
.subheader .breadcrumb a { color: var(--white); }
.subheader .breadcrumb i { margin: 0 8px; }

.page-title { background: var(--grey-100); padding: 100px 0 30px; }
.page-title .ipt-title { font-size: 2rem; font-weight: 700; color: var(--primary); }
.page-title .breadcrumb { background: none; padding: 0; margin: 10px 0 0; }

/* Breadcrumb nav (site-wide) */
.breadcrumb-nav { background: var(--grey-100); }
.breadcrumb-nav ol { list-style: none; margin: 0; padding: 0; }

/* ==========================================================================
   PROPERTY LISTINGS
   ========================================================================== */

.property { margin-bottom: 30px; }
.property-img { position: relative; overflow: hidden; }
.property-img img { width: 100%; transition: transform 0.3s ease; }
.property:hover .property-img img { transform: scale(1.05); }
.property-content { padding: 15px; background: var(--white); }
.property-title { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.property-title a { color: var(--text-color); }
.property-title a:hover { color: var(--primary); }
.property-location { font-size: 13px; color: var(--grey-500); margin-bottom: 10px; }
.property-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.property-info { display: flex; padding: 10px 15px; border-top: 1px solid #eee; }
.property-info span { flex: 1; font-size: 13px; }
.property-info span i { margin-right: 5px; color: var(--primary); }

/* Slick slider for featured properties */
.slider-featured .slick-slide { padding: 0 15px; }
.slider-featured .slick-prev,
.slider-featured .slick-next { z-index: 10; width: 40px; height: 40px; }
.slider-featured .slick-prev:before,
.slider-featured .slick-next:before { font-family: 'FontAwesome'; font-size: 20px; color: var(--primary); }

/* ==========================================================================
   BLOG / ARTICLES
   ========================================================================== */

.blog-item { margin-bottom: 30px; }
.blog-item-img img { width: 100%; }
.blog-item-content { padding: 15px; }
.blog-item-content h3 { font-size: 18px; font-weight: 600; }
.blog-item-content h3 a { color: var(--text-color); }
.blog-item-content h3 a:hover { color: var(--primary); }

.presentation-detaillee { padding: 40px 0; }
.presentation-detaillee .blog-details { background: var(--white); }
.presentation-detaillee article { padding: 20px; }
.bg-light { background: var(--grey-100); }

/* ==========================================================================
   FILTER & SEARCH
   ========================================================================== */

.filter-wrap { padding: 20px; background: var(--white); }
.price-slider-wrap { margin: 15px 0; }

.simple-search { margin-bottom: 30px; }
.simple-search .ui-tabs-nav { list-style: none; display: flex; }
.simple-search .ui-tabs-nav li a {
    display: block;
    padding: 10px 20px;
    background: rgba(255,255,255,0.8);
    color: var(--text-color);
    font-weight: 600;
}
.simple-search .ui-tabs-nav li.ui-tabs-active a { background: var(--primary); color: var(--white); }
.simple-search .ui-tabs-panel { padding: 20px; background: var(--white); }

/* ==========================================================================
   MISC LEGACY COMPONENTS
   ========================================================================== */

.service-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    margin-bottom: 30px;
    transition: var(--transition-all);
}
.service-item:hover { box-shadow: 0 5px 25px rgba(0,0,0,0.1); }
.service-item i { font-size: 40px; color: var(--primary); margin-bottom: 20px; display: block; }
.service-item img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 20px; }
.service-item h4 { font-size: 16px; font-weight: 600; margin-bottom: 15px; }

.landing { padding: 20px 0; }
.landing h3 { color: var(--primary); }

/* Nav submenu (landing links under "Qui sommes-nous") */
.nav-submenu {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
}
.nav-submenu li {
    margin-bottom: 0;
}
header nav .grid ul .nav-submenu li a,
header nav .grid ul .nav-submenu li:last-of-type a {
    font-size: 1.2em;
    line-height: 1.1em;
    opacity: 0.7;
}
.nav-submenu li a:hover {
    opacity: 1;
}

/* Landing pages — sidebar layout (not in purged Tailwind) */
@media (min-width: 1024px) {
    .lg\:w-8\/12 { width: 66.666667%; }
    .lg\:w-4\/12 { width: 33.333333%; }
    .lg\:sticky { position: sticky; }
    .lg\:top-24 { top: 6rem; }
    .lg\:pl-6 { padding-left: 1.5rem; }
}

/* Landing pages (dpt/city) — rich text blocks */
.landing-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}
.landing-text h2:first-child { margin-top: 0; }
.landing-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    margin-top: 1.25rem;
}
.landing-text p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #333;
}
.landing-text ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.landing-text ul li {
    line-height: 1.8;
    margin-bottom: 0.25rem;
}

.agency-card { margin-bottom: 30px; padding: 20px; background: var(--white); }
.testimonial-item { padding: 30px; background: var(--white); margin-bottom: 20px; }

.model-card { margin-bottom: 30px; background: var(--white); overflow: hidden; }
.model-card img { width: 100%; height: 200px; object-fit: cover; }
.model-card-content { padding: 15px; }
.model-card-content h3 { font-size: 16px; font-weight: 600; }

.mfp-image, .mfp-gallery { cursor: pointer; }
.gallery-item { margin-bottom: 15px; overflow: hidden; }
.gallery-item img { width: 100%; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.chosen-container { width: 100% !important; }
.chosen-container-single .chosen-single { height: 42px; line-height: 42px; border-radius: 0; border-color: #ddd; }

/* CTA module */
.module.cta { background: var(--primary); color: var(--white); padding: 40px 0; }
.module.cta h3 { font-weight: 700; }
.module.cta .button.alt-2 { background: var(--white); color: var(--primary); }
.module.cta .button.alt-2:hover { background: var(--primary-100); color: var(--white); }
.module.cta .button.alt-3 { background: var(--primary-700); }

/* Vitahome form — legacy styles removed, see #vitahomeForm section above */

/* Swiper custom colors */
.swiper-custom .swiper-button-prev,
.swiper-custom .swiper-button-next { color: var(--primary); }
.swiper-custom .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { background: var(--primary); }

/* ==========================================================================
   SWIPER PROGRESSBAR OVERRIDES
   The live site compiles Swiper + Tailwind in one file (Tailwind last = wins).
   Our setup loads Swiper CDN after app.css, so Swiper's
   .swiper-pagination-progressbar { position: absolute } overrides Tailwind's
   .relative { position: relative }, breaking the flex layout of slider controls.
   ========================================================================== */

/* Force progressbar to stay in flex flow inside slider controls bars */
.slider-maison-controls .swiper-pagination-progressbar,
.slider-equipe-controls .swiper-pagination-progressbar,
.slider-galerie-controls .swiper-pagination-progressbar,
.slider-materiaux-controls .swiper-pagination-progressbar,
.slider-offres-controls .swiper-pagination-progressbar,
.slider-realisation-controls .swiper-pagination-progressbar,
.slider-photos-controls .swiper-pagination-progressbar,
.slider-landing-models-controls .swiper-pagination-progressbar,
.slider-landing-tm-controls .swiper-pagination-progressbar,
.slider-landing-city-tm-controls .swiper-pagination-progressbar {
    position: relative !important;
    width: 75% !important;
    height: 3px !important;
    top: auto !important;
    left: auto !important;
}

/* Preserve background color: Swiper sets rgba(0,0,0,.25) which overrides Tailwind bg-* */
.slider-maison-controls .swiper-pagination-progressbar,
.slider-equipe-controls .swiper-pagination-progressbar {
    background-color: #fff !important;
}
.slider-galerie-controls .swiper-pagination-progressbar,
.slider-materiaux-controls .swiper-pagination-progressbar,
.slider-offres-controls .swiper-pagination-progressbar,
.slider-realisation-controls .swiper-pagination-progressbar,
.slider-photos-controls .swiper-pagination-progressbar,
.slider-landing-models-controls .swiper-pagination-progressbar,
.slider-landing-tm-controls .swiper-pagination-progressbar,
.slider-landing-city-tm-controls .swiper-pagination-progressbar {
    background-color: #d4d4d4 !important; /* grey-300 */
}

/* Fix: Swiper CDN loads after app.css, so .swiper { position: relative }
   overrides Tailwind's lg:absolute on #slider-galerie. Force it back. */
@media (min-width: 1024px) {
    #slider-galerie {
        position: absolute !important;
    }
}

/* Contact page: override [class*="col-"] leaking onto Tailwind flex-col-reverse */
#contact-info,
#form-contact {
    width: auto;
    min-height: auto;
    padding: 3rem 2rem;
}
@media (min-width: 640px) {
    #contact-info,
    #form-contact {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}
@media (min-width: 1024px) {
    #contact-info,
    #form-contact {
        padding-left: 8rem;
        padding-right: 8rem;
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}
@media (min-width: 1280px) {
    #contact-info,
    #form-contact {
        padding-left: 15rem;
        padding-right: 15rem;
    }
}
@media (min-width: 1600px) {
    #contact-info,
    #form-contact {
        padding-left: 20rem;
        padding-right: 20rem;
    }
}

/* Contact page: keep text/form above the overflowing building photo */
@media (min-width: 1024px) {
    .contact-img img {
        z-index: 1 !important;
    }
    .contact-info {
        position: relative;
        z-index: 10;
    }
}
#form-contact h2,
#form-contact .contact-form {
    position: relative !important;
    z-index: 5 !important;
}

/* Confirmation page: override bundle default colors with Barberousse branding */
.confirmation-header {
    background: var(--primary, #4d3372) !important;
}
.confirmation-recap {
    border-left-color: var(--primary, #4d3372) !important;
}
.confirmation-recap-title {
    color: var(--primary, #4d3372) !important;
}
.confirmation-btn {
    background: var(--primary, #4d3372) !important;
}
.confirmation-btn:hover {
    background: var(--primary-700, #3a2558) !important;
    box-shadow: 0 4px 12px rgba(77, 51, 114, 0.4) !important;
}

/* Progressbar fill color: primary purple */
#home-maison .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
#equipe .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
#galerie .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
#materiaux-maison .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-offres-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-realisation-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-photos-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-landing-models-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-landing-tm-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill,
.slider-landing-city-tm-controls .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    background-color: var(--primary) !important;
}

/* ==========================================================================
   FILTER BAR (ad listing pages)
   ========================================================================== */

/* Layout: 4 fields in a row, button row below */
.filter-bar #filterForm .row.align-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: center;
}
.filter-bar #filterForm .row.align-row > [class*="col-"] {
    width: 100%;
    padding: 0;
    float: none;
}
/* Button row spans full width */
.filter-bar #filterForm .row.align-row > .col-lg-12 {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 0.5rem;
}

/* Inputs & selects — !important to override jQuery UI .ui-widget rules */
.filter-bar #filterForm .form-control {
    width: 100% !important;
    height: 40px !important;
    padding: 0 0.75rem !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
    background: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-sizing: border-box !important;
    color: #333 !important;
    line-height: normal !important;
}
.filter-bar #filterForm select.form-control {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center !important;
    padding-right: 2rem !important;
    cursor: pointer;
}
.filter-bar #filterForm .form-control:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(77, 51, 114, 0.15) !important;
}
.filter-bar #filterForm .shop-filter { margin: 0; }

/* Chosen overrides — match the input style */
.filter-bar .chosen-container {
    width: 100% !important;
}
.filter-bar .chosen-container-single .chosen-single {
    height: 40px !important;
    line-height: 38px !important;
    padding: 0 0 0 0.75rem !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #333 !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
}
.filter-bar .chosen-container-single .chosen-single span {
    line-height: 38px;
}
.filter-bar .chosen-container-single .chosen-single div {
    width: 30px;
    top: 0;
}
.filter-bar .chosen-container-single .chosen-single div b {
    background: none !important;
}
.filter-bar .chosen-container-single .chosen-single::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #333;
    pointer-events: none;
}
.filter-bar .chosen-container-active .chosen-single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(77, 51, 114, 0.15) !important;
}
.filter-bar .chosen-container .chosen-drop {
    border: 1px solid #d4d4d4;
    border-top: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.filter-bar .chosen-container .chosen-results li.highlighted {
    background: var(--primary) !important;
    background-image: none !important;
    color: #fff;
}

/* Also style sortby Chosen widget */
.sort-field-wrapper .chosen-container {
    width: 100% !important;
}
.sort-field-wrapper .chosen-container-single .chosen-single {
    height: 36px !important;
    line-height: 34px !important;
    padding: 0 0 0 0.5rem !important;
    border: 1px solid #d4d4d4 !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #333 !important;
    font-size: 0.85rem !important;
    font-family: inherit !important;
}
.sort-field-wrapper .chosen-container-single .chosen-single span {
    line-height: 34px;
}
.sort-field-wrapper .chosen-container-single .chosen-single div b {
    background: none !important;
}
.sort-field-wrapper .chosen-container-single .chosen-single::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #333;
    pointer-events: none;
}
.sort-field-wrapper .chosen-container .chosen-results li.highlighted {
    background: var(--primary) !important;
    background-image: none !important;
}

/* Range sliders: vertically centered like the inputs */
.filter-bar #filterForm .price_filter { padding: 0; }
.filter-bar #filterForm .price_filter .col-xs-12 { padding: 0; width: 100%; }
.filter-bar #filterForm .price_filter p {
    font-size: 0.8rem;
    margin: 4px 0 0;
    color: #666;
    text-align: center;
    white-space: nowrap;
}
.filter-bar #filterForm .price_filter .text-center { text-align: center; }

/* Submit button — centered, purple */
.filter-bar #filterForm button[type="submit"] {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 0.6rem 2.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}
.filter-bar #filterForm button[type="submit"]:hover {
    background-color: #3a2558;
}
.filter-bar #filterForm a small {
    color: var(--primary);
    text-decoration: underline;
    font-size: 0.8rem;
}

/* Sort field */
.sort-field-wrapper {
    max-width: 200px;
}
.sort-field-wrapper select.form-control {
    width: 100%;
    height: 36px;
    padding: 0 2rem 0 0.5rem;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

/* jQuery UI range sliders */
.filter-bar .ui-slider {
    position: relative;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    margin: 10px 0 4px;
}
.filter-bar .ui-slider .ui-slider-range {
    position: absolute;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}
.filter-bar .ui-slider .ui-slider-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    top: -6px;
    margin-left: -9px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    outline: none;
}

/* Model filter: only 2 fields, use 2-column grid */
.filter-bar #filterForm[data-model-min-bedroom-number] .row.align-row {
    grid-template-columns: 1fr 1fr;
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
    .filter-bar #filterForm .row.align-row {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 479px) {
    .filter-bar #filterForm .row.align-row {
        grid-template-columns: 1fr;
    }
    .filter-bar #filterForm[data-model-min-bedroom-number] .row.align-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FOOTER LINKS
   ========================================================================== */

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--primary-100);
}

/* ==========================================================================
   MODEL SINGLE PAGE (version table, characteristics)
   ========================================================================== */

#version-table tr.active {
    background-color: var(--grey-100);
}
#version-table tr.active td {
    font-weight: bold;
}

/* ==========================================================================
   LEGACY RESPONSIVE (for dynamic views)
   ========================================================================== */

@media screen and (max-width: 1199px) {
    .property-row .property-img { min-height: 240px; }
    .property-row .property-title { padding-bottom: 11px; margin-bottom: 11px; }
    .property-row .property-text, .agent-row .agent-text { margin-top: 16px; font-size: 12px; }
    .property-row .property-details { font-size: 13px; }
    .property-row .property-footer { padding: 0 0 0 37%; }
}

@media screen and (max-width: 990px) {
    .properties.featured .property { width: 50%; }
    .property-row .property-img { min-height: 185px; }
    .property-row .property-title h4 { margin-bottom: 5px; }
    .property-row .property-address { font-size: 14px; }
    .property-row .property-text, .agent-row .agent-text {
        margin-top: 10px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .agent-row .agent-img { min-height: 230px; max-height: 230px; }
    .agent-row .agent-content { min-height: 230px; }
    .sidebar, .sidebar-left { padding-left: 15px; padding-right: 15px; }
}

@media only screen and (max-width: 767px) {
    .filter-item, .filter-item-7 { width: 47% !important; margin-right: 5% !important; }
    .filter-item:nth-child(2n), .filter-item-7:nth-child(2n) { margin-right: 0 !important; }
    .property-row .property-img, .agent-row .agent-img { float: none; display: block; width: 100%; min-height: auto; max-height: 100%; }
    .property-row .property-content, .agent-row .agent-content { float: none; width: 100%; }
    .property-row .property-title { margin-bottom: 15px; }
    .property-row .property-title h4 { white-space: normal; margin-bottom: 10px; }
    .property-row .property-text, .agent-row .agent-text { font-size: 13px; white-space: normal; }
    .property-row .property-footer { position: relative; padding: 0 0 0 18px; }
    .property-gallery.full-width .property-gallery-pager a { max-height: 70px; }
    .agent-single .agent-img, .agent-single .agent-content, .agent-single .agent-form { margin: 0; float: none; width: 100%; }
}

@media only screen and (max-width: 589px) {
    .filter .ui-tabs .ui-tabs-nav .ui-tabs-anchor { font-size: 13px; padding: 16px 0; min-width: 80px; }
    .filter-item, .filter-item-7 { width: 100% !important; margin-right: 0; }
    .properties.featured .property { width: 100%; }
    .property-price-single { float: none; text-align: left; margin-bottom: 20px; }
    .property-single-tags .property-type { float: none; margin-top: 20px; }
    .amenities-list { columns: 2; }
}

@media only screen and (max-width: 480px) {
    .property-count { display: block; float: none; width: 100%; margin-bottom: 20px; }
    .property-layout-toggle { float: left; }
    .amenities-list { columns: 1; }
}
