/* ==========================================================================
   ImmoDem — Système de design v5, aligné sur la charte du logo
   Couleurs relevées sur le logo :
     bleu nuit « Immo »          #0e1a2b  (texte, titres, boutons sombres)
     orange « Dem »              #e0551a  (action principale, accents rares)
     anthracite du pictogramme   #4b4a50  (surfaces sombres : pied de page, bandeaux)
     gris de la signature        #5f5f63  (texte secondaire)
     blanc
   Police : Poppins (police du logo), auto-hébergée.
   ========================================================================== */
:root{
  --ink:      #0e1a2b;   /* bleu nuit du logo (« Immo ») */
  --ink-2:    #26303f;
  --ink-3:    #4b4a50;
  --paper:    #ffffff;
  --mist:     #f3f3f4;   /* gris très clair, dérivé de l'anthracite */
  --mist-2:   #e7e7e9;
  --line:     #e0e0e3;
  --line-2:   #c8c8cd;
  --muted:    #5f5f63;   /* gris de « SE LOGER AUTREMENT » */
  --muted-2:  #8d8d92;

  --brand:      #e0551a;  /* orange du logo (« Dem ») */
  --brand-deep: #bd4411;
  --brand-ink:  #7d2d0a;
  --brand-tint: #fcebe2;
  --brand-tint2:#f5ccb6;

  /* surfaces sombres : anthracite du pictogramme */
  --forest:     #4b4a50;
  --forest-2:   #5c5b62;
  --forest-ink: #d2d1d6;

  --ok:      #2a6e4f;  --ok-tint:   #e3f0e9;
  --warn:    #9a6508;  --warn-tint: #f5ecd8;
  --danger:  #b3321f;  --danger-tint:#f7e2de;
  --info:    #33527f;  --info-tint: #e4eaf3;

  --sand: var(--mist); --sand-2: var(--mist-2);

  --r-xs: 3px; --r-sm: 6px; --r: 8px; --r-lg: 10px; --r-pill: 999px;
  --sh-1: none;
  --sh-2: 0 12px 30px -18px rgba(14,26,43,.35);
  --sh-3: 0 30px 60px -28px rgba(14,26,43,.45);

  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --sans: var(--font); --serif: var(--font);

  --wrap: 1240px;
  --wrap-narrow: 900px;
  --gut: clamp(18px, 4vw, 48px);
  --header-h: 86px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
body{
  margin:0; font-family:var(--font); font-size:15.5px; line-height:1.65;
  color:var(--ink); background:var(--paper); overflow-x:clip;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img,svg,video{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
input,select,textarea,button{ font-family:inherit; font-size:inherit; color:inherit; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ margin:0; font-weight:700; letter-spacing:-.015em; line-height:1.15; }
p{ margin:0; }
:focus-visible{ outline:2px solid var(--brand); outline-offset:3px; }
.fa-solid,.fa-regular,.fa-brands{ line-height:1; }

/* ---------- Typographie ---------- */
.display{ font-weight:700; letter-spacing:-.025em; line-height:1.08; font-size:clamp(2.2rem, 1.2rem + 3.6vw, 4rem); }
.h-xl{ font-weight:700; letter-spacing:-.02em; font-size:clamp(1.6rem,1.15rem+1.7vw,2.35rem); line-height:1.15; }
.h-lg{ font-weight:700; letter-spacing:-.015em; font-size:clamp(1.3rem,1.1rem+.9vw,1.7rem); line-height:1.2; }
/* L'ancien « sur-titre » en capitales devient une simple ligne de contexte */
.eyebrow{ display:block; font-size:.95rem; font-weight:500; color:var(--muted); letter-spacing:0; text-transform:none; margin-bottom:.35rem; }
.lede{ font-size:clamp(1.03rem,1rem+.25vw,1.15rem); color:var(--muted); line-height:1.6; max-width:58ch; }
.muted{ color:var(--muted); }
.tnum{ font-variant-numeric:tabular-nums; }
strong,b{ font-weight:700; }

/* ---------- Mise en page ---------- */
.wrap{ width:min(100% - var(--gut)*2, var(--wrap)); margin-inline:auto; }
.wrap-narrow{ width:min(100% - var(--gut)*2, var(--wrap-narrow)); margin-inline:auto; }
.section{ padding-block:clamp(56px, 7vw, 112px); }
.section-sm{ padding-block:clamp(36px, 4.5vw, 64px); }
.band-sand,.band-mist{ background:var(--mist); }
.band-ink,.band-forest{ background:var(--forest); color:#eef3ef; }
.band-ink .muted,.band-forest .muted{ color:var(--forest-ink); }
.band-tint{ background:var(--brand-tint); }
.stack > * + *{ margin-top:var(--space,1rem); }
.divider{ height:1px; background:var(--line); border:0; margin:0; }

.grid{ display:grid; gap:clamp(18px,2.2vw,32px); }
.cols-2{ grid-template-columns:repeat(2,1fr); }
.cols-3{ grid-template-columns:repeat(3,1fr); }
.cols-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:900px){ .cols-3,.cols-4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .cols-2,.cols-3,.cols-4{ grid-template-columns:1fr; } }

.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:clamp(26px,3.2vw,48px); }
.section-head .lede{ margin-top:.8rem; }
@media (max-width:640px){ .section-head{ flex-direction:column; align-items:flex-start; gap:14px; } }

/* ---------- Boutons ---------- */
.btn{
  --bh:48px;
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  height:var(--bh); padding:0 1.35rem; border:1px solid transparent; border-radius:var(--r-sm);
  font-weight:600; font-size:.97rem; white-space:nowrap; cursor:pointer; letter-spacing:-.005em;
  transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active{ transform:translateY(1px); }
.btn i{ font-size:1.05em; }
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:var(--brand-deep); }
.btn-ink{ background:var(--ink); color:#fff; }
.btn-ink:hover{ background:var(--ink-2); }
.btn-ghost{ background:transparent; border-color:var(--line-2); color:var(--ink); }
.btn-ghost:hover{ border-color:var(--ink); }
.btn-quiet{ background:var(--mist); color:var(--ink); }
.btn-quiet:hover{ background:var(--mist-2); }
.btn-onink{ background:#fff; color:var(--ink); }
.btn-onink:hover{ background:var(--mist); }
.btn-onink-ghost{ background:transparent; border-color:rgba(255,255,255,.45); color:#fff; }
.btn-onink-ghost:hover{ border-color:#fff; }
.btn-sm{ --bh:38px; padding:0 .9rem; font-size:.9rem; }
.btn-lg{ --bh:56px; padding:0 1.7rem; font-size:1.02rem; }
.btn-block{ width:100%; }
.btn-icon{ width:var(--bh); padding:0; }
.btn-danger{ background:var(--danger); color:#fff; border-color:var(--danger); }
.btn-danger:hover{ background:#8f2616; border-color:#8f2616; }
/* Lien texte : souligné, sans flèche */
.link-arrow{ display:inline-flex; align-items:center; gap:.4rem; font-weight:600; color:var(--ink);
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.28em; text-decoration-color:var(--line-2); }
.link-arrow:hover{ text-decoration-color:var(--brand); color:var(--brand-deep); }

/* ---------- Pastilles, badges, statuts ---------- */
.chip{ display:inline-flex; align-items:center; gap:.4rem; height:28px; padding:0 .7rem; border-radius:var(--r-sm);
  font-size:.82rem; font-weight:600; background:var(--mist); color:var(--ink-2); border:1px solid transparent; }
.chip-outline{ background:transparent; border-color:var(--line-2); color:var(--ink-2); }
a.chip-outline:hover{ border-color:var(--ink); color:var(--ink); }
.badge{ display:inline-flex; align-items:center; gap:.35rem; font-size:.78rem; font-weight:600; padding:.2rem .5rem; border-radius:var(--r-xs); line-height:1.3; }
.badge-verified{ background:var(--ok-tint); color:var(--ok); }
.badge-brand{ background:var(--brand-tint); color:var(--brand-ink); }
.badge-ink{ background:var(--ink); color:#fff; }
.dot{ width:7px; height:7px; border-radius:50%; display:inline-block; }
.status{ display:inline-flex; align-items:center; gap:.45rem; font-size:.84rem; font-weight:600; }
.status .dot{ flex:none; }
.st-ok .dot{ background:var(--ok); } .st-ok{ color:var(--ok); }
.st-warn .dot{ background:var(--warn); } .st-warn{ color:var(--warn); }
.st-danger .dot{ background:var(--danger); } .st-danger{ color:var(--danger); }
.st-info .dot{ background:var(--info); } .st-info{ color:var(--info); }
.st-muted .dot{ background:var(--muted-2); } .st-muted{ color:var(--muted); }

/* ---------- Formulaires ---------- */
.field > label, .lbl{ display:block; font-size:.9rem; font-weight:600; margin-bottom:.4rem; color:var(--ink); }
.hint{ font-size:.84rem; color:var(--muted); margin-top:.35rem; }
.input,.select,.textarea{ width:100%; height:48px; padding:0 .9rem; background:#fff; border:1px solid var(--line-2);
  border-radius:var(--r-sm); color:var(--ink); transition:border-color .15s ease, box-shadow .15s ease; }
.textarea{ height:auto; min-height:120px; padding:.75rem .9rem; line-height:1.55; resize:vertical; }
.input::placeholder,.textarea::placeholder{ color:var(--muted-2); }
.input:hover,.select:hover,.textarea:hover{ border-color:var(--ink-3); }
.input:focus,.select:focus,.textarea:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(14,26,43,.12); }
.select{ 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 24 24' fill='none' stroke='%230e1a2b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right .95rem center; padding-right:2.4rem; }
.input-group{ position:relative; }
.input-group .input{ padding-left:.9rem; }
.check{ display:flex; align-items:flex-start; gap:.6rem; font-size:.94rem; color:var(--ink-2); cursor:pointer; }
.check input{ width:18px; height:18px; margin-top:.2rem; accent-color:var(--ink); flex:none; }
.form-grid{ display:grid; gap:1.1rem 1.2rem; }
@media (min-width:620px){ .form-grid.two{ grid-template-columns:1fr 1fr; } .col-span-2{ grid-column:1 / -1; } }
.seg{ display:inline-flex; padding:3px; gap:2px; background:var(--mist); border-radius:var(--r-sm); max-width:100%; overflow-x:auto; scrollbar-width:none; }
.seg::-webkit-scrollbar{ display:none; }
.seg button{ flex:none; white-space:nowrap; border:0; background:transparent; height:38px; padding:0 1rem; border-radius:3px; font-weight:600; font-size:.92rem; color:var(--muted); transition:.14s; }
.seg button[aria-pressed="true"]{ background:var(--ink); color:#fff; }

/* ---------- Photo (avec repli neutre si l'image ne charge pas) ---------- */
.ph{ position:relative; background:var(--mist-2); overflow:hidden; }
.ph img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1; }
.ph img[data-broken]{ display:none; }

.flex{ display:flex; } .items-center{ align-items:center; } .items-start{ align-items:flex-start; }
.justify-between{ justify-content:space-between; } .justify-center{ justify-content:center; }
.gap-1{ gap:.6rem; } .gap-2{ gap:1rem; } .wrap-flex{ flex-wrap:wrap; }
.mt-1{ margin-top:.5rem; } .mt-2{ margin-top:1rem; } .mt-3{ margin-top:1.5rem; } .mt-4{ margin-top:2rem; }
.text-center{ text-align:center; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.amount{ font-variant-numeric:tabular-nums; font-weight:700; }
.amount.pos{ color:var(--ok); } .amount.neg{ color:var(--danger); }

/* ---------- Curseur de montant (range + saisie) ---------- */
.range{ display:block; }
.range .range-top{ display:flex; align-items:center; gap:10px; }
.range .range-out{ display:inline-flex; align-items:center; gap:.4rem; border:1px solid var(--line-2); border-radius:var(--r-sm); padding:0 .7rem; height:44px; background:#fff; min-width:0; }
.range .range-out input{ border:0; width:110px; height:100%; background:transparent; font-weight:700; font-variant-numeric:tabular-nums; }
.range .range-out input:focus{ outline:none; }
.range .range-out .u{ font-size:.82rem; color:var(--muted); font-weight:600; }
.range input[type=range]{ -webkit-appearance:none; appearance:none; width:100%; height:3px; border-radius:2px; margin:16px 0 8px;
  background:linear-gradient(var(--ink),var(--ink)) 0/var(--fill,50%) 100% no-repeat, var(--line); }
.range input[type=range]::-webkit-slider-thumb{ -webkit-appearance:none; width:18px; height:18px; border-radius:50%; background:#fff; border:2px solid var(--ink); cursor:pointer; }
.range input[type=range]::-moz-range-thumb{ width:18px; height:18px; border-radius:50%; background:#fff; border:2px solid var(--ink); cursor:pointer; }
.range .range-scale{ display:flex; justify-content:space-between; font-size:.8rem; color:var(--muted-2); }

/* ---------- Modale ---------- */
.modal-backdrop{ position:fixed; inset:0; z-index:100; background:rgba(14,26,43,.6); display:grid; place-items:center; padding:20px; opacity:0; pointer-events:none; transition:opacity .2s ease; }
.modal-backdrop.open{ opacity:1; pointer-events:auto; }
.modal{ background:#fff; border-radius:var(--r-lg); box-shadow:var(--sh-3); width:min(100%,540px); max-height:90vh; overflow:auto; }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--line); }
.modal-head h3{ font-weight:700; font-size:1.2rem; }
.modal-close{ width:40px; height:40px; border-radius:var(--r-sm); border:0; background:transparent; display:grid; place-items:center; color:var(--ink); font-size:1.15rem; }
.modal-close:hover{ background:var(--mist); }
.modal-body{ padding:24px; }
.modal-foot{ padding:18px 24px; border-top:1px solid var(--line); display:flex; gap:12px; justify-content:flex-end; }

/* ---------- Onglets ---------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); overflow-x:auto; }
.tabs button{ border:0; background:transparent; padding:.85rem 1rem; font-weight:600; color:var(--muted); white-space:nowrap; border-bottom:2px solid transparent; margin-bottom:-1px; display:flex; align-items:center; gap:.4rem; }
.tabs button[aria-selected="true"]{ color:var(--ink); border-bottom-color:var(--ink); }
.tabs button:hover{ color:var(--ink); }
.tabpanel{ padding-top:22px; }
.tabpanel[hidden]{ display:none; }

/* ---------- Consentement aux cookies ---------- */
.cookie-banner{ position:fixed; left:16px; right:16px; bottom:16px; max-width:600px; margin:0 auto; background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-3); z-index:90; opacity:0; transform:translateY(14px); pointer-events:none; transition:opacity .25s ease, transform .25s ease; overflow:hidden; }
.cookie-banner.open{ opacity:1; transform:none; pointer-events:auto; }
.cookie-banner .cookie-tabs{ padding:0 14px; }
.cookie-banner .cookie-tabs button{ padding:.8rem .6rem; font-size:.9rem; }
.cookie-body{ padding:18px 22px 20px; max-height:min(60vh,420px); overflow:auto; }
.cookie-body h3{ font-size:1.1rem; margin-bottom:8px; }
.cookie-body p{ color:var(--muted); font-size:.92rem; line-height:1.6; margin-bottom:8px; }
.cookie-body p a{ color:var(--ink); font-weight:600; text-decoration:underline; }
.cookie-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.cookie-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.cookie-row:last-of-type{ border-bottom:0; }
.cookie-row .ct{ font-weight:600; font-size:.94rem; }
.cookie-row .cd{ font-size:.85rem; color:var(--muted); margin-top:.2rem; max-width:40ch; }
.cookie-switch{ width:42px; height:24px; border-radius:var(--r-pill); background:var(--line-2); border:0; position:relative; flex:none; cursor:pointer; transition:background .15s ease; }
.cookie-switch span{ position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:transform .15s ease; }
.cookie-switch.is-on{ background:var(--forest); }
.cookie-switch.is-on span{ transform:translateX(18px); }
.cookie-switch.is-locked{ opacity:.55; cursor:not-allowed; }
.cookie-reopen{ position:fixed; left:16px; bottom:16px; z-index:70; height:34px; padding:0 .8rem; border-radius:var(--r-sm); background:#fff; color:var(--ink); border:1px solid var(--line-2); font-size:.84rem; font-weight:600; cursor:pointer; }
.cookie-reopen:hover{ border-color:var(--ink); }
.cookie-reopen[hidden]{ display:none; }
@media (max-width:480px){
  .cookie-banner{ left:10px; right:10px; bottom:10px; }
  .cookie-body{ padding:16px; }
  .cookie-row{ flex-wrap:wrap; }
}

/* ---------- Notification (toast) ---------- */
.toast-zone{ position:fixed; right:20px; bottom:20px; z-index:120; display:flex; flex-direction:column; gap:10px; }
.toast{ background:var(--ink); color:#fff; padding:14px 18px; border-radius:var(--r); box-shadow:var(--sh-3); border-left:3px solid var(--brand);
  min-width:260px; max-width:360px; transform:translateY(8px); opacity:0; animation:toast-in .25s forwards; }
.toast .tt{ font-weight:600; font-size:.95rem; }
.toast .tm{ font-size:.85rem; color:#b9bcb6; margin-top:.15rem; }
@keyframes toast-in{ to{ transform:none; opacity:1; } }

/* Les anciennes apparitions au défilement sont désactivées : le contenu est là, tout de suite. */
.reveal{ opacity:1; transform:none; }

/* ---------- Fenêtres de dialogue (IM.swal) ---------- */
.swal-back{ position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:20px;
  background:rgba(14,26,43,.6); opacity:0; transition:opacity .2s ease; }
.swal-back.open{ opacity:1; }
.swal-card{ width:min(440px,100%); background:#fff; border-radius:var(--r-lg); padding:28px 28px 24px; text-align:left;
  box-shadow:var(--sh-3); border-top:4px solid var(--ink); }
.swal-card.swal-success{ border-top-color:var(--ok); }
.swal-card.swal-error{ border-top-color:var(--danger); }
.swal-card.swal-warning{ border-top-color:var(--warn); }
.swal-card.swal-question{ border-top-color:var(--brand); }
.swal-title{ font-size:1.3rem; font-weight:700; margin:0 0 .5rem; color:var(--ink); }
.swal-text{ color:var(--muted); line-height:1.6; margin:0 0 1.5rem; font-size:.97rem; }
.swal-actions{ display:flex; gap:10px; justify-content:flex-end; }
.swal-actions .btn{ min-width:110px; }
@media (max-width:440px){ .swal-actions{ flex-direction:column-reverse; } .swal-actions .btn{ width:100%; } }
.swal-form{ text-align:left; margin-bottom:.4rem; }
.swal-form label{ display:block; font-weight:600; font-size:.88rem; color:var(--ink); margin-bottom:12px; }
.swal-form input, .swal-form select, .swal-form textarea{ width:100%; margin-top:6px; padding:.7rem .85rem; border:1px solid var(--line-2); border-radius:var(--r-sm); font:inherit; font-weight:400; background:#fff; color:var(--ink); }
.swal-form input:focus, .swal-form select:focus, .swal-form textarea:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(14,26,43,.12); }
.swal-form textarea{ resize:vertical; }
.swal-err{ color:var(--danger); font-size:.86rem; margin:.2rem 0 0; }

.cd-list{ text-align:left; }
.cd-row{ display:flex; justify-content:space-between; gap:16px; padding:.6rem 0; border-bottom:1px solid var(--line); }
.cd-row:last-of-type{ border-bottom:0; }
.cd-row span{ color:var(--muted); }
.cd-row b{ text-align:right; }
.cd-docs{ margin-top:12px; padding:12px 14px; background:var(--mist); border-radius:var(--r-sm); font-size:.88rem; color:var(--ink-2); line-height:1.5; }

/* Un élément masqué par l attribut hidden le reste, quel que soit son display */
[hidden]{ display:none !important; }
