:root{

--hdr-bg: rgba(132, 129, 138, 0.121); /* translucent to let the blur show */
--text: #e7e9f3;
--muted: #aab1c7;
--ring: 0 0 0 2px rgba(138,54,255,.15);
--primary1: #2a3fc7;
--primary2: #8a36ff;
--primary3: #8f4383;
--radius: 14px;
--headRad: linear-gradient(10deg, rgba(255, 255, 255, 0.35) 0%, rgb(255 255 255 / 38%) 20%, rgb(65 116 181 / 12%) 100%);
--headRad_reverse: linear-gradient(0deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 0%) 86%), rgb(243 243 243 / 38%);
--logoTxt: rgb(25 24 27 / 72%);
}
html[data-theme="dark"][data-theme-lock="on"]{
--headRad: linear-gradient(10deg, rgb(27, 30, 29) 10%, rgb(34 34 44 / 0%) 100%), rgba(37, 108, 157, 0.32) 10%;
--headRad_reverse: transparent;

--logoTxt:white;
}

/* -- Enveloppe globale du header -- */
header {
    display: flex;                    /* Mise en page en flexbox */
    align-items: center; 
    text-align: center;             /* Aligne verticalement au centre */
    justify-content: space-between;   /* Espace égal entre les blocs */
    backdrop-filter: saturate(100%) blur(4px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    background: var(--headRad);
    /*box-shadow: 0px 1px 5px 0px rgb(88 26 196 / 54%);*/
    padding: 0 10px;                  /* Marge intérieure à gauche/droite */
    width: 100%;
    min-width: 790px;
    box-sizing: border-box;           /* Pour inclure la bordure dans le calcul de la largeur */
    position: fixed;
    top:0px;
    z-index: 99;
  }

  .logoContainer {
    display: flex;            
    align-items: center;  
    font-family: "LtpEB";
    margin-left: 5px;
    margin-top: 4px;
  }

  .logoContainer .logo img {
    max-height: 50px;
    width: auto;             
  }
  

  .logoTxt {
    margin-top: 0px;
    margin-left: 6px;
    font-size: 28px;
  } 

  .logoTxt a{
    text-decoration: none;
  }
  /* -- Logo à gauche -- */
  .logo img {
    max-height: 40px;    
    height: auto;
    width: auto;
    display: flex;      /* Pour éviter les petits décalages d’images inline */
  }

  #logoTxtA{
    color: var(--logoTxt);
  }
  #backLogoB
  {
    background: linear-gradient(11deg, rgba(255,93,133,1) 0%, rgba(63,63,255,1) 73%);
    background-clip: border-box;
    background-origin: border-box;
    border: solid 1px transparent;
    border-radius: 5px;
    margin-left: 12px;
  }
  #logoBimg
  {
    width: 25px;
    height: auto;
  }

  #logoTxtB{
    background-color: rgb(243, 243, 243);
    border-radius: 5px;
  }

  #logoTxtB2{
    background: linear-gradient(11deg, rgba(255,93,133,1) 0%, rgba(63,63,255,1) 73%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-top: 0px;
    padding-bottom: 3px;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 20px; 
  }


  
 
  
  nav ul {
    list-style: none;         /* Enlève les puces */
    margin: 0;
    padding: 0;
    display: flex;           
    align-items: center;      
    gap: 20px;  
    font-size: 0.9em;             
  }
  
  /* Style des liens */
  nav ul li a {
    text-decoration: none;
    color: #612a9b;
    padding: 5px 10px;
    display: inline-block;
    background-color: none;   
    border-radius: 4px;
    border: solid 1px transparent;
  }
  nav ul li a:hover {
    border: solid 1px #612a9b;
  }
  
  /* -- Bouton déconnexion à droite -- */
  .threadInfo-container{
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-content: center;
    align-items: stretch;
    gap: 10px;
  }
.threadActionHeaderBtn {
  appearance: none;
  border: none;
  background: rgb(216 217 255 / 40%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

#deleteChatBtn {
  background-image: url('../img/icon_gen/trashblack.png');
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}
#deleteChatBtn:hover {
  background: #d2454abf;
  background-image: url('../img/icon_gen/trashblack.png');
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}
  .chat-name-container {
    max-width: 480px;
    text-align: center;
    border-bottom: 1px solid #007BFF;
    display:flex; 
    align-items:center; 
    gap:10px; 
    background: rgb(216 217 255 / 40%); 
    border:1px solid rgba(255,255,255,.12);  
    border-radius: 999px; color: var(--muted); 
  }
.chat-name-container span{ font-size: 12px; }
.chat-name-container input{
appearance:none; border:0; outline: none; background: transparent; color: var(--text);
min-width: 180px; font-weight: 600;
}
.chat-name-container input:focus{ box-shadow: var(--ring); border-radius: 999px; padding-left: 6px; }

  #chatNameInput {
    font-size: 1em;
    border: none;
    
    outline: none;
    text-align: left;
    text-align: center;
    background-color: transparent;
    color: #000000;
  }
  
  #renameChatBtn {
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    margin-left: 10px;
    cursor: pointer;
  }
  
  #nameStatusMsg {
    font-size: 0.9em;
    color: #28a745;
  }
  
/* Container avec Grid */
.folder-dropdown-wrapper {
    display: inline-grid;
    grid-template-columns: fit-content(400px); /* ✅ S'adapte au contenu */
    grid-template-rows: auto;
    vertical-align: middle;
    max-width: 160px;
    align-items: center;
    overflow:ellipsis;
}

/* Ghost invisible qui définit la largeur */
.folder-dropdown-ghost {
    grid-column: 1;
    grid-row: 1;
    visibility: hidden;
    padding: 3px 30px 3px 12px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap; /* ✅ IMPORTANT: nowrap au lieu de pre */
    border: 1px solid transparent;
    pointer-events: none;
    min-width: 50px;
    max-width: 160px;
    overflow:ellipsis;

}

/* Select superposé au ghost */
.chat-folder-select {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 50px;
    max-width: 160px;
    overflow:ellipsis;
    padding: 3px 30px 3px 12px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: rgb(15 88 237 / 3%);
    border: 1px solid transparent;
    border-bottom-left-radius: 99px;
    border-top-left-radius: 99px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Flèche dropdown */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
}

.chat-folder-select:hover {
    border-color: #7e0aea;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.chat-folder-select:focus {
    outline: none;
    border-color: #7e0aea;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.chat-folder-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

/* État de chargement */
.chat-folder-select.loading {
    pointer-events: none;
}


/* Style pour les options */
.chat-folder-select option {
    padding: 10px;
    font-size: 14px;
}

/* Animation de chargement */
.chat-folder-select.loading {
    background-color: #f0f0f0;
    color: #999;
    cursor: wait;
}

.header-actions {
  display: grid;
  grid-auto-flow: column;    /* aligne les items en ligne */
  grid-auto-columns: max-content;
  gap: 8px;                  /* espace entre les icônes */
  align-items: center;
}

.lookup-toggle_icon {
  display: inline-block;         
  width: 28px;
  height: 28px;
  background-image: url('../img/icon_gen/lookupSmall.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
  border: transparent;
  border-radius: 5px;
  cursor: pointer;

}

.logoutBox {
  display: inline-block;         
  width: 28px;
  height: 28px;
  background-image: url('../img/icon_gen/logout.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 5px;
}



#theme-toggle  {
  width: 28px;
  height: 28px;
  background-image: url('../img/icon_gen/sun.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: transparent;
  border-radius: 5px;
  cursor: pointer;
  }

    /*Notification float a1*/
.notification {
  position: fixed;
  top: 85px;
  right: 30px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #f9f9f9;
  opacity: 0.8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  max-width: 400px;
  font-family: "LtpR", Helvetica, sans-serif;
}

.notification-message {
  flex: 1;
}

.notification-close {
  margin-left: 10px;
  cursor: pointer;
  font-weight: bold;
}
  /* Types de notifications */
.notification-success {
  background-color: #319949;
  border-color: #0d461a;
  color: #0d461a;
}

.notification-error {
  background-color: #f8d7da;
  border-color: #721c24;
  color: #721c24;
}

.notification-warning {
  background-color: #ffe09c;
  border-color: #856404;
  color: #856404;
}

.notification-info {
  background-color: #d1ecf1;
  border-color: #0c5460;
  color: #0c5460;
}