/* ==========================
   RESET & BASE
   ========================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f4f9ff;
}

/* ==========================
   HEADER
   ========================== */
header {
  background: #4a90e2;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

/* Icône contact */
#contact-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  cursor: pointer;
  font-size: 1.3rem;
}

/* ==========================
   CHAT AREA
   ========================== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 110px 15px 90px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================
   CHAT BUBBLES
   ========================== */
.bubble {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  word-wrap: break-word;
}

.bubble.ai {
  background: #ffffff;
  align-self: flex-start;
  color: #333;
  border: 1px solid #e1e8ed;
}

.bubble.user {
  background: #4a90e2;
  color: #ffffff;
  align-self: flex-end;
}

/* ==========================
   FOOTER INPUT
   ========================== */
footer {
  background: #ffffff;
  padding: 10px;
  display: flex;
  gap: 8px;
  border-top: 1px solid #ddd;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 100;
}

footer input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
  font-size: 16px;
}

footer button {
  background: #4a90e2;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ==========================
   CONTACT MODAL
   ========================== */
.atlas-modal.hidden { display: none; }

.atlas-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.atlas-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.atlas-modal-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 420px;
  margin: 15% auto;
  padding: 20px;
  border-radius: 12px;
  animation: slideUp 0.25s ease-out;
}

.atlas-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Contact form */
.atlas-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atlas-contact-form input,
.atlas-contact-form textarea {
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.atlas-contact-form textarea {
  min-height: 90px;
  resize: vertical;
}

.atlas-contact-form button {
  align-self: center;
  padding: 10px 20px;
  border-radius: 20px;
  background: #4a90e2;
  color: white;
  border: none;
  cursor: pointer;
}

.atlas-contact-feedback {
  min-height: 1.2em;
  text-align: center;
}

/* ==========================
   ANIMATIONS
   ========================== */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
