/* ==========================================================================
   ARVENTO STUDIO — live chat widget (sits where the WhatsApp button was)
   ========================================================================== */
.achat{position:fixed;right:clamp(1rem,2vw,1.9rem);bottom:clamp(1rem,2vw,1.9rem);z-index:5550;font-family:var(--sans);color:var(--ink);
  display:flex;flex-direction:column;align-items:flex-end;gap:.8rem;pointer-events:none}
.achat>*{pointer-events:auto}
/* While the chat is open it sits above the fixed site header (z-index 6000),
   so the "Start a Project" button can never show through it. Closed, it stays
   below the header and the mobile menu, like the old WhatsApp button. */
.achat.open{z-index:6200}
/* Open: the panel takes the button's place at the bottom of the screen
   (close it with × or Esc) and is kept short enough that its top stays
   below the site header — so it never runs into "Start a Project". */
@media (min-width:641px){
  .achat.open .achat__btn{display:none}
}
.achat [hidden]{display:none!important}

/* button */
.achat__btn{position:relative;display:flex;align-items:center;gap:.65rem;background:var(--bronze-tx);color:#fff;border:0;cursor:pointer;
  padding:.95rem 1.25rem;border-radius:999px;box-shadow:0 16px 38px -14px rgba(20,14,10,.6);font:600 var(--fs-label)/1 var(--sans);
  letter-spacing:.2em;text-transform:uppercase;transition:transform .45s var(--e-out),background .45s}
.achat__btn:hover{transform:translateY(-3px);background:var(--ink)}
.achat.open .achat__btn{background:var(--ink)}
.achat__ic{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.achat__badge{position:absolute;top:-6px;right:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#C4553F;color:#fff;
  font:700 11px/22px var(--sans);letter-spacing:0;text-align:center;box-shadow:0 0 0 3px var(--ivory);animation:achatPulse 2s infinite}
@keyframes achatPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}

/* greeting popup */
.achat__pop{position:relative;display:grid;grid-template-columns:auto 1fr;gap:.75rem;align-items:start;max-width:300px;padding:1rem 2.3rem 1rem 1rem;
  background:var(--white);border-radius:18px 18px 4px 18px;box-shadow:0 22px 50px -18px rgba(20,14,10,.55);cursor:pointer;
  opacity:0;transform:translateY(12px) scale(.96);transform-origin:bottom right;transition:opacity .45s var(--e-out),transform .45s var(--e-out)}
.achat__pop.in{opacity:1;transform:none}
.achat__poptxt{margin:0;font-size:.92rem;line-height:1.5;color:var(--ink)}
.achat__popx{position:absolute;top:.45rem;right:.45rem;width:26px;height:26px;border:0;background:none;border-radius:50%;cursor:pointer;color:var(--muted);display:grid;place-items:center}
.achat__popx:hover{background:var(--ivory)}
.achat__popx svg,.achat__close svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.achat__av{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--espresso);color:var(--sand);
  font:500 1.05rem/1 var(--display);flex:none}
.achat__av.lg{width:42px;height:42px;font-size:1.3rem;background:rgba(243,239,231,.1);border:1px solid rgba(243,239,231,.35)}

/* panel */
.achat__panel{width:min(380px,calc(100vw - 2rem));height:min(560px,calc(100vh - 9.5rem));min-height:320px;display:flex;flex-direction:column;overflow:hidden;
  background:var(--ivory);border-radius:20px;box-shadow:0 30px 80px -24px rgba(20,14,10,.6),0 0 0 1px rgba(41,35,31,.08);
  opacity:0;transform:translateY(16px) scale(.97);transform-origin:bottom right;transition:opacity .3s var(--e-out),transform .35s var(--e-out)}
.achat__panel.in{opacity:1;transform:none}
.achat__hd{display:flex;align-items:center;gap:.8rem;padding:1rem 1rem 1rem 1.15rem;background:var(--espresso);color:var(--ivory)}
.achat__meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}
.achat__meta b{font:500 1.25rem/1.1 var(--display);letter-spacing:.02em}
.achat__status{display:flex;align-items:center;gap:.4rem;font-size:.76rem;color:rgba(243,239,231,.78)}
.achat__status::before{content:"";width:7px;height:7px;border-radius:50%;background:#C9A15A}
.achat__status.on::before{background:#6FCF8A;box-shadow:0 0 0 3px rgba(111,207,138,.2)}
.achat__close{width:34px;height:34px;border-radius:50%;border:1px solid rgba(243,239,231,.25);background:none;color:var(--ivory);cursor:pointer;display:grid;place-items:center}
.achat__close:hover{background:rgba(243,239,231,.1)}

.achat__log{flex:1;overflow-y:auto;padding:1.1rem 1rem .6rem;display:flex;flex-direction:column;gap:.55rem;overscroll-behavior:contain;scrollbar-width:thin}
.achat__msg{max-width:84%;display:flex;flex-direction:column;gap:.2rem}
.achat__msg p{margin:0;padding:.65rem .85rem;border-radius:16px;font-size:.92rem;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.achat__msg a{color:inherit;text-decoration:underline;word-break:break-all}
.achat__msg.them{align-self:flex-start}
.achat__msg.them p{background:var(--white);border-bottom-left-radius:4px;box-shadow:0 1px 0 rgba(41,35,31,.06)}
.achat__msg.me{align-self:flex-end;align-items:flex-end}
.achat__msg.me p{background:var(--bronze-tx);color:#fff;border-bottom-right-radius:4px}
.achat__msg.pending{opacity:.6}
.achat__msg.sys{align-self:center;max-width:92%;text-align:center}
.achat__msg.sys p{background:rgba(155,128,104,.13);color:var(--muted);font-size:.84rem;border-radius:12px}
.achat__time{font-size:.68rem;color:var(--muted);padding:0 .3rem;letter-spacing:.02em}

.achat__quick{display:flex;flex-wrap:wrap;gap:.4rem;padding:0 1rem .7rem}
.achat__chip{border:1px solid rgba(124,98,73,.45);background:transparent;color:var(--bronze-tx);border-radius:999px;padding:.42rem .8rem;
  font:600 .78rem/1.2 var(--sans);cursor:pointer;transition:background .2s,color .2s}
.achat__chip:hover{background:var(--bronze-tx);color:#fff}

.achat__form{padding:.7rem .8rem .75rem;border-top:1px solid var(--hair);background:var(--white)}
.achat__who{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin-bottom:.5rem}
.achat__form input,.achat__form textarea{width:100%;border:1px solid var(--hair);background:var(--ivory);border-radius:12px;padding:.6rem .75rem;
  font:400 .9rem/1.4 var(--sans);color:var(--ink);outline:none;transition:border-color .2s}
.achat__form input:focus,.achat__form textarea:focus{border-color:var(--bronze)}
.achat__row{display:flex;gap:.5rem;align-items:flex-end}
.achat__form textarea{resize:none;min-height:42px;max-height:120px}
.achat__send{flex:none;width:42px;height:42px;border-radius:50%;border:0;background:var(--espresso);color:var(--ivory);cursor:pointer;display:grid;place-items:center;transition:background .2s}
.achat__send:hover{background:var(--bronze-tx)}
.achat__send:disabled{opacity:.5;cursor:wait}
.achat__send svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.achat__hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important}
.achat__err{margin:.45rem .2rem 0;font-size:.78rem;color:#A23D2E}
.achat__ft{padding:.55rem 1rem .7rem;background:var(--white);text-align:center}
.achat__ft:empty{display:none}
.achat__ft a{font-size:.76rem;font-weight:600;color:var(--bronze-tx);letter-spacing:.02em}

@media (max-width:640px){
  .achat__lbl{display:none}
  .achat__btn{width:58px;height:58px;padding:0;justify-content:center}
  .achat.open{inset:0;right:0;bottom:0;gap:0}
  .achat.open .achat__btn{display:none}
  .achat.open .achat__panel{width:100%;height:100%;border-radius:0}
  .achat__pop{max-width:calc(100vw - 2rem)}
  .achat__who{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .achat__pop,.achat__panel,.achat__btn{transition:none}
  .achat__badge{animation:none}
}
