/* ============================================
   TICThink Chat Widget - Styles
   Aligné sur les tokens du site principal (site.css / account.css) :
   fond marine sombre, vert TICThink, Poppins + Roboto.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&family=Poppins:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600;1,700&display=swap');

:root {
  --tt-bg: #000000;
  --tt-bg-elev: #000000;
  --tt-surface-light: #000000;
  --tt-border: transparent;
  --tt-fg: #f4f4f2;
  --tt-muted: #9a9a96;
  --tt-dim: #6a7f92;
  --tt-accent: #00d166;
  --tt-accent-hover: #1ae884;
  --tt-on-accent: #0b1623;
  --tt-radius: 16px;
  --tt-radius-sm: 12px;
  --tt-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --tt-shadow-glow: 0 4px 20px rgba(0, 209, 102, 0.35);
}

/* ========== LOGO "ASK TICTHINK" (badge, style McKinsey) ========== */
.tt-brand-mark {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 28px 6px 0;
  overflow: visible;
}
.tt-brand-mark__eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--tt-muted);
  margin: 0 0 6px;
}
.tt-brand-mark__word {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  color: var(--tt-accent);
  line-height: 1.08;
  margin: 0 0 10px;
  font-size: 36px;
}
.tt-brand-mark__sparkle {
  display: inline-block;
  font-style: normal;
  animation: tt-sparkle 3s ease-in-out infinite;
}
@keyframes tt-sparkle {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 1; }
  50% { transform: rotate(160deg) scale(1.15); opacity: 0.7; }
}
.tt-brand-mark__caption {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--tt-muted);
  margin: 0;
}
/* Sur le panneau vert de la gate, le logo garde un texte fonce (fond clair) */
.tt-gate-visual .tt-brand-mark__eyebrow,
.tt-gate-visual .tt-brand-mark__caption { color: rgba(11, 22, 35, 0.7); }
.tt-gate-visual .tt-brand-mark__word { color: var(--tt-on-accent); }
.tt-brand-mark__bubbles {
  position: absolute;
  top: -20px;
  right: -18px;
  width: 64px;
  height: 50px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
.tt-brand-mark__bubbles svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Variante compacte : en-tete du panneau de chat */
.tt-brand-mark--sm {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: none;
}
.tt-brand-mark--sm .tt-brand-mark__eyebrow { display: none; }
.tt-brand-mark--sm .tt-brand-mark__caption { display: none; }
.tt-brand-mark--sm .tt-brand-mark__word {
  font-size: 15px;
  margin: 0;
  white-space: nowrap;
}
.tt-brand-mark--sm .tt-brand-mark__bubbles {
  position: static;
  width: 32px;
  height: 25px;
  flex-shrink: 0;
}

/* ========== ANIMATION D'APPARITION DU TEXTE (style McKinsey) ========== */
.tt-typewriter {
  display: inline;
}
.tt-typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: tt-caret-blink 0.9s step-end infinite;
}
@keyframes tt-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Vignettes des projets reels cites dans une reponse — image + lien vers la
   vraie case study sur ticthink.dz. */
.tt-citation-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.tt-citation-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--tt-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--tt-radius-sm);
  padding: 10px 20px 10px 10px;
  text-decoration: none;
  max-width: 300px;
  transition: border-color 0.15s, background 0.15s;
}
.tt-citation-card:hover { border-color: var(--tt-accent); background: rgba(0, 209, 102, 0.06); }
.tt-citation-card__thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.tt-citation-card__name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--tt-fg);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Indicateur "Generating response..." (remplace/complete les 3 points) */
.tt-generating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--tt-muted);
  padding: 4px 0 8px;
}
.tt-generating-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--tt-border);
  border-top-color: var(--tt-accent);
  animation: tt-spin 0.7s linear infinite;
}
@keyframes tt-spin {
  to { transform: rotate(360deg); }
}

/* ========== CONTENEUR PRINCIPAL / BULLE ========== */
#ticthink-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  color: var(--tt-fg);
}

.tt-chat-bubble {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  border: none;
  outline: none;
  padding: 0;
  position: relative;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

.tt-chat-bubble:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.tt-chat-bubble:active { transform: scale(0.97); }

.tt-chat-bubble svg { width: 92px; height: auto; display: block; }

.tt-chat-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: #e8735a;
  border-radius: 50%;
  border: 2px solid var(--tt-bg);
  display: none;
}
.tt-chat-badge.active { display: block; }

/* ========== TOOLTIP "ASK TICTHINK" AU SURVOL DE LA BULLE (fermée) ========== */
.tt-bubble-tooltip {
  position: absolute;
  bottom: 4px;
  right: 104px;
  background: linear-gradient(135deg, #00e578 0%, #00a855 100%);
  border: none;
  border-radius: var(--tt-radius);
  box-shadow: var(--tt-shadow-glow);
  padding: 16px 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.tt-chat-bubble:hover + .tt-bubble-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.tt-bubble-tooltip .tt-brand-mark { padding: 0; align-items: center; }
.tt-bubble-tooltip .tt-brand-mark__bubbles { display: none; }
.tt-bubble-tooltip .tt-brand-mark__eyebrow,
.tt-bubble-tooltip .tt-brand-mark__caption { color: rgba(255, 255, 255, 0.8); }
.tt-bubble-tooltip .tt-brand-mark__word { color: #fff; }
@media (max-width: 640px) {
  .tt-bubble-tooltip { display: none; }
}

/* ========== OVERLAY PLEIN ÉCRAN (commun gate + chat) ========== */
.tt-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(8, 12, 18, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: tt-fadeIn 0.25s ease;
}
.tt-overlay.open { display: flex; }

.tt-overlay-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--tt-bg-elev);
  border: 1px solid var(--tt-border);
  color: var(--tt-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  z-index: 20;
}
.tt-overlay-close:hover {
  background: var(--tt-bg);
  color: var(--tt-fg);
  border-color: rgba(255, 255, 255, 0.2);
}
.tt-overlay-close svg { width: 15px; height: 15px; }

/* ========== GATE (connexion requise) — quasi plein ecran, style McKinsey ========== */
.tt-gate {
  width: 100%;
  height: 100%;
  background: var(--tt-bg-elev);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  box-shadow: var(--tt-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
@media (max-width: 760px) {
  .tt-gate { grid-template-columns: 1fr; overflow-y: auto; }
  .tt-gate-visual { display: none; }
}

.tt-gate-form {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tt-gate-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tt-accent);
  margin: 0 0 10px;
}

.tt-gate-form h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: var(--tt-fg);
  margin: 0 0 10px;
}

.tt-gate-form p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tt-muted);
  margin: 0 0 24px;
}

.tt-gate-emailrow {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
}
.tt-gate-emailrow input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  padding: 13px 16px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: var(--tt-fg);
}
.tt-gate-emailrow input::placeholder { color: var(--tt-dim); }
.tt-gate-emailrow input:focus { outline: none; }
.tt-gate-emailrow button {
  flex-shrink: 0;
  width: 50px;
  background: var(--tt-accent);
  color: var(--tt-on-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-gate-emailrow button:hover { background: var(--tt-accent-hover); }

.tt-gate-msg {
  font-size: 12.5px;
  margin-top: 10px;
  min-height: 1.2em;
  color: var(--tt-muted);
}
.tt-gate-msg.err { color: #e8735a; }

.tt-gate-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tt-muted);
}
.tt-gate-divider::before, .tt-gate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tt-border);
}

.tt-gate-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: transparent;
  color: var(--tt-fg);
  border: 1px solid var(--tt-border);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
}
.tt-gate-btn:hover { border-color: var(--tt-accent); background: rgba(255, 255, 255, 0.03); }
.tt-gate-btn + .tt-gate-btn { margin-top: 10px; }
.tt-gate-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.tt-gate-visual {
  background: linear-gradient(160deg, var(--tt-accent) 0%, #00a854 100%);
  display: flex;
  align-items: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.tt-gate-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 55%);
}
.tt-gate-visual-inner { position: relative; z-index: 1; }
.tt-gate-visual .tt-brand-mark { margin-bottom: 26px; }
.tt-gate-visual h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.35;
  color: var(--tt-on-accent);
  margin: 0;
  min-height: 1.35em;
}

/* ========== CHAT PLEIN ÉCRAN ========== */
.tt-chat-panel {
  width: 100%;
  height: 100%;
  background: var(--tt-bg);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  box-shadow: var(--tt-shadow);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}
/* La sidebar n'apparait qu'une fois la conversation demarree (comme Ask McKinsey :
   l'ecran d'accueil est plein large, sans sidebar). */
.tt-chat-panel.tt-conv-started { grid-template-columns: 240px 1fr; }
.tt-chat-sidebar { display: none; }
.tt-chat-panel.tt-conv-started .tt-chat-sidebar { display: flex; }
@media (max-width: 760px) {
  .tt-chat-panel.tt-conv-started { grid-template-columns: 1fr; }
  .tt-chat-panel.tt-conv-started .tt-chat-sidebar { display: none; }
}

/* Barre laterale : logo + nouvelle conversation */
.tt-chat-sidebar {
  background: var(--tt-bg-elev);
  border-right: 1px solid var(--tt-border);
  padding: 20px 16px;
  flex-direction: column;
  gap: 18px;
}
.tt-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--tt-border);
  color: var(--tt-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  align-self: flex-start;
}
.tt-new-chat:hover { border-color: var(--tt-accent); color: var(--tt-fg); }
.tt-new-chat svg { width: 14px; height: 14px; }

.tt-chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tt-chat-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.tt-conv-started .tt-chat-header {
  background: var(--tt-bg-elev);
  border-bottom: 1px solid var(--tt-border);
}
.tt-chat-header-status {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--tt-accent);
  display: none;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.tt-conv-started .tt-chat-header-status { display: flex; }
.tt-status-dot {
  width: 6px; height: 6px;
  background: var(--tt-accent);
  border-radius: 50%;
  animation: tt-pulse 2s infinite;
}
@keyframes tt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.tt-chat-close {
  background: none; border: none; color: var(--tt-muted);
  cursor: pointer; padding: 6px; border-radius: 8px;
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.tt-chat-close:hover { color: var(--tt-fg); background: rgba(255,255,255,0.08); }
.tt-chat-close svg { width: 20px; height: 20px; }

.tt-error-banner {
  background: rgba(232, 115, 90, 0.1);
  border: 1px solid rgba(232, 115, 90, 0.2);
  color: #e8735a;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin: 12px 24px 0;
  display: none;
}
.tt-error-banner.show { display: block; animation: tt-fadeIn 0.3s ease; }

.tt-chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.tt-chat-messages::-webkit-scrollbar { width: 5px; }
.tt-chat-messages::-webkit-scrollbar-track { background: transparent; }
.tt-chat-messages::-webkit-scrollbar-thumb { background: var(--tt-border); border-radius: 10px; }

/* Ecran d'accueil (avant le premier message) — plein large, centre, sans sidebar */
.tt-landing-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px;
  overflow-y: auto;
}
.tt-landing-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 26px;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}
.tt-landing-inner .tt-brand-mark { margin: 0 auto; align-items: center; padding: 0 40px; }
.tt-landing-inner .tt-brand-mark__word { font-size: 64px; margin-bottom: 18px; }
.tt-landing-inner .tt-brand-mark__eyebrow { font-size: 13px; margin-bottom: 12px; }
.tt-landing-inner .tt-brand-mark__caption { font-size: 14px; }
.tt-landing-inner .tt-brand-mark__bubbles { width: 118px; height: 92px; top: -34px; right: -30px; }
.tt-landing-tagline {
  font-size: 19px;
  color: var(--tt-muted);
  line-height: 1.5;
  max-width: 560px;
  margin: 0;
  min-height: 1.5em;
}
.tt-landing-inputrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1080px;
  background: linear-gradient(var(--tt-bg), var(--tt-bg)) padding-box,
              linear-gradient(135deg, var(--tt-accent), #000) border-box;
  border: 1.5px solid transparent;
  border-radius: 18px;
  padding: 10px 10px 10px 30px;
  transition: box-shadow 0.15s;
}
.tt-landing-inputrow:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 209, 102, 0.15);
}
.tt-landing-inputrow input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--tt-fg);
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  padding: 18px 0;
}
.tt-landing-inputrow input::placeholder { color: var(--tt-dim); }
.tt-landing-inputrow button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tt-accent);
  border: none;
  color: var(--tt-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.tt-landing-inputrow button:hover { background: var(--tt-accent-hover); }
.tt-landing-inputrow button svg { width: 18px; height: 18px; }

.tt-landing-trending {
  width: 100%;
  padding: 24px 56px 0;
  flex-shrink: 0;
}
.tt-landing-trending .tt-suggested-eyebrow { padding: 0 56px; margin-left: -56px; margin-right: -56px; }

/* Effet de masque sur les bords du carrousel (indique qu'on peut scroller) —
   meme vide, symetrique, a gauche et a droite. */
.tt-suggested-mask {
  position: relative;
  margin: 0 -56px;
}
.tt-suggested-mask::before,
.tt-suggested-mask::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}
.tt-suggested-mask::before {
  left: 0;
  background: linear-gradient(90deg, var(--tt-bg) 0%, transparent 100%);
}
.tt-suggested-mask::after {
  right: 0;
  background: linear-gradient(270deg, var(--tt-bg) 0%, transparent 100%);
}
.tt-suggested-mask .tt-suggested-track { padding-left: 56px; padding-right: 56px; }

/* Carrousel navigable uniquement au glisser (souris ou tactile) — pas de boutons. */
.tt-suggested-track { cursor: grab; touch-action: pan-y; user-select: none; }
.tt-suggested-track.tt-dragging { cursor: grabbing; scroll-behavior: auto; }
.tt-suggested-track.tt-dragging .tt-suggested-pill { pointer-events: none; }

.tt-landing-disclaimer {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--tt-dim);
  padding: 16px 40px 22px;
}
.tt-landing-disclaimer button {
  background: none;
  border: none;
  color: var(--tt-dim);
  text-decoration: underline;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}
.tt-landing-disclaimer button:hover { color: var(--tt-muted); }

/* Popup "En savoir plus" */
.tt-info-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(8, 12, 18, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tt-info-modal.open { display: flex; }
.tt-info-modal-card {
  background: var(--tt-bg-elev);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  box-shadow: var(--tt-shadow);
  max-width: 480px;
  width: 100%;
  padding: 28px 28px 24px;
  position: relative;
}
.tt-info-modal-card h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--tt-fg);
  margin: 0 0 12px;
}
.tt-info-modal-card p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--tt-muted);
  margin: 0;
}
.tt-info-modal-card a { color: var(--tt-accent); }
.tt-info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--tt-border);
  color: var(--tt-fg);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tt-info-modal-close svg { width: 13px; height: 13px; }
.tt-suggested-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tt-muted);
  margin: 0 0 14px;
  text-align: left;
}
.tt-suggested-eyebrow svg { width: 16px; height: 16px; color: var(--tt-accent); flex-shrink: 0; }

/* Carrousel horizontal (style "Trending questions") */
.tt-suggested-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tt-suggested-track::-webkit-scrollbar { display: none; }
.tt-suggested-pill {
  background: var(--tt-bg-elev);
  border: 1px solid var(--tt-border);
  color: var(--tt-fg);
  font-size: 16px;
  line-height: 1.45;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: 'Roboto', sans-serif;
  text-align: left;
  flex: 0 0 auto;
  width: 340px;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-suggested-pill:hover { border-color: var(--tt-accent); background: rgba(0, 209, 102, 0.06); }

.tt-suggested-progress {
  height: 5px;
  background: var(--tt-border);
  border-radius: 9999px;
  margin-top: 12px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.tt-suggested-progress:active { cursor: grabbing; }
.tt-suggested-progress__thumb {
  height: 100%;
  background: var(--tt-accent);
  border-radius: 9999px;
  width: 25%;
  transition: transform 0.1s linear, width 0.1s linear;
  pointer-events: none;
}

.tt-message-bot {
  align-self: flex-start;
  max-width: 88%;
  display: flex;
  gap: 10px;
  animation: tt-fadeIn 0.3s ease;
}
.tt-message-bot-avatar {
  width: 28px; height: 28px;
  background: var(--tt-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--tt-on-accent);
  margin-top: 4px;
}
.tt-message-bot-content {
  background: var(--tt-bg-elev);
  color: var(--tt-fg);
  padding: 14px 16px;
  border-radius: 4px var(--tt-radius-sm) var(--tt-radius-sm) var(--tt-radius-sm);
  line-height: 1.6;
  font-size: 16px;
  border: 1px solid var(--tt-border);
}
.tt-message-bot-content strong { color: #fff; font-weight: 600; }
.tt-message-bot-content p { margin: 0 0 10px 0; }
.tt-message-bot-content p:last-child { margin-bottom: 0; }
.tt-message-bot-content ul { margin: 8px 0; padding-left: 18px; }
.tt-message-bot-content li { margin-bottom: 5px; }

.tt-message-user {
  align-self: flex-start;
  max-width: 85%;
  background: var(--tt-accent);
  color: var(--tt-on-accent);
  padding: 12px 16px;
  border-radius: 4px var(--tt-radius-sm) var(--tt-radius-sm) var(--tt-radius-sm);
  line-height: 1.5;
  font-size: 16px;
  font-weight: 500;
  animation: tt-fadeIn 0.25s ease;
}

@keyframes tt-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tt-typing {
  display: flex; gap: 4px; padding: 16px 18px;
  background: var(--tt-bg-elev);
  border-radius: 4px var(--tt-radius-sm) var(--tt-radius-sm) var(--tt-radius-sm);
  width: fit-content;
  border: 1px solid var(--tt-border);
}
.tt-typing-dot {
  width: 7px; height: 7px;
  background: var(--tt-muted);
  border-radius: 50%;
  animation: tt-typingBounce 1.4s infinite ease-in-out both;
}
.tt-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.tt-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes tt-typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ========== FORMULAIRE LEAD (nom/email deja connus) ========== */
.tt-lead-form {
  background: var(--tt-bg-elev);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  padding: 18px;
  margin-top: 8px;
  animation: tt-fadeIn 0.35s ease;
}
.tt-lead-form h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 14px 0;
  color: var(--tt-fg);
}
.tt-lead-form p {
  font-size: 0.82rem;
  color: var(--tt-muted);
  margin: 0 0 14px 0;
  line-height: 1.5;
}
.tt-form-group { margin-bottom: 12px; }
.tt-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tt-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tt-form-group input,
.tt-form-group select {
  width: 100%;
  background: var(--tt-bg);
  border: 1px solid var(--tt-border);
  color: var(--tt-fg);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}
.tt-form-group input:focus,
.tt-form-group select:focus {
  border-color: var(--tt-accent);
  box-shadow: 0 0 0 3px rgba(0, 209, 102, 0.12);
}
.tt-form-submit {
  width: 100%;
  background: var(--tt-accent);
  color: var(--tt-on-accent);
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tt-form-submit:hover { background: var(--tt-accent-hover); transform: translateY(-1px); }
.tt-form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.tt-form-submit svg { width: 16px; height: 16px; }

.tt-form-success { text-align: center; padding: 20px; }
.tt-form-success svg { width: 40px; height: 40px; color: var(--tt-accent); margin-bottom: 12px; }
.tt-form-success h4 { font-family: 'Poppins', sans-serif; font-size: 1.1rem; color: var(--tt-fg); margin: 0 0 6px 0; }
.tt-form-success p { font-size: 0.85rem; color: var(--tt-muted); margin: 0; }

/* ========== ZONE DE SAISIE ========== */
.tt-chat-input-area {
  padding: 16px 24px;
  background: var(--tt-bg-elev);
  border-top: 1px solid var(--tt-border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}
.tt-chat-input {
  flex: 1;
  background: var(--tt-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--tt-fg);
  padding: 12px 16px;
  border-radius: 9999px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.tt-chat-input:focus { border-color: var(--tt-accent); box-shadow: 0 0 0 3px rgba(0, 209, 102, 0.08); }
.tt-chat-input::placeholder { color: var(--tt-dim); }

.tt-chat-send {
  width: 42px; height: 42px;
  background: var(--tt-accent);
  border: none;
  border-radius: 50%;
  color: var(--tt-on-accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.tt-chat-send:hover { background: var(--tt-accent-hover); transform: scale(1.05); }
.tt-chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.tt-chat-send svg { width: 18px; height: 18px; }

.tt-chat-foot {
  text-align: center;
  font-size: 10.5px;
  color: var(--tt-dim);
  padding: 8px 24px 14px;
  background: var(--tt-bg-elev);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  #ticthink-chat-widget {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }
  .tt-chat-bubble svg { width: 64px; height: auto; }
  .tt-chat-panel { height: 100vh; max-height: 100vh; border-radius: 0; }
  .tt-gate { max-height: 100vh; border-radius: 0; }
}
