/* style.css */

/* Reset + Font */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

/* Corps global */
html, body {
  width: 100%;
  height: auto;
  background: #f0f8ff;
  overflow-x: hidden;
}

/* Titre principal */
#page-title {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 25px;
}
#page-title h2 {
  font-size: 22px;
  color: #5468ff;
  font-weight: 600;
}
#page-title h2 span {
  color: #9b7cff;
}

/* Overlay (popup) */
#overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(84, 104, 255, 0.9), rgba(155, 124, 255, 0.9));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: visible;
}

#overlay-card {
  background: #fff;
  color: #333;
  max-width: 550px; /* Largeur plus grande */
  width: 90%;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Photo centrée */
#overlay-photo-wrapper {
  text-align: center;
  margin-bottom: 10px;
}
#overlay-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
#overlay-photo:hover {
  transform: scale(1.05);
}

/* Titre bleu + centré */
.blue-title {
  color: #5468ff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.centered {
  text-align: center;
}

/* Overlay steps */
#overlay-step-1, 
#overlay-step-2 {
  width: 100%;
}
#overlay-step-1 button,
#overlay-step-2 button {
  display: block;
  margin: 20px auto 0;
  padding: 10px 25px;
  background: linear-gradient(90deg, #5468ff 0%, #9b7cff 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: opacity 0.2s ease;
}
#overlay-step-1 button:hover,
#overlay-step-2 button:hover {
  opacity: 0.85;
}

/* ---------- MAIN CONTAINER ---------- */
#main-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

/* Boîte de chat */
#chat-container {
  width: 90%;
  max-width: 680px; 
  height: 70vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Header chat */
#chat-header {
  background: linear-gradient(90deg, #5468ff 0%, #9b7cff 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
.linkedin-with-name {
  text-decoration: none;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}
.linkedin-with-name img {
  width: 24px;
  height: 24px;
}
.linkedin-with-name:hover {
  opacity: 0.8;
}

/* phone + mail */
.header-link {
  text-decoration: none;
  color: white;
  transition: opacity 0.2s ease;
  margin-left: 15px;
}
.header-link:hover {
  opacity: 0.8;
}

/* Zone des messages => scrollbar grise #f1f1f1 */
#chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
#chat-messages::-webkit-scrollbar {
  width: 8px;
  background: #f1f1f1;
}
#chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Messages */
.message {
  margin: 10px 0;
  display: flex;
  align-items: center;
}
.message.user {
  justify-content: flex-end;
}
.bubble {
  max-width: 70%;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
}
.bubble.user {
  background: #5468ff;
  color: white;
  text-align: right;
}
.bubble.bot {
  background: #eeeeee;
  color: #333;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 10px;
  background-size: cover;
}

/* Input zone */
#chat-input {
  display: flex;
  align-items: center;
  background: #f1f1f1;
  border-top: 1px solid #ddd;
  padding: 10px;
  gap: 10px; 
}
#chat-input textarea {
  flex: 1;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 15px;
  resize: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Bouton Envoyer */
#btn-send {
  padding: 10px 20px;
  background: linear-gradient(90deg, #5468ff 0%, #9b7cff 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  transition: opacity 0.2s ease;
  position: relative;
  z-index: 1;
}
#btn-send:hover {
  opacity: 0.85;
}

/* CTA icônes (CV, Calendrier) */
.cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  font-size: 18px;
  position: relative; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cta-icon img {
  width: 24px;
  height: 24px;
}
.cta-icon:hover {
  box-shadow: none;
  transform: translateY(1px);
}
.cta-violet {
  background: #4864FF;
}

/* Tooltip container */
.tooltip {
  position: relative;
  cursor: pointer;
  z-index: 300;
}
.tooltiptext {
  visibility: hidden;
  width: 130px;
  background: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  bottom: 125%; 
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 12px;
  z-index: 999;
}
.tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Animation d'apparition des bulles */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sur mobile (max-width: 768px) : on masque la tooltip, etc. */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  #cta-cv-icon .tooltiptext,
  #cta-cal-icon .tooltiptext {
    display: none !important;
  }
  #chat-container {
    border-radius: 15px; 
    overflow: hidden;
  }
}
@media (max-width: 768px) {
  .mid-popup-btns {
    flex-direction: column;
    align-items: center;
  }
  .mid-popup-btns button,
  .mid-popup-btns a {
    margin-bottom: 10px; /* un petit espace en bas */
    width: 80%; /* éventuellement plus large */
  }
  /* enlever le margin-bottom au dernier si tu veux pas d'espace en trop */
  .mid-popup-btns button:last-child,
  .mid-popup-btns a:last-child {
    margin-bottom: 0;
  }
}