body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background-color: #ffffff;
  color: #1c1c1c;
}

:root {
  --point-color: #000;
  /* noir */
  --size: 2.5px;
  /* plus petits */
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--size) * 3);
}

.loader__element {
  width: calc(var(--size) * 2);
  height: calc(var(--size) * 2);
  border-radius: 50%;
  background-color: #000;
  animation: preloader .6s ease-in-out alternate infinite;
}

.loader__element:nth-child(2) {
  animation-delay: .2s;
}

.loader__element:nth-child(3) {
  animation-delay: .4s;
}

@keyframes preloader {
  100% {
    transform: scale(2);
  }
}

@keyframes glowBorder {
  0% {
    box-shadow: 0 0 0px #ffeb3b75;
  }

  50% {
    box-shadow: 0 0 10px 2px #ffeb3b61;
  }

  100% {
    box-shadow: 0 0 0px #ffeb3b58;
  }
}

.glow-button {
  animation: glowBorder 2s infinite ease-in-out;
  transition: box-shadow 0.3s ease;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 3.5rem;
  /* mode medium */
  background: #fff;
  /* fond blanc */
  border-bottom: 1px solid #e2e8f0;
  /* liseret gris clair */
}

.header__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__btn {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.header__btn:hover {
  background: #f1f5f9;
}

.header__title h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.header__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
}

@media (max-width: 767px) {

  body,
  html {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
  }

  header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background-color: #fff;
    z-index: 1000;
    transform: translateZ(0);
    /* hack pour forcer le rendu sur GPU mobile */
  }

  .container {
    padding-top: 0px;
    /* header height + margin */
    flex-grow: 1;
  }

  .intro-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
  }

  .messages {
    margin-top: 60px;
    /* intro-container height */
    padding-bottom: 120px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* pour rendre fluide sur iOS */
  }
}

.messages .bubble:last-child {
  margin-bottom: 100px; /* ou adapte selon la hauteur réelle de .input-area */
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ddd;
  background-color: white;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  color: #3D3D3D;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Rond et centré sur mobile */
@media (max-width: 768px) {
  .share-button {
    padding: 4px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    justify-content: center;
  }

  .share-button .hide-on-mobile {
    display: none;
  }
}


.container {
  display: flex;
  flex-direction: column;
  height: 85vh;
  justify-content: space-between;
  max-width: 700px;
  margin: 0 auto;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 800px;
  width: 100%;
  margin-top: 40px;
  /* Rendre la barre de défilement invisible */
  -ms-overflow-style: none;
  /* Pour les navigateurs IE et Edge */
  scrollbar-width: none;
  /* Pour Firefox */
}

.grid-container::-webkit-scrollbar {
  display: none;
  /* Pour les navigateurs basés sur WebKit (Chrome, Safari) */
}

.card {
  background: #f1f1f1;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  /* Centrer verticalement le texte et le SVG */
  font-size: small;
  font-weight: 600;
}

.input-container {
  min-height: 40px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* Media Query pour les écrans mobiles */
@media (max-width: 768px) {
  .grid-container {
    display: flex;
    overflow-x: scroll;
    /* Pour activer le défilement horizontal */
    flex-direction: row;
    gap: 10px;
    width: 100%;
    margin-bottom: 0px;
    margin-top: 0px;
  }

  .card {
    display: inline-block;
    /* Permet à l'élément de s'ajuster à son contenu */
    white-space: nowrap;
    /* Empêche le texte de passer à la ligne (facultatif selon besoin) */
    padding: 15px 20px;
    /* Ajoute un peu d'espace autour du texte */
    margin-right: 5px;
    margin-left: 5px;
  }

  .container {
    height: auto;
    /* Ajuste la hauteur en fonction du contenu sur mobile */
  }
}

.messages {
  overflow-y: auto;
  flex-grow: 1;
  padding-top: 20px;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

@media screen and (max-width: 768px) {
  #chat.messages {
    height: 80vh;
    overflow-y: auto;
  }
}

/* Cacher scrollbar sur Webkit (Chrome, etc.) */
.messages::-webkit-scrollbar {
  display: none;
}

/* 🟩 En mobile : ajout du padding-right */
@media (max-width: 767px) {
  .messages {
    padding: 10px;
  }
}


.messages::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge, Opera */
}

@media (max-width: 767px) {
  .messages {
    padding-bottom: 80px;
    /* ajuste selon la hauteur réelle de .input-area */
  }

}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(130, 130, 130, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #ffffff;
  color: #111827;
  padding: 32px;
  border-radius: 32px;
  width: 100%;
  max-width: 600px;
  /* ← gère la largeur totale raisonnable */
  position: relative;
  margin: auto;
}

@media (max-width: 767px) {
  .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 9999;
  }
  
  .modal-h1 {
    text-align: center;
  }

  .modal-header p.save-text {
    text-align: center;
  }
}

.modal-content h2 {
  font-size: 20px;
  text-align: center;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #4b5563;
  cursor: pointer;
}

.offers-container {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.offer-card {
  background-color: #f8F8F8;
  border: 0px solid #d1d5db;
  border-radius: 16px;
  width: 240px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  /* Supprime justify-content: space-between */
  /* Ajoute: */
  align-items: flex-start;
  /* si tu veux aligner le contenu à gauche */
  height: auto;
  /* facultatif, c'est la valeur par défaut */
}

.offer-card-2 {
  background-color: #ffffff;
  border: 1px solid #e9ebef;
  border-radius: 16px;
  width: 240px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  /* Supprime justify-content: space-between */
  /* Ajoute: */
  align-items: flex-start;
  /* si tu veux aligner le contenu à gauche */
  height: auto;
  /* facultatif, c'est la valeur par défaut */
}

.offer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}


.offer-card ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  /* espace entre l'icône et le texte */
  margin-bottom: 8px;
  font-size: 13px;
  color: #888888;
}

.offer-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #888888;
}

.offer-card li {
  margin-bottom: 8px;
}

.offer-card h2 {
  margin-bottom: 8px;
  margin-top: 0px;
  font-size: 38px;
  color: #000000;
  font-weight: 500;
}

.offer-card h3 {
  margin-bottom: 16px;
  margin-top: 0px;
  font-size: 26px;
  color: #000000;
  font-weight: 500;
}

.offer-card-2 ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  /* espace entre l'icône et le texte */
  margin-bottom: 8px;
  font-size: 13px;
  color: #888888;
}

.offer-card-2 ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 16px;
  color: #888888;
}

.offer-card-2 li {
  margin-bottom: 8px;
}

.offer-card-2 h3 {
  margin-bottom: 16px;
  margin-top: 0px;
  font-size: 26px;
  color: #000000;
  font-weight: 500;
}

.offer-card-2 h2 {
  margin-bottom: 8px;
  margin-top: 0px;
  font-size: 38px;
  color: #000000;
  font-weight: 500;
}

.modal-header {
  display: flex;
  flex-direction: column;
  /* 🔁 empile les éléments verticalement */
  align-items: center;
  /* 🔁 centre horizontalement */
  /* espace entre le h2 et le toggle */
}

.segment-toggle {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #F8F8F8;
  border-radius: 999px;
  padding: 2px;
  font-family: sans-serif;
  width: 180px;
  margin-bottom: 4px;
  margin-top: 12px;

}

.glider {
  position: absolute;
  inset: 4px;
  /* top, right, bottom, left = 2px */
  width: 48%;
  height: auto;
  background-color: #ffffff;
  border-radius: 999px;
  transition: transform 0.3s ease;
  z-index: 0;
}

.segment-toggle button {
  position: relative;
  flex: 1;
  z-index: 1;
  border: none;
  background: none;
  padding: 8px 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #888888;
  transition: color 0.3s;
}

.segment-toggle button.active {
  color: #000;
}

.save-text {
  color: #888888;
  /* équivalent de text-text-secondary */
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.5;
  font-family: sans-serif;
}

.highlight {
  font-weight: bold;
  color: #0062ff;
  /* équivalent de hsl(var(--blue-60)) */
}

.btn-choose {
  display: inline-block;
  text-decoration: none;
  background-color: #e5e7eb;
  color: #000000;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.auto-resize-textarea {
  width: 100%;
  min-height: 40px;
  max-height: 100px;
  overflow-y: auto;
  resize: none;
  padding: 8px;
  font-size: 16px;
  line-height: 1.4;
  box-sizing: border-box;
  border: 1px solid #ffffff;
  border-radius: 4px;
  font-family: inherit;
}

@media (max-width: 768px) {
  .auto-resize-textarea {
    max-height: 40px;
  }
}

.auto-resize-textarea:focus {
  outline: none;
  border-color: #ffffff;
  /* ou une autre couleur douce */
  box-shadow: none;
  /* au cas où un navigateur applique un effet */
}

.bubble {
  background-color: #f1f1f1;
  border-radius: 20px;
  padding: 8px;
  padding-right: 20px;
  width: fit-content;
  max-width: 85%;
  white-space: pre-wrap;
  line-height: 1.5;
}

.bubble.user {
  display: block;
  margin-left: auto;
  margin-right: 0;
  padding-left: 20px;
  padding-top: 8px;
  padding-bottom: 8px;
  background-color: #f1f1f1;
  max-width: 400px;
  margin-bottom: 10px;

  /* ✨ Ajout essentiel pour le retour à la ligne */
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

@media (max-width: 767px) {
  .bubble.user {
    max-width: 80%;
  }
}

.bubble.assistant {
  align-self: flex-start;
  background-color: #fFFFFF;
  margin-bottom: 10px;
}

.input-area {
  border-top: 1px solid #ddd;
  border: 1px solid #ddd;
  /* Contour gris de 1px */
  padding: 20px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  gap: 12px;
  border-radius: 30px;
  /* Rayon de bordure de 20px */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Ombre portée */
  margin-bottom: 10px;
  z-index: 20;
}

@media (max-width: 767px) {
  .input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.09);
    /* Ombre qui monte */
    z-index: 999;
  }
}


.input-box {
  display: flex;
  gap: 10px;

}

.input-box input.input-text {
  padding-left: 0;
}

.bottom-disclaim {
  color: #888;
  /* Gris clair */
  font-size: 10px;
  /* Taille du texte en 10px */
  text-align: center;
  /* Centrer le texte horizontalement */
  margin-bottom: 4px;
}


.input-box input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid white;
  border-radius: 0px;
  font-size: 15px;
}

.input-box button {
  background-color: black;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
}

.icon-text {
  display: inline-flex;
  /* aligne icône + texte horizontalement */
  align-items: center;
  /* centre verticalement icône et texte */
  gap: 4px;
  font-weight: 600;
  font-size: 12px;
  color: #777777
}

.icon-no-text {
  display: inline-flex;
  /* aligne icône + texte horizontalement */
  align-items: center;
  /* centre verticalement icône et texte */
  gap: 4px;
  color: #777777;
}

.input-text {
  border-color: #ffffff;
  outline: none;
  border: none;
}

.input-text::placeholder {
  color: #aaa;
  /* la couleur que vous voulez */
  opacity: 1;
  /* pour forcer l’opacité sur certains navigateurs */
}

.submit-btn {
  display: inline-flex;
  /* ou flex si bouton block */
  align-items: center;
  /* centre verticalement */
  justify-content: center;
  /* centre horizontalement */
  background-color: black;
  color: white;
  border: none;
  border-radius: 999px;
  height: 36px;
  width: 36px;
  cursor: pointer;
  margin-right: 0px;
}

.suggestions span {
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 10px 10px;
  border-radius: 30px;
  cursor: pointer;
  margin: 0px;
}

.suggestions {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  /* espace entre les icônes */
}

/* État par défaut : gris */
.submit-btn {
  margin-left: auto;
  background-color: #ccc;
  color: #fff;
  transition: background-color 0.2s ease;
  cursor: default;
}

/* État “actif” : noir */
.submit-btn.active {
  margin-left: auto;
  background-color: #000;
  cursor: pointer;
}

/* Ordinateur : la position reste en bas */
.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* Garder le contenu en bas sur les grands écrans */
  height: 100%;
  /* Occupation totale de la hauteur de la page */
  text-align: center;
  gap: 10px;
}

/* Mobile : Centrer verticalement */
@media (max-width: 767px) {

  /* Modifier l'intro-container pour le positionner juste au-dessus de l'input-area */
  .intro-container {
    position: fixed;
    /* Fixer l'élément en bas de l'écran */
    bottom: 60px;
    /* Espacement de 10px au-dessus de l'input-area */
    left: 0;
    right: 0;
    padding-top: 10px;
    margin-bottom: 74px;
    text-align: center;
    z-index: 10;
    /* Assurer qu'elle est au-dessus de l'input-area */
    height: auto;
  }

  .grid-container {
    gap: 0px;
    margin-top: 100px;
  }

  .card {
    margin-left: 12px;
    width: fit-content;
  }
}

/* Photo ronde de 50×50px */
.intro-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  /* cercle parfait */
  object-fit: cover;
}

.profil-photo {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  /* cercle parfait */
  object-fit: cover;
}

/* Texte plus gros */
.intro-message {
  font-size: 1.75rem;
  /* agrandi (ajustez à 1.5rem, 2rem, etc.) */
  font-weight: bold;
  padding: 0 20px;
}

.intro-message-secondary {
  font-size: 1.2rem;
  /* agrandi (ajustez à 1.5rem, 2rem, etc.) */
  padding: 0 20px;
}


body,
html {
  overflow-x: hidden;
  /* Désactive le défilement horizontal */
  height: 100%;
  /* Assure que le corps prend toute la hauteur de l'écran */
  margin: 0;
  /* Enlève la marge par défaut */
}


@media (max-width: 767px) {
  .hide-on-mobile {
    display: none;
  }
}

@media (max-width: 767px) {
  html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  .container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  .messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 10px;
    padding-bottom: 120px; /* espace suffisant pour input-area */
    box-sizing: border-box;
  }

  .input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
  }

  .intro-container {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 998;
    background: white;
    text-align: center;
  }
}


