body {
  background: #262624;
  color: #eee;
  font-family: 'Inter', sans-serif;
  line-height: 28px;
  margin: 0;
  min-height: 100vh;
}

html, body {
  scroll-behavior: auto !important;
}

.logo-header {
  position: absolute;
  top: 15px;
  left: 32px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 10px;
  /**max-width: 190px; **/
  height: 42px;
  box-shadow: 0 2px 18px #0004; /* Ombre un peu plus visible sur dark */
  margin: 0;
}

.logo-header img {
  background-color: #232323;   /* Fond très foncé pour dark */
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  border-radius: 10px;         /* (optionnel) coins arrondis sur le logo */
}

/* Responsive mobile : on rapproche encore plus du bord */
@media (max-width: 700px) {
  .logo-header {
    top: 8px;
    left: 12px;
    height: 50px;
    max-width: none;
  }
  .logo-header img {
    height: 50px;         /* Conserve la hauteur */
    width: 150px;         /* Ajoute une largeur fixe plus grande */
    max-width: 200px;     /* Ou adapte à la taille que tu veux */
    object-fit: contain;  /* Garde l’aspect du logo, évite la déformation */
    display: block;
  }
}


.title-ia {
  font-size: 2.1em;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 10px 60px 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container.empty {
  justify-content: center;
  min-height: 100vh;
}

.header {
  text-align: center;
  margin-top: 38px;
  margin-bottom: 35px;
}

.header h1 {
  font-size: 2.3em;
  font-weight: 600;
  margin: 0;
}

.conversation {
  flex: 1 1 auto;
  margin-bottom: 25px;
  margin-top: 50px;
}

@media (max-width: 700px) {
.conversation {
  flex: 1 1 auto;
  margin-bottom: 25px;
  margin-top: 80px;
}
}

.msg-block {
  border-radius: 18px;
  padding: 20px 26px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px #0002;
}

.user {
  margin-bottom: 2px;
  background: #141413;
}

.ai {}

.avatar {
  float: left;
  width: 34px;
  height: 34px;
  background: #ffffff;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35em;
  margin-right: 12px;
  font-family: 'Inter', sans-serif;
}

.user .avatar {}

.ai .avatar {
  background: #3455db;
}

.msg-content {
  margin-left: 48px;
  min-height: 42px;
  min-width: 80%;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.msg-block.ai {
  min-height: 42px;
  min-width: 80%;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.form-block {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- FORMULAIRE CLAUDE STYLE --- */
.claude-form {
  display: block;
  width: 100%;
  max-width: 600px;
}

.textarea-wrap {
  background: #30302E;
  border-radius: 18px;
  border: 1.2px solid #484848;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0;
}

.textarea-wrap textarea {
  background: none;
  color: #eee;
  border: none;
  outline: none;
  resize: none;
  width: 100%;
  font-size: 1.08em;
  font-family: inherit;
  padding: 20px 16px 52px 16px;
  min-height: 54px;
  max-height: 250px;
  box-sizing: border-box;
  line-height: 1.38;
}

.textarea-wrap textarea:focus {
  border: none;
  outline: none;
}

.actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  padding: 0 12px 0 10px;
  background: transparent;
}

.attach-btn {
  background: none;
  border: none;
  color: #aaa;
  padding: 0 8px 0 0;
  border-radius: 7px;
  height: 38px;
  width: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attach-btn:hover {
  background: #262626;
  color: #eee;
}

.attach-btn-disabled,
.attach-btn:disabled {
    background: #e9e9e9 !important;
    color: #a5a5a5 !important;
    border: 1.2px solid #ddd !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}
.attach-btn-disabled svg {
    stroke: #fff !important;
}

.attach-btn-disabled input[type="file"] {
    pointer-events: none;
}


#sendBtn {
  background: #fff;
  border: none;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.22em;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.13s, box-shadow 0.13s;
}

#sendBtn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

#sendBtn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fd935c66;
}

#sendBtn svg,
.attach-btn svg {
  display: block;
}

.send-btn-wrapper {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

/* --- FIN FORMULAIRE CLAUDE --- */
.prompt-hint {
  color: #ccc;
  font-size: 1em;
  margin-top: 10px;
  text-align: left;
  max-width: 600px;
}

.newconv-btn {
  display: inline-block;
  background: #4f515c;
  color: #fff;
  font-size: 0.8em;
  padding: 5px 15px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  margin-top: 37px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.13s;
}

.newconv-btn:hover {
  background: #4f515c;
}

.recent-convs {
  margin: 40px auto 0 auto;
  max-width: 500px;
  text-align: center;
}

.recent-convs-title {
  font-size: 1.1em;
  color: #ccc;
  margin-bottom: 7px;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.recent-item {
  background: #2d2f33;
  color: #eee;
  border-radius: 12px;
  padding: 7px 14px;
  font-size: 0.97em;
  text-decoration: none;
  border: 1px solid #222;
  transition: background 0.13s;
}

.recent-item:hover {
  background: #383e49;
}

.ai .msg-content {
  background: none;
  margin-left: 0;
}

.user .msg-content {
  background: none;
}

/* markdown override */
.msg-content h2 {
  font-size: 1.44em;
  font-weight: 400;
  margin-top: 18px;
  margin-bottom: 20px;
  color: #ffffff;
}

.msg-content h3 {
  font-size: 1.36em;
  font-weight: 800;
  margin-top: 27px;
  margin-bottom: 16px;
  color: #ffffff;
}

.msg-content h4 {
  font-size: 1em;
  font-weight: 400;
  margin-top: 27px;
  margin-bottom: 17px;
  color: #ffffff;
}

.msg-content a {
  color: #7fc4f4;
}

.msg-content ul {
  margin-left: 0px;
  padding-left: 16px;
}

.msg-content li {
  margin-left: 0;
  padding-left: 0;
  margin-bottom: 16px;
}

.msg-content hr {
  margin-top: 40px;
  margin-bottom: 40px;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
}

.typing {
  color: #fff;
  margin-left: 0;
  text-align: left;
  display: block;
}

@media (max-width: 700px) {
  .container {
    min-height: unset;
  }
  form#askForm,
  .claude-form {
    max-width: 97vw;
  }
  .header h1 {
    font-size: 1.5em;
  }
  .textarea-wrap textarea {
    font-size: 1em;
    padding-bottom: 54px;
  }
  .actions-bar {
    height: 54px;
  }
}

.uploaded-files-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px 0 16px;
}

.uploaded-file {
  background: #232323;
  border-radius: 10px;
  padding: 7px 13px 7px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  max-width: 210px;
  overflow: hidden;
}

.uploaded-file .file-icon {
  font-size: 18px;
}

.uploaded-file .file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.uploaded-file .file-type {
  font-size: 0.97em;
  color: #bbb;
  margin-left: 5px;
}

.uploaded-file .remove-file {
  background: none;
  border: none;
  color: #bbb;
  font-size: 20px;
  cursor: pointer;
  margin-left: 5px;
  padding: 0;
  line-height: 1;
  transition: color 0.12s;
}

.uploaded-file .remove-file:hover {
  color: #fd935c;
}

.top-auth-bar {
    position: absolute;
    top: 30px;
    right: 42px;
    z-index: 30;
    display: flex;
    gap: 8px;
}

.btn-auth {
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: 500;
    border: none;
    outline: none;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background 0.14s, color 0.13s;
}

.btn-auth-login {
    background: #fff;
    color: #222;
    border: none;
}

.btn-auth-signup {
    background: none;
    color: #fff;
    border: 1.2px solid #fff;
}

.btn-auth-signup:hover {
    background: #fff;
    color: #222;
}
.btn-auth-login:hover {
    background: #ededed;
    color: #111;
}

.user-menu-wrapper {
  position: relative;
  display: inline-block;
}

/* Place l’avatar tout en haut à droite uniquement sur mobile */
@media (max-width: 699px) {
  .user-menu-wrapper {
    position: absolute;
    top: -15px;     /* ajuste ici pour affiner */
    right: -18px;  /* ajuste ici pour affiner */
    z-index: 20;
    display: flex;
    align-items: flex-start;
  }
}

/* Sur desktop, reste dans le flux naturel */
@media (min-width: 700px) {
  .user-menu-wrapper {
    position: static;
    margin-top: 0;
    right: auto;
    top: auto;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
  }
}

.user-avatar {
  background: #fff;
  color: #232323;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.32em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  border: 2px solid #e0e0e0;
  transition: border 0.2s;
  box-shadow: 0 1px 8px #0001;
}
.user-avatar:hover {
  border-color: #bbb;
}


@media (max-width: 699px) {
.user-avatar {
margin-top:30px;
margin-right:30px;
  }
}


.user-menu {
  position: absolute;
  right: 0;
  top: 70px;
  background: #232323;
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 18px #0003;
  min-width: 250px;
  padding: 13px 0 7px 0;
  z-index: 101;
  display: none;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
.user-menu-email {
  padding: 8px 26px;
  font-size: 0.8em;
  color: #aaa;
  border-bottom: 1px solid #444;
  margin-bottom: 6px;
  word-break: break-all;
}
.user-menu-link {
  display: block;
  padding: 11px 26px;
  text-align: left;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.03em;
  text-decoration: none;
}
.user-menu-link:hover {
  background: #161616;
}

/* quand le JS bascule la classe "open" sur #userMenu */
.user-menu.open {
  display: block;
}

@media (max-width: 700px) {
  .btn-auth-signup {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .btn-auth-login {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 0.8em;
    padding: 8px 0px;
    height: auto;
    min-width: 120px;
    z-index: 40;
    white-space: nowrap;  
    line-height: 1.2;      
    text-align: center;
    display: inline-block;     
  }
  .top-auth-bar {
    top: 0px !important;
    right: 0px !important;
    gap: 0 !important;
  }
}

.settings-modal-backdrop {
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(20,20,22,0.60);
  display: block;
}
.settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  transform: translate(-50%,-50%);
  min-width: 370px;
  background: #232323;
  color: #eee;
  border-radius: 18px;
  box-shadow: 0 8px 36px #000c;
  padding: 36px 36px 18px 36px;
  max-width: 98vw;
}
.settings-modal-inner {
  width: 100%;
}
.settings-modal h2 { margin-top: 0; text-align: center; }
.settings-modal label { display: block; margin: 20px 0 7px 0; font-weight: 500; }
.settings-modal input, .settings-modal select {
  width: 90%; font-size: 1.07em; padding: 8px 10px; border-radius: 8px; border: 1px solid #444; margin-top: 3px; background: #181818; color: #fff;
}
.settings-btn {
  margin-top: 25px; width: 100%; padding: 12px 0; border-radius: 12px; border: none;
  background: #fff; color: #232323; font-weight: bold; font-size: 1.1em; cursor: pointer;
  transition: background 0.2s;
}
.settings-btn:hover { background: #f5f5f5; }
.settings-close-btn {
  margin-top: 15px;
  width: 100%;
  padding: 10px 0;
  background: transparent;
  color: #aaa;
  border: 1px solid #444;
  border-radius: 10px;
  font-size: 1em;
  cursor: pointer;
}
#settingsMsg { margin-top: 12px; text-align: center; }
@media (max-width: 600px) {
  .settings-modal { min-width: 95vw; padding: 20px 7vw; }
}

.settings-modal-close {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 1.7em;
  color: #bbb;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  z-index: 10;
  padding: 3px 10px 2px 10px;
  border-radius: 99px;
}
.settings-modal-close:hover {
  background: #292929;
  color: #fff;
}
.settings-modal-inner {
  position: relative;
}

.logo-header .logo-light { display: none; max-width:}
.logo-header .logo-dark  { display: block; max-width:}

#stopIcon { color: black; }

.cta-login-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    margin: 10px 0 30px 0;
}

.cta-login-inner {
    /** background: #fff; **/
    border-radius: 18px;
    box-shadow: 0 4px 16px #0001;
    padding: 34px 36px 28px 36px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-login-title {
    font-size: 1.20em;
    font-weight: 500;
    margin-bottom: 20px;
    color: #181818;
    letter-spacing: 0.02em;
}

.cta-login-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

@media (max-width: 700px) {
    .cta-login-inner {
        padding: 20px 10px 16px 10px;
    }
    .cta-login-title {
        font-size: 1em;
    }
    
}


@media (max-width: 700px) {
    /* Affiche toujours le bouton Inscription dans le CTA */
    .cta-login-actions .btn-auth-signup {
        display: inline-block !important;
    }
    /* Et on force l’affichage du bouton Se connecter au même endroit */
    .cta-login-actions .btn-auth-login {
        display: inline-block !important;
    }
}


/* ------------ Tooltip pour bouton attaché désactivé ------------ */

.attach-btn {
  position: relative;  /* nécessaire pour le ::after */
}

/* Quand le bouton est désactivé ET qu’il a un data-tooltip, on affiche la bulle au hover */
.attach-btn_disabled[data-tooltip]:hover::after,
.attach-btn:disabled[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 1001;
  box-shadow: 0 2px 8px #0002;
  font-size: 0.95em;
  pointer-events: none;  /* la bulle elle-même ne capte pas les clicks */
}

.home-title {
  font-size: 1.5em;
  font-weight: 500;
  color: #FFF;
  text-align: center;
  margin: -50px auto 20px auto;
}

@media (max-width: 700px) {
  .home-title {
    margin: 70px auto 20px auto !important; 
  }
}

footer {
    font-size: 0.9rem;
    color: #d5d5d6;
    text-align: center;
    margin-top:30px;
    padding: 2rem 0 1.5rem 0; /* optionnel pour donner de l'air */
}
footer a {
    color: inherit;
    text-decoration: underline;
    margin: 0 5px;
}