/* ============================================================
   JC COACHING — css/smart-rabbit.css
   Widget chatbot Smart Rabbit (extrait de l'ancienne landing v4)
   ============================================================ */

.sr-fab-container { position: fixed; bottom: 24px; right: 24px; z-index: 9998; }

.sr-fab {
  width: 65px; height: 65px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 30px rgba(0, 242, 254, .5);
  transition: transform .3s cubic-bezier(.175, .885, .32, 1.275), box-shadow .3s ease;
  border: none;
  font-size: 32px;
  line-height: 1;
}
.sr-fab:hover { transform: scale(1.1); box-shadow: 0 10px 40px rgba(0, 242, 254, .6); }

.sr-tooltip {
  position: absolute; bottom: 75px; right: 0;
  background: #1e1e3f; color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
  border: 1px solid rgba(0, 242, 254, .3);
  animation: sr-tooltip-bounce 2s ease-in-out infinite;
}
.sr-tooltip::after {
  content: '';
  position: absolute; bottom: -8px; right: 24px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #1e1e3f;
}
.sr-tooltip-close {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px;
  background: #ef4444; border-radius: 50%; border: none;
  color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
@keyframes sr-tooltip-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.sr-chat-window {
  position: fixed; bottom: 100px; right: 24px;
  width: 380px; height: 500px;
  background: linear-gradient(180deg, #1e1e3f 0%, #141428 100%);
  border-radius: 20px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(0, 242, 254, .1);
  border: 1px solid rgba(255, 255, 255, .1);
  z-index: 9999;
}
.sr-chat-window[hidden] { display: none; }
.sr-chat-window:not([hidden]) { animation: sr-slide-up .3s ease; }
@keyframes sr-slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.sr-header {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  padding: 12px 15px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.sr-header-avatar {
  width: 40px; height: 40px;
  background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.sr-header-info h4 { color: #0f0f1a; font-size: 1rem; font-weight: 700; margin: 0; }
.sr-header-info p { color: rgba(0, 0, 0, .6); font-size: .7rem; margin: 2px 0 0; }
.sr-close-btn {
  margin-left: auto;
  background: rgba(0, 0, 0, .1);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sr-close-btn:hover { background: rgba(0, 0, 0, .2); }
.sr-close-btn svg { width: 16px; height: 16px; fill: #0f0f1a; }

.sr-progress { display: flex; justify-content: center; gap: 5px; padding: 8px; background: rgba(0, 0, 0, .2); flex-shrink: 0; }
.sr-progress-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: all .3s; }
.sr-progress-dot.active { background: #00f2fe; box-shadow: 0 0 8px #00f2fe; }
.sr-progress-dot.done { background: #10b981; }

.sr-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.sr-msg-row { display: flex; gap: 8px; animation: sr-msg-in .3s ease; flex-shrink: 0; }
@keyframes sr-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sr-msg-row.bot { align-self: flex-start; }
.sr-msg-row.user { align-self: flex-end; flex-direction: row-reverse; }

.sr-mini-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.sr-msg-row.user .sr-mini-avatar { background: linear-gradient(135deg, #667eea, #764ba2); font-size: 12px; }

.sr-bubble { max-width: 80%; padding: 8px 12px; border-radius: 14px; line-height: 1.4; font-size: .85rem; }
.sr-msg-row.bot .sr-bubble { background: rgba(0, 242, 254, .12); color: #e8e8e8; border-bottom-left-radius: 4px; }
.sr-msg-row.user .sr-bubble { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-bottom-right-radius: 4px; }

.sr-options { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; margin-left: 36px; }
.sr-opt-btn {
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(0, 242, 254, .4);
  color: #00f2fe;
  padding: 6px 12px;
  border-radius: 16px;
  transition: all .2s;
  font-size: .75rem;
}
.sr-opt-btn:hover { background: rgba(0, 242, 254, .2); border-color: #00f2fe; transform: scale(1.05); }
.sr-back-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .5);
  padding: 5px 10px;
  border-radius: 12px;
  font-size: .7rem;
  margin-top: 6px;
  margin-left: 36px;
}
.sr-back-btn:hover { border-color: rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .8); }

.sr-input-area {
  padding: 10px 12px;
  background: rgba(0, 0, 0, .4);
  display: flex; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  flex-shrink: 0;
}
.sr-input-area textarea {
  flex: 1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  padding: 10px 16px;
  color: #fff;
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 38px;
  max-height: 70px;
  display: none;
}
.sr-input-area textarea:focus { border-color: #00f2fe; }
.sr-input-area button {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sr-input-area button svg { width: 18px; height: 18px; fill: #0f0f1a; }

.sr-typing { display: flex; gap: 8px; align-self: flex-start; flex-shrink: 0; }
.sr-typing-bubble {
  background: rgba(0, 242, 254, .12);
  padding: 10px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: flex; gap: 4px;
}
.sr-typing-bubble span { width: 6px; height: 6px; background: #00f2fe; border-radius: 50%; animation: sr-type-bounce 1.4s infinite ease-in-out; }
.sr-typing-bubble span:nth-child(1) { animation-delay: 0s; }
.sr-typing-bubble span:nth-child(2) { animation-delay: .2s; }
.sr-typing-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes sr-type-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.sr-success {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px;
  margin: 8px 8px 8px 36px;
  background: linear-gradient(135deg, rgba(0, 242, 254, .1), rgba(79, 172, 254, .1));
  border-radius: 14px;
  border: 1px solid rgba(0, 242, 254, .3);
  animation: sr-success-pulse 2s ease-in-out infinite;
}
@keyframes sr-success-pulse { 0%, 100% { box-shadow: 0 0 15px rgba(0, 242, 254, .2); } 50% { box-shadow: 0 0 30px rgba(0, 242, 254, .4); } }
.sr-success-icon {
  width: 55px; height: 55px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 10px;
  animation: sr-rabbit-bounce 1s ease-in-out infinite;
}
@keyframes sr-rabbit-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.sr-success-text { color: #00f2fe; font-size: .9rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.sr-success-sub { color: #a0a0a0; font-size: .8rem; text-align: center; }
.sr-claude-btn {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #0f0f1a;
  border: none;
  padding: 10px 20px;
  border-radius: 18px;
  margin-top: 12px;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  display: inline-block;
  transition: transform .2s;
}
.sr-claude-btn:hover { transform: scale(1.05); }

@media (max-width: 500px) {
  .sr-fab-container { bottom: 16px; right: 16px; }
  .sr-fab { width: 58px; height: 58px; font-size: 28px; }
  .sr-tooltip { bottom: 68px; right: -5px; font-size: 12px; padding: 8px 12px; }
  .sr-chat-window {
    bottom: 0; right: 0; left: 0; top: 0;
    width: 100%; height: 100%; max-height: none;
    border-radius: 0; border: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sr-tooltip, .sr-success, .sr-success-icon, .sr-typing-bubble span { animation: none; }
}
