/* FraterDeals — styles du chatbot, dérivés des variables de style.css */
.fd-chat-root{ position: fixed; z-index: 500; right: 22px; bottom: 22px; }

.fd-chat-btn{
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  border: none; cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fd-chat-btn:hover{ transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px rgba(0,0,0,0.32); }
.fd-chat-btn svg{ width: 26px; height: 26px; }

.fd-chat-hint{
  position:absolute; right: 72px; bottom: 14px;
  background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  white-space: nowrap;
  opacity: 0; transform: translateY(6px) scale(0.96);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  cursor: pointer;
}
.fd-chat-hint-show{ opacity:1; transform: translateY(0) scale(1); pointer-events: auto; }

.fd-chat-panel{
  position: absolute; right: 0; bottom: 76px;
  width: 380px; max-width: calc(100vw - 40px);
  height: 560px; max-height: 72vh;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.fd-chat-open .fd-chat-panel{ opacity:1; transform: translateY(0) scale(1); pointer-events:auto; }
.fd-chat-open .fd-chat-btn svg{ }

.fd-chat-header{
  background: var(--ink); color: var(--paper);
  padding: 16px 18px;
  display:flex; align-items:center; justify-content:space-between;
  flex-shrink: 0;
}
.fd-chat-header-title{ display:flex; align-items:center; gap:10px; }
.fd-chat-header-title div{ display:flex; flex-direction:column; line-height:1.25; }
.fd-chat-header-title strong{ font-family:'Space Grotesk', sans-serif; font-size: 14.5px; }
.fd-chat-header-title span{ font-size: 11.5px; color: var(--ember-light); }
.fd-chat-dot{ width:9px; height:9px; border-radius:50%; background:#5ec26a; flex-shrink:0; box-shadow: 0 0 0 3px rgba(94,194,106,0.25); }
.fd-chat-header-actions{ display:flex; gap:6px; }
.fd-chat-icon-btn{
  width:30px; height:30px; border-radius:6px; border:none; cursor:pointer;
  background: rgba(250,247,241,0.08); color: var(--paper);
  display:flex; align-items:center; justify-content:center;
  transition: background .15s ease;
}
.fd-chat-icon-btn:hover{ background: rgba(250,247,241,0.18); }
.fd-chat-icon-btn svg{ width:16px; height:16px; }

.fd-chat-messages{
  flex: 1; overflow-y: auto; padding: 16px;
  display:flex; flex-direction:column; gap: 10px;
  background: var(--paper);
}
.fd-chat-msg{
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family:'Inter', sans-serif; font-size: 14px; line-height: 1.5;
  white-space: pre-line;
}
.fd-chat-msg-bot{ align-self:flex-start; background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 4px; }
.fd-chat-msg-user{ align-self:flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }

.fd-chat-typing{ display:flex; gap:4px; align-items:center; padding: 12px 16px; }
.fd-chat-typing span{
  width:6px; height:6px; border-radius:50%; background: var(--ink-soft);
  opacity:0.5;
  animation: fdTyping 1s infinite ease-in-out;
}
.fd-chat-typing span:nth-child(2){ animation-delay: .15s; }
.fd-chat-typing span:nth-child(3){ animation-delay: .3s; }
@keyframes fdTyping{ 0%,60%,100%{ transform: translateY(0); opacity:.4; } 30%{ transform: translateY(-4px); opacity:1; } }

.fd-chat-quickreplies{
  display:flex; flex-wrap:wrap; gap:8px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}
.fd-chat-qr{
  font-family:'Inter', sans-serif; font-size: 13px; font-weight: 600;
  padding: 8px 13px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: #fff; color: var(--ink);
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.fd-chat-qr:hover{ background: var(--ink); color: var(--paper); }

.fd-chat-form{
  display:flex; gap:8px; padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff; flex-shrink: 0;
}
.fd-chat-input{
  flex:1; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-family:'Inter', sans-serif; font-size: 14px;
  background: var(--paper);
}
.fd-chat-input:focus{ outline: 2px solid var(--ember); }
.fd-chat-send{
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background: var(--ember); color: var(--ink);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition: background .15s ease;
}
.fd-chat-send:hover{ background: var(--ember-light); }
.fd-chat-send svg{ width:17px; height:17px; }

/* Mobile: quasi plein écran */
@media (max-width: 560px){
  .fd-chat-root{ right: 14px; bottom: 14px; }
  .fd-chat-panel{
    position: fixed; right: 10px; left: 10px; bottom: 88px; top: 70px;
    width: auto; height: auto; max-height: none; max-width: none;
  }
  .fd-chat-hint{ right: 68px; }
}

@media (prefers-reduced-motion: reduce){
  .fd-chat-btn, .fd-chat-panel, .fd-chat-hint, .fd-chat-typing span{ transition:none; animation:none; }
}
