/* Assistant ToulouseMaroc — conseiller « Rachid » */
.tma-av{display:inline-grid;place-items:center;flex:0 0 auto;width:40px;height:40px;border-radius:50%;overflow:hidden;background:#A61E2B;color:#fff;font-weight:800;font-size:17px;line-height:1}
.tma-av img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 30%}
.tma-av.is-blank{visibility:hidden}
.tma-av-fab{width:100%;height:100%;font-size:22px}
.tma-av-sm{width:40px;height:40px}
.tma-av-lg{width:44px;height:44px;font-size:19px}
.tma-av-xs{width:28px;height:28px;font-size:13px}

/* Petit avatar flottant */
.tma-fab{position:fixed;right:14px;bottom:calc(80px + env(safe-area-inset-bottom));z-index:45;width:56px;height:56px;padding:0;border:3px solid #fff;border-radius:50%;background:#A61E2B;box-shadow:0 6px 20px rgba(31,35,40,.22),0 0 0 1px rgba(31,35,40,.06);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .15s}
.tma-fab:hover{transform:scale(1.05)}
.tma-fab:focus-visible{outline:3px solid #A61E2B;outline-offset:3px}
.tma-fab[hidden]{display:none}

/* Fenêtre */
.tma-lock body{overflow:hidden}
/* Mobile : fenêtre ancrée en bas, le haut de la page reste visible. Plein écran seulement quand le client écrit. */
.tma-panel{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:1000;display:none;flex-direction:column;background:#fff;color:#1F2328;font-size:16px;line-height:1.45;height:min(72vh,540px);height:min(72dvh,540px);border-radius:18px 18px 0 0;box-shadow:0 -8px 32px rgba(31,35,40,.2),0 0 0 1px rgba(31,35,40,.06)}
.tma-panel.is-full{top:0;height:100%;height:100dvh;border-radius:0;box-shadow:none}
.tma-panel.is-open{display:flex}
.tma-panel *{box-sizing:border-box}
.tma-head{display:flex;align-items:center;gap:12px;padding:10px 10px 10px 14px;border-bottom:1px solid #E4E6EA;flex:0 0 auto}
.tma-panel.is-full .tma-head{padding-top:calc(10px + env(safe-area-inset-top))}
.tma-who{flex:1;min-width:0}
.tma-who strong{display:block;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tma-who small{display:block;color:#5B616B;font-size:12px}
.tma-x{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:50%;background:#F5F6F8;font-size:26px;line-height:1;color:#1F2328;cursor:pointer}
.tma-log{flex:1 1 auto;min-height:0;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:8px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.tma-row{display:flex;align-items:flex-end;gap:8px;max-width:100%}
.tma-row.is-me{justify-content:flex-end}
.tma-msg{max-width:84%;padding:10px 14px;border-radius:16px;word-wrap:break-word}
.tma-row.is-bot .tma-msg{background:#F5F6F8;border-bottom-left-radius:4px}
.tma-row.is-me .tma-msg{background:#1F2328;color:#fff;border-bottom-right-radius:4px}
.tma-typing{display:flex;gap:4px;padding:14px}
.tma-typing i{width:7px;height:7px;border-radius:50%;background:#A7ACB3;animation:tma-dot 1s infinite ease-in-out}
.tma-typing i:nth-child(2){animation-delay:.15s}.tma-typing i:nth-child(3){animation-delay:.3s}
@keyframes tma-dot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.tma-acts{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.tma-b{display:flex;align-items:center;justify-content:center;min-height:46px;padding:0 14px;border-radius:12px;border:1.5px solid #1F2328;background:#fff;color:#1F2328!important;font-weight:700;font-size:15px;text-decoration:none!important;text-align:center}
.tma-b.is-primary{background:#A61E2B;border-color:#A61E2B;color:#fff!important;letter-spacing:.02em}
.tma-b-wa,.tma-b-wa.is-primary{gap:8px;min-height:52px;padding:0 12px;white-space:nowrap;background:#138A4B;border-color:#138A4B;color:#fff!important;font-size:15px;letter-spacing:0;box-shadow:0 4px 12px rgba(19,138,75,.25)}
.tma-b-wa:hover{background:#0F7440;border-color:#0F7440}
.tma-ic{display:inline-grid;place-items:center;flex:0 0 auto;line-height:0}
.tma-b-call{letter-spacing:.02em}
.tma-chips{display:flex;flex-wrap:wrap;gap:8px;padding:4px 12px 10px;max-height:36vh;overflow-y:auto;flex:0 0 auto}
.tma-chips[hidden]{display:none}
.tma-chip{flex:0 0 auto;min-height:40px;padding:0 14px;border:1.5px solid #E4E6EA;border-radius:999px;background:#fff;font:inherit;font-size:14px;font-weight:600;color:#1F2328;cursor:pointer;white-space:nowrap}
.tma-chip:hover{border-color:#A61E2B;color:#A61E2B}
.tma-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #E4E6EA;flex:0 0 auto}
.tma-form input{flex:1;min-width:0;min-height:48px;padding:0 14px;border:1.5px solid #E4E6EA;border-radius:12px;font:inherit;font-size:16px;color:#1F2328;background:#fff;-webkit-appearance:none;appearance:none}
.tma-form input:focus{outline:none;border-color:#A61E2B;box-shadow:0 0 0 3px #FBEDEE}
.tma-form button{flex:0 0 48px;width:48px;min-height:48px;border:0;border-radius:12px;background:#A61E2B;color:#fff;font-size:18px;cursor:pointer}
.tma-privacy{margin:0;padding:0 14px calc(8px + env(safe-area-inset-bottom));font-size:11px;color:#5B616B;text-align:center;flex:0 0 auto}

@media (min-width:768px){
	.tma-fab{bottom:24px;right:24px;width:60px;height:60px}
	.tma-lock body{overflow:auto}
	.tma-panel,.tma-panel.is-full{left:auto;top:auto;right:24px;bottom:24px;width:390px;height:620px;border-radius:18px;max-height:calc(100vh - 48px);border:1px solid #E4E6EA;border-radius:18px;box-shadow:0 24px 64px rgba(31,35,40,.22);overflow:hidden}
	.tma-panel.is-full .tma-head{padding-top:10px}
}
@media (prefers-reduced-motion:no-preference){.tma-panel.is-open{animation:tma-in .25s ease-out}}
@media (prefers-reduced-motion:reduce){.tma-fab{transition:none}}
@keyframes tma-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
