.support-widget { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 1100; color: #f6f1e7; font: 14px/1.5 var(--font-body, Inter, sans-serif); color-scheme: dark; }
.support-widget * { box-sizing: border-box; }
.support-widget [hidden] { display: none !important; }
.support-widget button, .support-widget input, .support-widget textarea { font: inherit; }
.support-widget button, .support-widget a { -webkit-tap-highlight-color: transparent; }
.support-widget button { cursor: pointer; }
.support-widget :focus-visible { outline: 2px solid #ffd978; outline-offset: 2px; }
.support-widget button:disabled { opacity: .6; cursor: wait; }
.support-widget ::selection { background: #f5b82e; color: #1a1203; }

.support-launcher { display: grid; place-items: center; width: 56px; height: 56px; margin-left: auto; border: 0; border-radius: 50%; background: #f5b82e; color: #1a1203; box-shadow: 0 8px 24px #0007; transition: background .18s, transform .18s; }
.support-launcher:hover { background: #ffd978; transform: translateY(-2px); }
.support-launcher svg { width: 25px; height: 25px; }

.support-panel { width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 108px)); margin-bottom: 14px; border: 1px solid #ffffff14; border-radius: 18px; background: #14110c; box-shadow: 0 18px 60px #000a; overflow: hidden; }
.support-view { display: flex; flex-direction: column; height: 100%; }

/* En-tête */
.support-header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid #ffffff12; }
.support-avatar { position: relative; flex: none; }
.support-avatar img { display: block; width: 34px; height: 34px; border-radius: 50%; }
.support-avatar i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #3ddc84; border: 2px solid #14110c; }
.support-heading { flex: 1; min-width: 0; }
.support-heading h2 { margin: 0; font-size: 15px; font-weight: 600; color: #f6f1e7; }
.support-heading p { display: flex; align-items: center; gap: 6px; margin: 1px 0 0; font-size: 12px; color: #a39a8a; }
.support-heading p i { width: 6px; height: 6px; border-radius: 50%; background: #a39a8a; }
.support-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #cfc6b6; }
.support-icon:hover { background: #ffffff0f; color: #f6f1e7; }
.support-icon svg { width: 18px; height: 18px; }

/* Messages et accueil */
.support-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; scrollbar-width: thin; scrollbar-color: #4a3f2c transparent; }
.support-welcome { margin: auto 0; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 8px; }
.support-welcome img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 6px; }
.support-welcome h3 { margin: 0; font-size: 17px; font-weight: 650; color: #f6f1e7; }
.support-welcome p { margin: 0; color: #cfc6b6; }
.support-live { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: #a39a8a; }
.support-live i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.support-message { max-width: 82%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #241e15; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message[data-role="visitor"] { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: #f5b82e; color: #1a1203; }
.support-message[data-role="system"] { align-self: center; max-width: 100%; padding: 0; background: none; color: #a39a8a; font-size: 12px; text-align: center; }
.support-message strong { display: block; margin-bottom: 2px; color: #ffd978; font-size: 11px; font-weight: 600; }

/* Saisie */
.support-human { display: flex; justify-content: center; padding: 0 16px 6px; }
.support-link { border: 0; background: none; padding: 4px 6px; color: #ffd978; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.support-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid #ffffff12; }
.support-compose textarea { flex: 1; min-width: 0; max-height: 120px; padding: 11px 16px; border: 1px solid transparent; border-radius: 22px; background: #221c14; color: #f6f1e7; resize: none; caret-color: #ffd978; line-height: 1.4; field-sizing: content; }
.support-compose textarea:focus { border-color: #ffd68c40; outline: none; }
.support-compose textarea::placeholder { color: #8f8676; }
.support-send { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f5b82e; color: #1a1203; }
.support-send:hover { background: #ffd978; }
.support-send svg { width: 18px; height: 18px; stroke-width: 2.2; }
.support-ended { display: grid; gap: 10px; padding: 12px 16px; border-top: 1px solid #ffffff12; text-align: center; }
.support-ended p { margin: 0; color: #a39a8a; }
.support-primary { width: 100%; padding: 11px 16px; border: 0; border-radius: 10px; background: #f5b82e; color: #1a1203; font-weight: 600; }
.support-primary:hover { background: #ffd978; }
.support-status { margin: 4px 16px 0; color: #ffd978; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.support-foot { margin: 0; padding: 6px 16px 10px; color: #8f8676; font-size: 11px; text-align: center; }
.support-foot a { color: #a39a8a; text-decoration: underline; text-underline-offset: 2px; }

/* Réglages */
.support-settings .support-header { padding-left: 8px; }
.support-settings-body { flex: 1; overflow-y: auto; padding: 6px 16px 16px; }
.support-settings-body h4 { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: #a39a8a; }
.support-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 8px; padding: 11px 14px; border: 1px solid #ffffff17; border-radius: 12px; background: transparent; color: #f6f1e7; text-align: left; text-decoration: none; font-weight: 500; }
.support-row:hover { background: #ffffff08; }
.support-row svg { flex: none; width: 18px; height: 18px; color: #cfc6b6; }
.support-row span { display: grid; }
.support-row small { color: #ffd978; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.support-row.danger { border-color: #f0585c55; color: #f58a8d; }
.support-row.danger svg { color: #f58a8d; }
.support-note { margin: 6px 0 0; color: #8f8676; font-size: 12px; line-height: 1.5; }

@media (max-width: 480px) {
  .support-widget { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .support-panel { height: calc(100dvh - 104px); }
  .support-compose textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .support-launcher { transition: none; } }
.support-compose textarea { height: 44px; min-height: 0; overflow-y: auto; }
.support-heading p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
