body {
    background-color: skyblue;
    font-family: Inter;
    margin: 0!important;
}
body *{
    font-family: Inter;

}
body .login-box,
body .register-box{
    width: 600px;
    margin: 30px auto;
}
.nav-tabs-sm .nav-link {
    padding: .25rem .75rem;
    font-size: 0.875rem;
}
.nav-tabs-sm {
    background: #f9f9f9;
    border-radius: .25rem;
}
body label:not(.form-check-label):not(.custom-file-label)
{
    font-weight: 500;
    font-size: 12px;
}
.nav-item{
    font-size: 15px;
}
.nav-treeview .nav-item{
    font-size: 13px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
    color: black!important;
}
.nav-treeview :is(.fas,.far,.fab,.fa-solid,.fa-regular,.fa-brands,.fa-classic,.fa):before{
    font-size: 15px;
}
.select2-container .select2-selection--single{
    border: 1px solid #aaa;
    border-radius: 4px;
}

body .row-grid > [class*="col-"] { display: flex; }
body .img-card { position: relative; width: 100%; overflow: hidden; }
body .img-card .img-thumb { width: 100%; height: 180px; object-fit: contain; display: block; }
body .img-card.dense .img-thumb { height: 130px; }
body .img-actions {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: rgba(255,255,255,.92); border-radius: .25rem;
}
body .drag-handle { cursor: move; }
body .cover-badge { position: absolute; left: 8px; top: 8px; z-index: 2; }
body .sortable-ghost { opacity: .6; }
/* skeleton pour lazy-load */
.thumb-skel { background: linear-gradient(90deg, #f1f2f6 25%, #e6e8ec 37%, #f1f2f6 63%); background-size: 400% 100%; animation: skel 1.2s ease infinite; }
@keyframes skel { 0%{background-position: 100% 50%} 100%{background-position: 0 50%} }
body .select2-container .select2-selection--single{
    height: 38px;
}
.img-thumb{
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}



.chips-input { position: relative; }
.chips {
    display:flex; flex-wrap:wrap; gap:.35rem; padding:.35rem .45rem;
    border:1px solid #ced4da; border-radius:.25rem; min-height: calc(2.25rem + 2px);
    background:#fff;
}
.chips:focus-within { border-color:#80bdff; box-shadow:0 0 0 .2rem rgba(0,123,255,.25); }
.chips-text {
    border:0; outline:0; min-width:220px; flex:1 1 180px; padding:.2rem;
}
.chip {
    display:inline-flex; align-items:center; gap:.35rem;
    padding:.15rem .5rem; border-radius:999px; background:#e9f2ff; border:1px solid #cfe2ff;
    font-size:.9rem; line-height:1.2;
}
.chip i { opacity:.7; }
.chip .rm { cursor:pointer; font-weight:700; opacity:.6; }
.chip .rm:hover { opacity:1; }

.chips-dd {
    position:absolute; left:0; right:0; top:100%; margin-top:.25rem;
    background:#fff; border:1px solid rgba(0,0,0,.125); border-radius:.25rem;
    box-shadow:0 .5rem 1rem rgba(0,0,0,.15); z-index:1040; display:none; max-height:260px; overflow:auto;
}
.dd-group {
    padding:.35rem .6rem; font-weight:600; font-size:.85rem; color:#6c757d; background:#f8f9fa;
    position:sticky; top:0;
}
.dd-item {
    padding:.45rem .6rem; cursor:pointer; display:flex; align-items:center; gap:.5rem;
}
.dd-item:hover { background:#f1f3f5; }
.dd-item .sub { color:#6c757d; font-size:.85em; margin-left:auto; }
.dd-icon { width:1.1rem; text-align:center; opacity:.75; }


.col-check { width: 34px; }
.col-img   { width: 180px; }
.thumb-wrap { width: 160px; height: 100px; border-radius: .25rem; overflow: hidden; background: #f8f9fa; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-deal { font-size: .72rem; vertical-align: middle; }
.col-price { width: 160px; }
.col-meta  { width: 170px; }
.col-status{ width: 120px; }
.col-date  { width: 120px; }
.col-act   { width: 120px; }
.clickable-row { cursor: pointer; }
.no-click, .no-click * { cursor: default !important; }
.small-id { font-size: .75rem; opacity: .8; }

.table-bien tr:not(.clickable-row){
    opacity: 0.7;
}

/* mini pills qui switchent l'input d'à côté (d-none) */
.badge-toggle {
    cursor: pointer;
    user-select: none;
    font-size: .72rem;
    line-height: 1;
    padding: .35rem .5rem;
    border: 1px solid rgba(0,0,0,.075);
    background: #f8f9fa;
}
/* état actif quand l'input est coché */
.js-flag:checked + .badge-toggle {
    background: #007bff; /* bootstrap primary */
    color: #fff;
    border-color: #007bff;
}

/* carte plus compacte */
.img-card { overflow: hidden; }
.img-card .img-thumb {
    display: block;
    width: 100%;
    height: 180px;          /* ajuste à 160/180 selon ton goût */
    object-fit: cover;
}
.img-card .img-actions {
    position: absolute;
    top: .35rem;
    right: .35rem;
    z-index: 2;
}
.img-card .cover-badge {
    position: absolute;
    left: .5rem;
    top: .5rem;
    z-index: 2;
}
/* quand tu veux un mode ultra-compact, ajoute .dense sur .img-card */
.img-card.dense .img-thumb { height: 150px; }
.img-card.dense .card-body { padding: .25rem !important; }
.badge-toggle {
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(0,0,0,.08);
    padding: .25rem .5rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.badge-toggle.is-on {
    background: #007bff;
    border-color: #007bff;
    color: white;
}
.badge-toggle:not(.is-on) {
    background: #f5f7fa;
}
.badge-toggle:hover {
    filter: brightness(0.97);
}
tr.not-mine {
    opacity: 0.7;
    background-color: #f5f5f5 !important;
}
tr.not-mine:hover {
    opacity: 0.85;
    background-color: #eeeeee !important;
}
.dropdown-item{
    padding: 0!important;
}
.passerelle-7,
.passerelle-9,
.passerelle-10{
    display: none;
}
/* --- CustomSelect (remplacement Select2) --- */
.custom-select2 {
    position: relative;
    width: 220px;
}

.custom-select2-display {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    height: 30px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select2-dropdown {
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    z-index: 99999;
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

.custom-select2.open .custom-select2-dropdown {
    display: block;
}

.custom-select2-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ced4da;
    padding: 4px;
    font-size: 0.85rem;
}

.custom-select2-item {
    padding: 6px 8px;
    cursor: pointer;
}

.custom-select2-item:hover {
    background: #f0f0f0;
}
.ls-select {
    position: relative;
    cursor: pointer;
    width: 100%;
}
.ls-select .ls-display {
    padding: .35rem .5rem;
    border: 1px solid #ced4da;
    background: #fff;
    border-radius: .25rem;
}
.ls-select .ls-display.placeholder {
    color: #6c757d;
}
.ls-select .ls-dropdown {
    position: absolute;
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    max-height: 230px;
    overflow-y: auto;
    z-index: 20000;
}
.ls-item {
    padding: .35rem .5rem;
    cursor: pointer;
}
.ls-item:hover {
    background: #f1f3f5;
}
.ls-wrapper { width: 100%; }
.ls-input {
    width: 100%;
    padding: .35rem .5rem;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}
.ls-selected {
    padding: .35rem .5rem;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    background:#f1f3f5;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.ls-clear {
    cursor:pointer;
    font-weight:bold;
    padding-left:5px;
}
.ls-dropdown .ls-item {
    padding:.35rem .5rem;
    cursor:pointer;
}
.ls-dropdown .ls-item:hover {
    background:#f1f3f5;
}
#filesGrid [title="immobilier.ch"],
#filesGrid [title="Properstar.ch"],
#filesGrid [title="Flatfox"],
#filesGrid [title="Joomil.ch"],
#filesGrid [title="neu-immo.ch"],
#filesGrid [title="Urbanhome"],
#filesGrid [title="Real advisor"],
#filesGrid [title="Petites-Annonces"]{
    display: none;
}


.img-card .img-thumb-wrapper {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

.img-card .img-thumb-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity .25s;
}

.img-card .img-thumb-wrapper::after {
    content: "\f06e"; /* FontAwesome eye icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 28px;

    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: all .25s;
}

.img-card:hover .img-thumb-wrapper::before {
    opacity: 1;
}

.img-card:hover .img-thumb-wrapper::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.sidebar-bien-header {
    text-align: left;
}

.sidebar-cover {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f3f7;
    flex-shrink: 0;
}

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

.sidebar-quality {
    height: 6px;
    border-radius: 4px;
}
.bien-tooltip {
    max-width: 220px;
}

.bien-tooltip-img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin-bottom: 6px;
}

/* ===== compact files list ===== */
#gateway-files-wrap .custom-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px !important;
    padding-left: 0;
}

#gateway-files-wrap .custom-control-input {
    position: static;   /* enlève le gros décalage bootstrap */
    margin-left: 0;
    margin-right: 6px;
}

#gateway-files-wrap .gw-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    flex: 1;
    min-width: 0;       /* permet ellipsis */
}

#gateway-files-wrap .gw-ico {
    font-size: 14px;
    line-height: 1;
    opacity: .85;
}

#gateway-files-wrap .gw-name {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.2;
}

#gateway-files-wrap .gw-open {
    font-size: 12px;
    padding: 0 6px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    text-decoration: none;
    line-height: 18px;
}

#gateway-files-wrap .gw-open:hover {
    text-decoration: none;
}
