/* ====================================================================
   S-Immo — styles spécifiques au site (au-dessus de la charte legacy
   bootstrap.css + template.css + jea.css). Valeurs validées sur le live.
   ==================================================================== */

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 15px; }

/* ---- Header / navigation ---- */
.s-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; flex-wrap: wrap; }
.s-logo img { height: 54px; }
.s-nav a { color: #fff; font-weight: 600; font-size: 12px; text-transform: uppercase; padding: 8px 12px; display: inline-block; text-decoration: none; border-bottom: 2px solid transparent; }
.s-nav a:hover, .s-nav a.active { color: #a68321; }
.s-nav a.active { border-bottom-color: #a68321; }
.s-page-title { display: none; }

/* Header collant au scroll en desktop — le menu suit le défilement (la home le surcharge en fixed/transparent) */
@media (min-width: 821px) {
    .bd-headerarea-1 { position: sticky; top: 0; z-index: 200; background: #000; }
}

.s-content { padding: 18px 15px 40px; }
/* Le thème legacy indente le texte de 20px (mais pas les formulaires ni les grilles) → désalignement.
   On aligne titres/paragraphes au bord du contenu, comme les formulaires et les colonnes. */
.s-content > h1, .s-content > h2, .s-content > h3, .s-content > h4, .s-content > h5,
.s-content > p, .s-content > ul, .s-content > ol, .s-content > hr,
.s-content form h2, .s-content form h3, .s-content form h4, .s-content form p {
    margin-left: 0 !important; margin-right: 0 !important;
}

/* ---- Barre de recherche (listing) ---- */
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 28px;
    background: #161616; border: 1px solid #262626; padding: 12px; border-radius: 12px; }
.searchbar select, .searchbar input { height: 44px; border: 1px solid #d6d6d6; background: #fff; color: #2a2a2a;
    padding: 0 13px; border-radius: 9px; font-size: 14px; -webkit-appearance: none; appearance: none; outline: none;
    transition: border-color .15s, box-shadow .15s; }
.searchbar select:focus, .searchbar input:focus { border-color: #a68321; box-shadow: 0 0 0 3px rgba(166,131,33,.18); }
.searchbar select { min-width: 190px; flex: 1; cursor: pointer; padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; }
.searchbar input { flex: 1; min-width: 110px; }
.searchbar input::placeholder { color: #9a9a9a; }
.searchbar .btn-rech { height: 44px; background: #a68321; color: #fff; border: 0; padding: 0 30px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .6px; cursor: pointer; border-radius: 9px; transition: background .15s; }
.searchbar .btn-rech:hover { background: #c1982b; }
@media (max-width: 680px) {
    .searchbar { gap: 8px; }
    .searchbar select, .searchbar input { flex: 1 1 calc(50% - 4px); width: auto; min-width: 0; }
    .searchbar .btn-rech { flex: 1 1 100%; width: 100%; min-width: 0; }
}

/* ---- Cartes de biens (listing) ---- */
.jea-card { margin-bottom: 26px; }
.jea-card .head { border-top: 1px solid #00FFFF; padding-top: 6px; }
.jea-card h5 { margin: 6px 0; }
.jea-card h5 .price { font-weight: 700; }
.jea-card .photo { position: relative; display: block; width: 100%; background: #16181b; }
.jea-card .photo img.main { width: 100%; height: 215px; object-fit: cover; display: block; }
/* Fondu doux des photos au lazy-load (actif seulement si le JS a posé .imgs-fade ; sinon images visibles) */
.jea-items.imgs-fade .jea-card img.main { opacity: 0; transition: opacity .45s ease; }
.jea-items.imgs-fade .jea-card img.main.is-loaded { opacity: 1; }
.jea-card .statut { position: absolute; left: -4px; top: -4px; width: 150px; height: 106px; background-repeat: no-repeat; background-size: contain; z-index: 2; }
.jea-card .peb { position: absolute; right: 8px; top: 8px; height: 48px; z-index: 3; }
.jea-card .vid-badge { position: absolute; right: 10px; bottom: 8px; z-index: 3; width: 54px; height: 54px; }
.jea-card .v360-badge { position: absolute; left: 10px; bottom: 8px; z-index: 3; width: 54px; height: 54px; }
.jea-card .title { display: block; margin: 8px 0 2px; }
.jea-card .meta { color: #fff; font-size: 13px; }
.jea-card .meta img { height: 20px; vertical-align: middle; }

/* Pagination : reprendre l'or des boutons (#a68321) au lieu du bleu Bootstrap */
.pagination > li > a, .pagination > li > span { color: #a68321; }
.pagination > li > a:hover, .pagination > li > a:focus { background-color: #f5edd4; border-color: #ddd; color: #8a6d1c; }
.pagination > .active > a, .pagination > .active > span,
.pagination > .active > a:hover, .pagination > .active > span:hover,
.pagination > .active > a:focus, .pagination > .active > span:focus { background-color: #a68321; border-color: #a68321; color: #fff; }

/* Grille des biens : rangées nettes même si une carte est plus haute (évite l'effet escalier des flottants) */
@media (min-width: 992px) { .jea-items .row > [class*="col-"]:nth-child(3n+1) { clear: left; } }
@media (min-width: 768px) and (max-width: 991px) { .jea-items .row > [class*="col-"]:nth-child(2n+1) { clear: left; } }

/* ---- Fiche bien ---- */
.fiche h3 { border-bottom: 1px solid #333; padding-bottom: 6px; margin-top: 22px; }
.fiche .col-xs-6 { padding: 4px 8px; }
.fiche-tech .row { border-bottom: 1px solid #1c1c1c; }
.thumbs img { object-fit: cover; height: 84px; width: 100%; margin-bottom: 8px; cursor: pointer; }
/* Mobile : marge entre la photo principale et la grille de vignettes (colonnes empilées) */
@media (max-width: 991px) { .fiche .thumbs { margin-top: 12px; } }
.main-photo { position: relative; }
.marquee-statut { position: absolute; left: -6px; top: -6px; width: 197px; height: 140px; background-repeat: no-repeat; z-index: 2; }
.price-strong { color: #fff; font-weight: bold; }

/* Formulaire de contact (repris de jea.css, fond sombre) */
#jea-contact-form dt { clear: both; padding: 4px 0 0; color: #cfcfcf; font-size: 13px; }
#jea-contact-form dd { clear: both; padding: 3px 0 9px; margin: 0; }
#jea-contact-form input[type=text], #jea-contact-form input[type=email],
#jea-contact-form input[type=tel], #jea-contact-form textarea {
    width: 100% !important; max-width: 100% !important; box-sizing: border-box; background: #161616;
    border: 1px solid #3a3a3a; border-radius: 8px; color: #eee; padding: 11px 12px; font-size: 14px; outline: none;
    transition: border-color .15s; }
#jea-contact-form input[type=text]:focus, #jea-contact-form input[type=email]:focus,
#jea-contact-form input[type=tel]:focus, #jea-contact-form textarea:focus { border-color: #a68321; }
#jea-contact-form input[type=checkbox] { width: auto !important; margin-right: 8px; vertical-align: -1px; }
#jea-contact-form input[type=submit], #jea-contact-form button {
    background: #a68321; color: #fff; border: 0; border-radius: 8px; padding: 12px 36px; font-size: 14px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; transition: background .15s; }
#jea-contact-form input[type=submit]:hover, #jea-contact-form button:hover { background: #c1982b; }

/* ---- Formulaires des pages statiques (recrutement, évaluation, contact) ---- */
.s-content .form-control { width: 100%; box-sizing: border-box; background: #161616; border: 1px solid #3a3a3a;
    border-radius: 8px; color: #eee; padding: 11px 12px; font-size: 14px; line-height: 1.3; height: auto; outline: none;
    transition: border-color .15s, box-shadow .15s; }
.s-content .form-control:focus { border-color: #a68321; box-shadow: 0 0 0 3px rgba(166,131,33,.15); }
.s-content .form-control::placeholder { color: #9a9a9a; }
/* le bootstrap legacy fixe input[...]=206px : on force la largeur pour remplir la colonne */
.s-content form input.form-control, .s-content form select.form-control,
.s-content form textarea.form-control { width: 100% !important; max-width: 100%; }
.s-content select.form-control { -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; }
.s-content input[type=file].form-control { padding: 8px 12px; line-height: 1.6; }
.s-content .form-group { margin-bottom: 15px; }
.s-content .form-group > label { display: block; margin-bottom: 5px; color: #cfcfcf; font-size: 13px; }
.s-content .text-danger { color: #d9534f; }
.s-content .checkbox { margin: 12px 0; }
.s-content .checkbox label { font-weight: 400; color: #bbb; font-size: 13px; }
.s-content .checkbox input { width: auto !important; max-width: none; margin: 0 7px 0 0; vertical-align: -1px;
    position: static; float: none; }
.s-content .checkbox label { padding-left: 0; }
.s-content form .btn-primary, .s-content form .btn { display: inline-block; background: #a68321; color: #fff;
    border: 0; border-radius: 8px; padding: 12px 36px; font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; cursor: pointer; transition: background .15s; }
.s-content form .btn-primary:hover, .s-content form .btn:hover { background: #c1982b; color: #fff; }
/* Mobile : champs plus compacts + 2 par ligne (le champ seul en fin de ligne repasse pleine largeur) */
@media (max-width: 680px) {
    .s-content .form-control { padding: 8px 10px; font-size: 13px; border-radius: 7px; }
    .s-content .form-group { margin-bottom: 9px; }
    .s-content .form-group > label { font-size: 12px; margin-bottom: 3px; }
    .s-content form .row { display: flex; flex-wrap: wrap; }
    .s-content form .row > [class*="col-"] { width: 50%; float: none; }
    .s-content form .row > [class*="col-"]:last-child:nth-child(odd) { width: 100%; }
    .s-content form .btn-primary, .s-content form .btn { width: 100%; padding: 12px; }
}

/* ---- Gestion locative (cartes image) ---- */
.gestion-locative { margin-top: 24px; display: flex; flex-wrap: wrap; }
.gestion-locative > [class*="col-"] { display: flex; margin-bottom: 18px; }
.gl-card { position: relative; width: 100%; min-height: 250px; border-radius: 10px; overflow: hidden;
    background-size: cover; background-position: center; padding: 22px;
    display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.gl-card::before { content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.8)); transition: background .2s; }
.gl-card:hover::before { background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.88)); }
.gl-card > * { position: relative; z-index: 1; }
.gl-card h3 { color: #fff; font-weight: 600; font-size: 18px; margin: 0 0 10px; line-height: 1.3; border: 0; padding: 0; }
.gl-card p { color: #e4e4e4; font-size: 13.5px; line-height: 1.6; margin: 0; }
.gl-card strong { color: #e8c860; }

/* ---- Footer ---- */
.s-foot { padding: 26px 0 34px; font-size: 13px; }
.footer-reviews { max-width: 980px; margin: 0 auto 26px; }
.footer-reviews .rev-head { text-align: center; color: #fff; font-size: 16px; margin-bottom: 16px; font-weight: 600; }
.footer-reviews .review { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid #4a4a4a; padding: 10px 0; }
.footer-reviews .rev-ava { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.footer-reviews .stars { color: #f5b50a; letter-spacing: 2px; font-size: 13px; }
.footer-reviews .review p { margin: 3px 0; color: #bbb; font-size: 13px; line-height: 1.45; }
.footer-reviews .rev-meta { color: #8a8a8a; font-size: 12px; }
.footer-coords { text-align: center; color: #999; }
.footer-coords a { color: #2da0ce; }
.footer-coords .legal { font-size: 11px; color: #777; max-width: 820px; margin: 12px auto; line-height: 1.5; }
.footer-menu { margin-top: 10px; }
.footer-menu a { color: #999; padding: 0 8px; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.footer-menu a:hover { color: #a68321; }

/* ---- Finitions ---- */
/* Titres de page (pages statiques & contenu) cohérents avec la charte */
.s-content > h2, .fiche > h3 { color: #fff; font-weight: 300; }
@media (max-width: 680px) { .s-content > h2 { font-size: 24px; line-height: 1.25; } }
.s-content h3 { color: #fff; }
/* Icônes du template : media.css les bascule à tort en 'IcoMoon' (glyphes vides) ;
   on rétablit 'Billion Web Font' (déjà chargée, bons glyphes) comme sur l'ancien site. */
[class^="icon-"]:before, [class*=" icon-"]:before { font-family: 'Billion Web Font' !important; }

/* Menu mobile (hamburger) */
.s-nav-toggle { display: none; -webkit-appearance: none; appearance: none; background: transparent;
    border: 1px solid rgba(255,255,255,.25); border-radius: 9px; color: #fff; font-size: 22px; line-height: 1;
    cursor: pointer; padding: 7px 13px; transition: border-color .15s, color .15s; }
.s-nav-toggle:hover, .s-nav-toggle:focus { border-color: #a68321; color: #a68321; outline: none; }
@media (max-width: 820px) {
    .s-header-inner { flex-wrap: wrap; }
    .s-logo { flex: 0 0 auto; }
    .s-logo img { height: 44px; }
    .s-page-title { display: block; flex: 1 1 auto; min-width: 0; text-align: center; color: #fff;
        font-weight: 300; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
    .s-nav-toggle { display: block; }
    .page-h-dup { display: none; } /* titre déjà affiché dans le header sur mobile */
    .s-nav { display: none; flex-basis: 100%; width: 100%; order: 3; margin-top: 12px; padding-top: 4px;
        border-top: 1px solid #2a2a2a; }
    .s-nav.open { display: block; }
    .s-nav a { display: block; padding: 14px 6px; border-bottom: 1px solid #1a1a1a; font-size: 14px; }
    .s-nav a:last-child { border-bottom: 0; }
}

/* Lightbox galerie fiche bien */
.lb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999; }
.lb-overlay.open { display: flex; align-items: center; justify-content: center; }
.lb-overlay img { max-width: 92%; max-height: 88%; object-fit: contain; box-shadow: 0 0 40px rgba(0,0,0,.6); }
.lb-overlay .lb-close, .lb-overlay .lb-prev, .lb-overlay .lb-next { position: absolute; color: #fff; font-size: 42px; cursor: pointer; user-select: none; padding: 10px 20px; opacity: .8; }
.lb-overlay .lb-close { top: 6px; right: 14px; }
.lb-overlay .lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-overlay .lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lb-overlay .lb-prev:hover, .lb-overlay .lb-next:hover, .lb-overlay .lb-close:hover { opacity: 1; }
.main-photo, .thumbs img { cursor: zoom-in; }
