/* ============================================================
   L'Immo by Ivey — styles des biens (single + archive)
   Version propre pour GeneratePress. Variables préfixées --iv-.
   ============================================================ */

/* RESET anti-chevauchement : on force toutes nos sections et leurs
   blocs à rester en flux normal (au cas où un CSS résiduel impose
   position:absolute). */
/* GeneratePress met #content en flex : on force l'empilement vertical
   pour que nos sections (galerie, contenu, 3D) se suivent de haut en bas. */
.single-bien #content,
.post-type-archive-bien #content{display:block !important}
.single-bien .site-content,
.post-type-archive-bien .site-content{display:block !important}
.single-bien #primary,
.single-bien .content-area,
.post-type-archive-bien #primary,
.post-type-archive-bien .content-area{width:100% !important;max-width:100% !important;float:none !important}
.ivey-bien,
.ivey-bien section,
.ivey-bien .iv-wrap,
.ivey-bien .bien-layout,
.ivey-bien .bien-main,
.ivey-bien .bien-aside,
.ivey-bien .gallery-grid,
.ivey-archive,
.ivey-archive section,
.ivey-archive .iv-wrap{
  position:relative;
  float:none;
}
.ivey-bien section,.ivey-archive section{display:block;width:100%;clear:both}
:root{--iv-navy:#1b2a4a;--iv-navy-deep:#16223b;--iv-bordeaux:#7a3348;--iv-bordeaux-doux:#a86878;--iv-bordeaux-pale:#edd8dc;--iv-lin:#e8dece;--iv-cream:#f5f0e8;--iv-cream-warm:#faf7f2;--iv-sand:#e0d5c2;--iv-gold:#7a3348;--iv-ink:#424e69;--iv-muted:#757d90;--iv-line:rgba(27,42,74,.14);--iv-serif:'Cormorant Garamond',Georgia,serif;--iv-sans:'Montserrat',system-ui,-apple-system,sans-serif;}

/* Fond crème sur les pages de biens */
body.single-bien,
body.post-type-archive-bien{background:var(--iv-cream)}

/* Conteneur interne (centré, 1200px) */
.ivey-bien .iv-wrap,.ivey-archive .iv-wrap{max-width:1200px;margin:0 auto;padding:0 24px;box-sizing:border-box}
.ivey-bien .section,.ivey-archive .section{padding:44px 0}
.ivey-bien .eyebrow,.ivey-archive .eyebrow{font-size:.72rem;letter-spacing:.28em;text-transform:uppercase;color:var(--iv-bordeaux);font-weight:600}
.ivey-bien h1,.ivey-bien h2,.ivey-archive h1,.ivey-archive h2{font-family:var(--iv-serif);color:var(--iv-navy);line-height:1.15}
.ivey-bien .btn,.ivey-archive .btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;font-family:var(--iv-sans);font-weight:600;font-size:.95rem;padding:15px 30px;border-radius:40px;cursor:pointer;border:none}
.ivey-bien .btn-primary,.ivey-archive .btn-primary{background:var(--iv-bordeaux);color:#fff}

/* ---- Galerie mosaïque ---- */
.ivey-bien.gallery{padding:24px 0;width:100%;display:block;clear:both;float:none}
.ivey-bien.gallery .iv-wrap{max-width:1200px;margin:0 auto;padding:0 24px;width:100%;box-sizing:border-box}
.ivey-bien .gallery-grid{display:grid !important;grid-template-columns:2fr 1fr !important;gap:12px;height:460px;width:100%;float:none}
.ivey-bien .g-main{border-radius:12px;overflow:hidden;position:relative;background:linear-gradient(160deg,#dfe4e8,#c9d0d6)}
.ivey-bien .g-main > a{display:block;width:100%;height:100%}
.ivey-bien .g-main img{width:100%;height:100%;object-fit:cover;display:block}
.ivey-bien .g-side{display:grid;grid-template-rows:1fr 1fr;gap:12px;min-height:0}
.ivey-bien .g-side > a{display:block;width:100%;height:100%;min-height:0;border-radius:12px;overflow:hidden;position:relative;background:linear-gradient(160deg,#e3e8ec,#ccd3d9)}
.ivey-bien .g-side > a[style*="display:none"]{display:none !important}
.ivey-bien .g-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.ivey-bien .g-more{position:absolute;inset:0;background:rgba(28,43,58,.55);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1rem;font-weight:600;letter-spacing:.02em}
.ivey-bien .g-tags{position:absolute;top:16px;left:16px;display:flex;gap:8px;z-index:2}
.ivey-bien .tag-badge{background:var(--iv-navy);color:#fff;font-size:.7rem;padding:6px 13px;border-radius:16px;letter-spacing:.08em;text-transform:uppercase;font-weight:600}
.ivey-bien .tag-badge.or{background:var(--iv-bordeaux)}
.ivey-bien .g-ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--iv-muted);font-size:.85rem;letter-spacing:.14em;text-transform:uppercase}

/* Layout fiche : contenu + aside côte à côte */
.ivey-bien .bien-layout{display:flex;gap:44px;align-items:flex-start}
.ivey-bien .bien-main{flex:1 1 auto;min-width:0}
.ivey-bien .bien-aside{flex:0 0 360px;position:sticky;top:40px;align-self:start}
.ivey-bien .bien-price{font-family:var(--iv-serif);font-size:1.9rem;color:var(--iv-bordeaux);font-weight:600;margin-bottom:10px}

/* Caractéristiques */
.ivey-bien .carac-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--iv-line);border:1px solid var(--iv-line);border-radius:14px;overflow:hidden}
.ivey-bien .carac-item{background:#fff;padding:16px 18px;display:flex;flex-direction:column;gap:3px}
.ivey-bien .carac-lab{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--iv-muted)}
.ivey-bien .carac-val{font-weight:600;color:var(--iv-navy);font-size:1rem}

/* DPE / GES */
.ivey-bien .dpe-block{display:flex;flex-direction:column;gap:14px}
.ivey-bien .dpe-scale{display:flex;align-items:center;gap:14px}
.ivey-bien .dpe-label{font-weight:600;color:var(--iv-navy);width:40px}
.ivey-bien .dpe-bars{display:flex;gap:4px;flex-wrap:wrap}
.ivey-bien .dpe-b{width:34px;height:34px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:600;background:var(--iv-cream-warm);color:var(--iv-muted);opacity:.5}
.ivey-bien .dpe-b.active{opacity:1;color:#fff;transform:scale(1.12)}
.ivey-bien .dpe-b[data-g="A"].active{background:#2b9348}
.ivey-bien .dpe-b[data-g="B"].active{background:#55a630}
.ivey-bien .dpe-b[data-g="C"].active{background:#aacc00}
.ivey-bien .dpe-b[data-g="D"].active{background:#ffd60a;color:var(--iv-navy)}
.ivey-bien .dpe-b[data-g="E"].active{background:#ff9e00}
.ivey-bien .dpe-b[data-g="F"].active{background:#ff6d00}
.ivey-bien .dpe-b[data-g="G"].active{background:#e01e37}

/* Contact sticky */
.ivey-bien .bien-card{background:#fff;border:1px solid var(--iv-line);border-radius:18px;padding:28px;box-shadow:0 10px 30px rgba(28,43,58,.08)}
.ivey-bien .bien-card .field{margin-bottom:14px}
.ivey-bien .bien-card .field input,.ivey-bien .bien-card .field textarea{width:100%;padding:12px 15px;border-radius:10px;border:1px solid var(--iv-line);background:var(--iv-cream);font-family:var(--iv-sans);font-size:.92rem;resize:vertical}

/* Matterport */
.ivey-bien .matterport-frame{position:relative;width:100%;aspect-ratio:16/9;border-radius:18px;overflow:hidden;background:var(--iv-navy)}
.ivey-bien .matterport-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Archive (catalogue) */
.ivey-archive .props{display:grid;grid-template-columns:repeat(3,1fr);gap:26px}
.ivey-archive .prop-card{background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 8px 26px rgba(28,43,58,.07);transition:transform .25s ease;display:block;color:inherit;text-decoration:none}
.ivey-archive .prop-card:hover{transform:translateY(-6px)}
.ivey-archive .prop-img{position:relative;height:220px}
.ivey-archive .prop-img img{width:100%;height:100%;object-fit:cover}
.ivey-archive .prop-img .ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--iv-cream-warm),var(--iv-sand));color:var(--iv-muted);font-size:.75rem;letter-spacing:.14em;text-transform:uppercase}
.ivey-archive .prop-price{position:absolute;bottom:14px;left:14px;background:#fff;color:var(--iv-navy);font-weight:700;font-size:1.05rem;padding:7px 16px;border-radius:24px;box-shadow:0 4px 14px rgba(0,0,0,.12)}
.ivey-archive .prop-tag{position:absolute;top:14px;right:14px;background:var(--iv-bordeaux);color:#fff;font-size:.64rem;letter-spacing:.14em;text-transform:uppercase;padding:6px 13px;border-radius:16px;font-weight:600}
.ivey-archive .prop-body{padding:22px 24px 26px}
.ivey-archive .prop-body .loc{font-size:.74rem;letter-spacing:.14em;text-transform:uppercase;color:var(--iv-gold);font-weight:600;margin-bottom:8px}
.ivey-archive .prop-body h3{font-family:var(--iv-serif);font-weight:700;color:var(--iv-navy);font-size:1.25rem;margin-bottom:14px}
.ivey-archive .prop-specs{display:flex;gap:18px;font-size:.86rem;color:var(--iv-muted);border-top:1px solid var(--iv-line);padding-top:14px}

/* Filtres archive */
.ivey-archive .filters{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:0 auto 28px;max-width:800px}
.ivey-archive .chip{font-size:.85rem;font-weight:500;padding:9px 20px;border-radius:24px;border:1px solid var(--iv-line);background:#fff;color:var(--iv-navy);cursor:pointer;transition:all .2s}
.ivey-archive .chip.active,.ivey-archive .chip:hover{background:var(--iv-bordeaux);color:#fff;border-color:var(--iv-bordeaux)}

/* Galerie native WordPress dans le contenu */
.ivey-bien .bien-gallery-native img{border-radius:12px}

@media(max-width:980px){
  .ivey-bien .bien-layout{flex-direction:column}
  .ivey-bien .bien-aside{position:static;flex:1 1 auto;width:100%}
  .ivey-bien .carac-grid{grid-template-columns:repeat(2,1fr)}
  .ivey-archive .props{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .ivey-bien .gallery-grid{grid-template-columns:1fr;height:auto}
  .ivey-bien .g-main{height:280px}
  .ivey-bien .g-side{grid-template-rows:none;grid-template-columns:1fr 1fr;height:140px}
  .ivey-bien .carac-grid{grid-template-columns:1fr 1fr}
  .ivey-archive .props{grid-template-columns:1fr}
}

/* CTA avant-premiere sur l'archive Acheter */
.ivey-archive .iv-avant-premiere{background:var(--iv-navy);border-radius:22px;padding:44px 48px;display:grid;grid-template-columns:1.4fr 1fr;gap:40px;align-items:center;margin-top:20px}
.ivey-archive .iv-avant-premiere h2{font-family:var(--iv-serif);font-size:2.1rem;margin:12px 0 12px;color:#fff}
.ivey-archive .iv-ap-form{display:flex;flex-direction:column;gap:12px}
.ivey-archive .iv-ap-form input{padding:15px 20px;border-radius:30px;border:none;font-family:var(--iv-sans);font-size:.95rem}
.ivey-archive .iv-ap-form .btn{width:100%;justify-content:center}
@media(max-width:900px){.ivey-archive .iv-avant-premiere{grid-template-columns:1fr;padding:32px}}
