.spw{--navy:#071426;--navy2:#122238;--gold:#d9aa45;--cream:#fffaf0;--line:#e6e9ee;--muted:#6c7684;position:fixed;right:22px;bottom:22px;z-index:2147482000;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.spw *{box-sizing:border-box}.spw button,.spw textarea{font:inherit}.spw img{display:block}.spw-launcher{display:flex;align-items:center;gap:10px;padding:9px 14px 9px 9px;border:1px solid rgba(217,170,69,.75);border-radius:18px;background:#fff;color:var(--navy);box-shadow:0 16px 40px rgba(7,20,38,.22);cursor:pointer}.spw-launcher strong,.spw-launcher small{display:block;text-align:left}.spw-launcher small{font-size:11px;color:var(--muted);margin-top:2px}.spw-avatar,.spw-head-avatar,.spw-message-avatar{overflow:hidden;border-radius:50%;background:#fff}.spw-avatar{width:42px;height:42px}.spw-avatar img,.spw-head-avatar img,.spw-message-avatar img{width:100%;height:100%;object-fit:cover}.spw-panel{position:absolute;right:0;bottom:70px;width:min(430px,calc(100vw - 20px));height:min(760px,calc(100vh - 84px));display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(7,20,38,.12);border-radius:20px;background:#fff;box-shadow:0 28px 80px rgba(7,20,38,.3)}.spw-panel[hidden],.spw-toast[hidden],.spw-drawer-backdrop[hidden],[hidden]{display:none!important}.spw-head{height:66px;flex:0 0 66px;display:flex;align-items:center;gap:10px;padding:9px 13px;background:var(--navy);color:#fff}.spw-menu,.spw-close{border:0;background:transparent;color:#fff;cursor:pointer}.spw-menu{font-size:20px;padding:7px}.spw-close{margin-left:auto;font-size:27px;line-height:1;padding:4px 6px}.spw-head-avatar{width:40px;height:40px;position:relative}.spw-head-identity{min-width:0}.spw-head-identity strong,.spw-head-identity small{display:block}.spw-head-identity strong{font-size:16px}.spw-head-identity small{font-size:10px;color:#d8e0e8;margin-top:2px}.spw-head-identity i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#27c17e;margin-left:4px}.spw-toast{position:absolute;top:74px;left:50%;transform:translateX(-50%);z-index:30;max-width:calc(100% - 30px);padding:9px 12px;border-radius:10px;background:#142238;color:#fff;font-size:11px;box-shadow:0 10px 30px rgba(7,20,38,.25);text-align:center}.spw-main{flex:1;min-height:0;display:flex;flex-direction:column;background:#f7f8fa}.spw-log{flex:1;min-height:0;overflow:auto;padding:14px 14px 7px;background:#f7f8fa;scroll-behavior:smooth}.spw-msg{display:flex;align-items:flex-start;gap:8px;max-width:92%;margin:0 0 12px}.spw-msg.user{margin-left:auto;justify-content:flex-end}.spw-message-avatar{flex:0 0 28px;width:28px;height:28px;border:1px solid #ead49d}.spw-msg p{margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:5px 15px 15px;background:#fff;font-size:13px;line-height:1.48;white-space:pre-wrap;box-shadow:0 1px 2px rgba(7,20,38,.03)}.spw-msg.user p{background:var(--navy);color:#fff;border-color:var(--navy);border-radius:15px 5px 15px 15px}.spw-suggestions{flex:0 0 auto;display:flex;gap:6px;overflow-x:auto;padding:7px 12px;background:#fff;border-top:1px solid #f0f1f3}.spw-suggestions:empty{display:none}.spw-suggestions button{flex:0 0 auto;border:1px solid #dec88f;border-radius:999px;background:var(--cream);color:#634b1e;padding:7px 11px;font-size:11px;cursor:pointer}.spw-results{flex:0 0 auto;max-height:178px;overflow:auto;padding:7px 10px;background:#fff;border-top:1px solid #eef0f2}.spw-results:empty{display:none}.spw-card{display:grid;grid-template-columns:66px minmax(0,1fr);gap:9px;padding:7px;margin-bottom:7px;border:1px solid var(--line);border-radius:11px;background:#fff}.spw-card img{width:66px;height:66px;object-fit:cover;border-radius:8px;background:#edf0f2}.spw-card-copy{min-width:0}.spw-card-copy strong{display:block;font-size:11.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spw-card-meta{display:flex;justify-content:space-between;gap:7px;margin-top:4px}.spw-card-copy small{font-size:9.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spw-card-copy b{font-size:10.5px;color:#916c26;white-space:nowrap}.spw-card-actions{display:flex;gap:5px;margin-top:6px}.spw-card-actions a,.spw-card-actions button{flex:1;padding:5px 6px;border:1px solid #d8dde3;border-radius:7px;background:#fff;color:#17212b;font-size:9.5px;font-weight:800;text-decoration:none;text-align:center;cursor:pointer}.spw-card-actions button{border-color:#dec88f;color:#75581d}.spw-card-actions button.selected{background:#fff3d3}.spw-form{flex:0 0 auto;display:grid;grid-template-columns:32px 1fr 46px;align-items:center;gap:7px;padding:9px 10px;background:#fff;border-top:1px solid var(--line)}.spw-form textarea{width:100%;min-height:40px;max-height:88px;resize:none;border:1px solid var(--line);border-radius:22px;padding:10px 13px;font-size:12.5px}.spw-form textarea:focus{outline:2px solid rgba(217,170,69,.2);border-color:var(--gold)}.spw-attach,.spw-send{border:0;cursor:pointer}.spw-attach{background:transparent;color:#566170;font-size:20px}.spw-send{width:42px;height:42px;border-radius:50%;background:var(--gold);color:#fff;font-size:18px;font-weight:900}.spw-send:disabled{opacity:.55}.spw-bottom-nav{height:58px;flex:0 0 58px;display:grid;grid-template-columns:repeat(5,1fr);background:var(--navy);color:#fff}.spw-bottom-nav button{position:relative;border:0;background:transparent;color:#d7dee7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:17px;cursor:pointer}.spw-bottom-nav small{font-size:8.5px}.spw-bottom-nav button.active,.spw-bottom-nav button:hover{color:var(--gold)}.spw-bottom-nav b{position:absolute;top:4px;right:20%;min-width:15px;height:15px;padding:0 4px;border-radius:999px;background:var(--gold);color:#fff;font-size:8px;line-height:15px}.spw-drawer-backdrop{position:absolute;inset:66px 0 58px;background:rgba(7,20,38,.35);z-index:19}.spw-drawer{position:absolute;top:66px;right:0;bottom:58px;width:min(355px,92%);display:flex;flex-direction:column;transform:translateX(104%);transition:transform .22s ease;background:#fff;z-index:20;box-shadow:-18px 0 45px rgba(7,20,38,.2)}.spw-drawer.open{transform:translateX(0)}.spw-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:14px;border-bottom:1px solid var(--line)}.spw-drawer-head strong,.spw-drawer-head small{display:block}.spw-drawer-head small{font-size:10px;color:var(--muted);margin-top:2px}.spw-drawer-head button{border:0;background:transparent;font-size:24px;cursor:pointer}.spw-drawer-body{flex:1;min-height:0;overflow:auto;padding:12px}.spw-selection-empty,.spw-info-card{padding:18px;border:1px dashed #d5dae1;border-radius:12px;text-align:center;color:var(--muted)}.spw-selection-empty strong,.spw-selection-empty span{display:block}.spw-selection-empty span{font-size:11px;margin-top:5px}.spw-selection-item{display:grid;grid-template-columns:58px minmax(0,1fr) 28px;gap:9px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:11px;margin-bottom:8px}.spw-selection-item img{width:58px;height:54px;object-fit:cover;border-radius:8px}.spw-selection-item strong,.spw-selection-item small{display:block}.spw-selection-item strong{font-size:11px}.spw-selection-item small{font-size:9.5px;color:var(--muted);margin-top:3px}.spw-selection-item button{border:0;background:transparent;font-size:21px;cursor:pointer}.spw-drawer-actions{display:flex;gap:8px;padding:11px;border-top:1px solid var(--line)}.spw-drawer-actions button,.spw-info-card button,.spw-more-list button,.spw-more-list a{flex:1;border-radius:10px;padding:10px 12px;font-weight:800;cursor:pointer;text-align:center;text-decoration:none}.spw-secondary{border:1px solid var(--line);background:#fff;color:#233044}.spw-primary,.spw-info-card button{border:0;background:var(--gold);color:#fff}.spw-drawer-actions button:disabled{opacity:.45}.spw-compare-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px}.spw-compare-title button{border:0;background:none;color:#8a6727;cursor:pointer}.spw-compare-grid{display:grid;grid-template-columns:minmax(80px,.8fr) repeat(3,minmax(110px,1fr));overflow:auto;border:1px solid var(--line);border-radius:10px}.spw-compare-cell{padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:9.5px}.spw-compare-cell.label{font-weight:800;background:#f8f8f9}.spw-compare-actions{display:grid;gap:7px;margin-top:10px}.spw-compare-actions button{border:0;border-radius:9px;background:var(--gold);color:#fff;padding:9px;font-weight:800;cursor:pointer}.spw-more-list{display:grid;gap:8px}.spw-more-list button,.spw-more-list a{display:flex;justify-content:space-between;border:1px solid var(--line);background:#fff;color:#17212b}.spw-more-list b{min-width:20px;height:20px;border-radius:999px;background:var(--gold);color:#fff;line-height:20px}.spw-info-card p{font-size:11px;line-height:1.5}.spw-info-card button{margin-top:10px;width:100%}
@media(max-width:600px){.spw{right:0;bottom:0;left:0}.spw-launcher{position:fixed;right:14px;bottom:14px}.spw-panel{position:fixed;inset:8px 8px 8px;width:auto;height:auto;max-width:none;border-radius:17px}.spw-drawer{width:100%}.spw-msg{max-width:94%}}

/* C-010 — parcours rendez-vous direct */
.spw-rdv-property-list{display:grid;gap:12px;margin-top:14px}
.spw-rdv-property{display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:12px;width:100%;padding:10px;border:1px solid #e2e6ec;border-radius:16px;background:#fff;text-align:left;cursor:pointer}
.spw-rdv-property:hover{border-color:#d8ad45;box-shadow:0 6px 18px rgba(9,28,49,.08)}
.spw-rdv-property img{width:72px;height:64px;object-fit:cover;border-radius:12px;background:#f2f4f7}
.spw-rdv-property span{min-width:0;display:grid;gap:4px}
.spw-rdv-property strong{font-size:14px;line-height:1.25;color:#0b1c31;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spw-rdv-property small{font-size:12px;color:#697586;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spw-rdv-property b{font-size:12px;color:#9b6d0d;background:#fff7df;border:1px solid #e3be68;border-radius:999px;padding:7px 10px}
@media (max-width:640px){.spw-rdv-property{grid-template-columns:58px 1fr}.spw-rdv-property img{width:58px;height:54px}.spw-rdv-property b{grid-column:2;justify-self:start}}


/* C-012 — invitation proactive après 30 secondes */
.spw-proactive{
  position:fixed;
  right:28px;
  bottom:106px;
  z-index:100001;
  width:min(360px,calc(100vw - 32px));
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:18px 18px 16px;
  border:1px solid rgba(215,168,64,.42);
  border-radius:20px;
  background:#fff;
  color:#07182d;
  box-shadow:0 20px 52px rgba(4,19,37,.24);
  animation:spwProactiveIn .32s ease-out both;
}
.spw-proactive[hidden]{display:none!important}
.spw-proactive::after{
  content:"";
  position:absolute;
  right:30px;
  bottom:-10px;
  width:20px;
  height:20px;
  background:#fff;
  border-right:1px solid rgba(215,168,64,.42);
  border-bottom:1px solid rgba(215,168,64,.42);
  transform:rotate(45deg);
}
.spw-proactive-avatar{width:48px;height:48px;flex:0 0 48px;border-radius:50%;overflow:hidden;border:2px solid #e1b342;background:#fff}
.spw-proactive-avatar img{width:100%;height:100%;object-fit:cover}
.spw-proactive>div{min-width:0;padding-right:16px}
.spw-proactive strong{display:block;font-size:17px;line-height:1.2;margin:1px 0 5px}
.spw-proactive p{margin:0 0 12px;font-size:14px;line-height:1.45;color:#465469}
.spw-proactive [data-spw-proactive-open]{border:0;border-radius:999px;padding:10px 15px;background:#dcae3f;color:#07182d;font-weight:800;cursor:pointer}
.spw-proactive-close{position:absolute;top:8px;right:10px;border:0;background:transparent;color:#6b7481;font-size:22px;line-height:1;cursor:pointer}
@keyframes spwProactiveIn{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:680px){
  .spw-proactive{right:16px;bottom:92px;width:calc(100vw - 32px);border-radius:18px;padding:16px}
  .spw-proactive-avatar{width:44px;height:44px;flex-basis:44px}
}

@media(max-width:680px){
  .spw-proactive{right:16px;bottom:88px;width:min(260px,calc(100vw - 32px));padding:10px 12px;border-radius:14px}
  .spw-proactive-avatar,.spw-proactive p{display:none}
  .spw-proactive strong{font-size:13px;margin:0 16px 6px 0}
  .spw-proactive [data-spw-proactive-open]{padding:7px 10px;font-size:12px}
}

/* Keep the home search accessible while Sophie is closed. */
body:has(.dwp-property-search__fields) .spw-proactive{display:none!important}

/* Sophie remains available as a compact conversation bubble; keep search unobstructed. */
body:has(.dwp-property-search__fields) .spw-proactive{display:none!important}
.spw-launcher{display:flex!important;align-items:center!important;justify-content:center!important;width:60px!important;height:60px!important;min-width:60px!important;padding:0!important;border-radius:50%!important;overflow:hidden!important}
.spw-launcher>span{display:none!important}
.spw-launcher:after{content:'';display:block;width:21px;height:16px;border:2px solid currentColor;border-radius:10px;position:relative}
.spw-launcher:before{content:'';position:absolute;width:6px;height:6px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:skew(-25deg);margin:18px 0 0 -12px;background:inherit}

/* Use Sophie as the only floating contact bubble. */
.wa-float{display:none!important}
.spw-launcher{background:#071a2e!important;color:#fff!important;box-shadow:0 8px 24px rgba(7,26,46,.28)!important}

/* Show Sophie's portrait inside the floating chat bubble. */
.spw-launcher>span:first-child{display:block!important;width:100%!important;height:100%!important}
.spw-launcher .spw-avatar img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important}
.spw-launcher:before,.spw-launcher:after{content:none!important;display:none!important}

/* Gentle periodic invitation animation for Sophie, respecting reduced motion. */
@keyframes sophie-bubble-nudge{0%,78%,100%{transform:translateY(0) scale(1)}84%{transform:translateY(-5px) scale(1.04)}90%{transform:translateY(0) scale(1)}}
.spw-launcher{animation:sophie-bubble-nudge 5s ease-in-out infinite}
.spw-launcher:hover,.spw-launcher:focus-visible{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.spw-launcher{animation:none!important}}

/* Small delayed prompt and tactile hover for Sophie. */
@keyframes sophie-hint-after-load{0%,88%{opacity:0;visibility:hidden}100%{opacity:1;visibility:visible}}
.spw-launcher{transition:transform .2s ease,box-shadow .2s ease}
.spw-launcher:hover,.spw-launcher:focus-visible{animation:none!importantimportant;transform:translateY(-3px) scale(1.06);box-shadow:0 14px 30px rgba(7,26,46,.35)!importantimportant}
.spw-launcher::after{content:"Je peux t'aider en cas de besoin"!importantimportant;display:block!importantimportant;position:fixed;right:78px;bottom:25px;max-width:220px;padding:10px 13px;border:1px solid #e6e9ee;border-radius:14px;background:#fff;color:#071426;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(7,20,38,.14);opacity:0;visibility:hidden;pointer-events:none;animation:sophie-hint-after-load 3.4s ease both}
.spw:has(.spw-panel:not([hidden])) .spw-launcher::after{display:none!importantimportant}
@media(max-width:600px){.spw-launcher::after{right:70px;bottom:20px;max-width:min(220px,calc(100vw - 100px))}}
@media(prefers-reduced-motion:reduce){.spw-launcher{transition:none!importantimportant}}
/* Sophie bubble hover + delayed helper message. */
@keyframes sophie-hint-after-load{0%,88%{opacity:0;visibility:hidden}100%{opacity:1;visibility:visible}}
.spw-launcher{transition:transform .2s ease,box-shadow .2s ease}
.spw-launcher:hover,.spw-launcher:focus-visible{animation:none!important;transform:translateY(-3px) scale(1.06);box-shadow:0 14px 30px rgba(7,26,46,.35)!important}
.spw-launcher::after{content:"Je peux t'aider en cas de besoin"!important;display:block!important;position:fixed;right:78px;bottom:25px;max-width:220px;padding:10px 13px;border:1px solid #e6e9ee;border-radius:14px;background:#fff;color:#071426;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(7,20,38,.14);opacity:0;visibility:hidden;pointer-events:none;animation:sophie-hint-after-load 3.4s ease both}
.spw:has(.spw-panel:not([hidden])) .spw-launcher::after{display:none!important}
@media(max-width:600px){.spw-launcher::after{right:70px;bottom:20px;max-width:min(220px,calc(100vw - 100px))}}
@media(prefers-reduced-motion:reduce){.spw-launcher{transition:none!important}}
/* Final placement for the delayed Sophie helper hint. */
@keyframes sophie-helper-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(-6px)}}
.spw-launcher{position:relative!important;overflow:visible!important;transition:transform .2s ease,box-shadow .2s ease}
.spw-launcher:hover,.spw-launcher:focus-visible{animation:none!important;transform:translateY(-3px) scale(1.06);box-shadow:0 14px 30px rgba(7,26,46,.35)!important}
.spw-launcher::after{content:"Je peux t'aider en cas de besoin"!important;display:block!important;position:absolute!important;right:70px;bottom:0!important;width:210px;max-width:calc(100vw - 100px);padding:10px 13px;border:1px solid #e6e9ee;border-radius:14px;background:#fff;color:#071426;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(7,20,38,.14);opacity:0;visibility:visible;pointer-events:none;animation:sophie-helper-in .25s ease 3s both}
.spw:has(.spw-panel:not([hidden])) .spw-launcher::after{display:none!important}
@media(max-width:600px){.spw-launcher{position:fixed!important;right:14px;bottom:14px}.spw-launcher::after{right:70px;bottom:0}}
@media(prefers-reduced-motion:reduce){.spw-launcher{transition:none!important}}

/* Helper hint anchored to Sophie container for reliable mobile visibility. */
@keyframes sophie-container-hint{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.spw::after{content:"Je peux t'aider en cas de besoin"!important;display:block!important;position:fixed!important;right:84px!important;bottom:28px!important;z-index:2147482001;width:210px;max-width:calc(100vw - 110px);padding:10px 13px;border:1px solid #e6e9ee;border-radius:14px;background:#fff;color:#071426;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(7,20,38,.14);pointer-events:none;animation:sophie-container-hint .25s ease 3s both}
.spw:has(.spw-panel:not([hidden]))::after{display:none!important}
@media(max-width:600px){.spw::after{right:84px!important;bottom:28px!important}}

/* Replace legacy duplicate prompts with one rotating hint. */
@keyframes sophie-hint-appear{to{opacity:1;transform:translateY(0)}}
@keyframes sophie-hint-text-cycle{0%,29%{--sophie-hint-text:"Je peux vous aider ?"}30%,59%{--sophie-hint-text:"Vous cherchez un bien ?"}60%,89%{--sophie-hint-text:"Un conseil immobilier ?"}90%,100%{--sophie-hint-text:"Je peux vous aider ?"}}
.spw-launcher::after{content:none!important;display:none!important}
.spw::after{content:var(--sophie-hint-text,"Je peux vous aider ?")!important;display:block!important;position:fixed!important;right:84px!important;bottom:28px!important;z-index:2147482001;width:210px;max-width:calc(100vw - 110px);padding:10px 13px;border:1px solid #e6e9ee;border-radius:14px;background:#fff;color:#071426;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(7,20,38,.14);pointer-events:none;opacity:0;transform:translateY(5px);animation:sophie-hint-appear .25s ease 3s forwards,sophie-hint-text-cycle 12s steps(1,end) 3s infinite}
.spw:has(.spw-panel:not([hidden]))::after{display:none!important}
