/* Wrapper général */
.saif-wrap{
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* LANDING */
.saif-landing{
  display: flex;
  justify-content: center;
  padding: 18px 0 10px;
}

.saif-landing-card{
  width: 100%;
  max-width: 920px;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .08);
  padding: 28px 22px 18px;
}

.saif-hero{
  text-align: center;
  padding: 8px 8px 14px;
}
.saif-hero-logo{
  max-width: 150px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}
.saif-title{
  font-size: 52px;
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.saif-subtitle{
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 20px;
}

.saif-footnote{
  text-align: center;
  margin-top: 14px;
  color: #6b7280;
}

/* TOPBAR */
.saif-topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 18px 18px 0 0;
  padding: 14px 16px;
}

.saif-brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.saif-brand-logo{
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.saif-brand-name{
  font-weight: 800;
  font-size: 18px;
  color: #111827;
}
.saif-brand-sub{
  font-size: 13px;
  color: #6b7280;
  margin-top: 1px;
}

/* CHAT VIEW */
.saif-chatview{
  max-width: 920px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .08);
}

.saif-log{
  background: #f6f7fb;
  border-left: 1px solid #e7eaf0;
  border-right: 1px solid #e7eaf0;
  padding: 18px 16px;
  height: 520px;
  overflow: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* INPUT BAR */
.saif-inputbar{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.saif-inputbar-chat{
  background: #fff;
  border: 1px solid #e7eaf0;
  border-top: 0;
  padding: 14px 16px;
  border-radius: 0 0 18px 18px;
}

.saif-input{
  flex: 1;
  min-width: 0;
  max-width: 620px;
  padding: 14px 16px;
  border: 2px solid #d7dbe7;
  border-radius: 14px;
  font-size: 18px;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}
.saif-input:focus{
  border-color: #d33b68;
  box-shadow: 0 0 0 4px rgba(211, 59, 104, .14);
}

/* BOUTONS */
.saif-btn{
  background: #d33b68;
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(211, 59, 104, .25);
}
.saif-btn:disabled{
  opacity: .6;
  cursor: not-allowed;
}
.saif-btn-ghost{
  background: #fff;
  color: #111827;
  border: 1px solid #d7dbe7;
  box-shadow: none;
}

/* MESSAGES (bulles) */
.saif-msg{
  display: flex;
  width: 100%;
}
.saif-msg.saif-user{
  justify-content: flex-end;
}
.saif-msg.saif-bot{
  justify-content: flex-start;
}

.saif-bubble{
  max-width: 72%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #e2e5ef;
}

.saif-user .saif-bubble{
  background: #eaf2ff;
  border-color: #d7e6ff;
}
.saif-bot .saif-bubble{
  background: #fff;
}

/* Typing (plus joli) */
.saif-typing-row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.saif-dotwrap{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 2px;
}
.saif-dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9ca3af;
  animation: saifBounce 1.1s infinite;
}
.saif-dot:nth-child(2){ animation-delay: .15s; }
.saif-dot:nth-child(3){ animation-delay: .30s; }

@keyframes saifBounce{
  0%, 80%, 100% { transform: translateY(0); opacity: .55; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.saif-loading-text{
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
}

/* Utilitaires */
.saif-hidden{ display: none !important; }

@media (max-width: 720px){
  .saif-title{ font-size: 38px; }
  .saif-subtitle{ font-size: 16px; }
  .saif-log{ height: 420px; }
  .saif-bubble{ max-width: 86%; }
}
