@import '../../node_modules/@melloware/coloris/dist/coloris.css';
@import '../../node_modules/bootstrap/dist/css/bootstrap.min.css';
@import '../../node_modules/bootstrap-select/dist/css/bootstrap-select.min.css';
@import '../../node_modules/bootstrap5-toggle/css/bootstrap5-toggle.min.css';
@import '../../node_modules/jquery-ui/dist/themes/base/jquery-ui.min.css';
@import '../../node_modules/leaflet/dist/leaflet.css';

body {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: .875rem;
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */

.sidebar { 
  position:fixed;
  top: 60px;
/*  bottom: 0;
  left: 0; */
  z-index: 1000; /* Behind the navbar */
  padding: 0;
  max-width: 180px;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
  font-size: 0.9rem;
}

.sidebar-right {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100; /* Behind the navbar */
  padding: 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 48px;  /* Height of navbar */
  height: calc(100vh - 48px);
  padding-top: .5rem;
  padding-left: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
}

.sidebar .nav-link .feather {
  margin-right: 4px;
  color: #999;
}

.sidebar .nav-link.active {
  color: #007bff;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar-heading {
  font-size: .75rem;
  text-transform: uppercase;
}

#products-deck {
  position: relative;
  top: 60px;
  left: 170px;
  right: 0px;
  overflow-y: auto;
  width: calc-size(100%, size - 180px);
}

#hopes-container.chat-minimized #products-deck {
  width: calc(100vh - 30px);
}

/*
 * Navbar
 */

.navbar {
  position: sticky;
  top: 0px;
  right: 0px;
  left: 500px;
  height: 60px!important;
  padding-left: 50px;
  border-bottom: 2px solid #EEE;
}

ul.nav-tabs {
  padding: 1em;
}

.navbar-brand {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
  background: #EEE; 
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .form-control {
  padding: .75rem 1rem;
  border-width: 0;
  border-radius: 0;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.nav-link {
  font-size: 1.1rem;
  color: #999;
}

.nav-link:hover {
  color: #777;
}

.nav-link.active {
  color: #555;
}

/*
 * Utilities
 */

.border-top { border-top: 1px solid #e5e5e5; }
.border-bottom { border-bottom: 1px solid #e5e5e5; }

 .bi {
  width: 16px;
  height: 16px;
  display: block;
  padding: 0.8rem;
}

 .bi-clipboard {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/></svg>');
}
 .bi-check2 {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">  <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
}

 .bi-device-ssd {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M4.75 4a.75.75 0 0 0-.75.75v3.5c0 .414.336.75.75.75h6.5a.75.75 0 0 0 .75-.75v-3.5a.75.75 0 0 0-.75-.75h-6.5ZM5 8V5h6v3H5Zm0-5.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm7 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0ZM4.5 11a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Zm7 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z"></path><path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2Zm11 12V2a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1v-2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2a1 1 0 0 0 1-1Zm-7.25 1v-2H5v2h.75Zm1.75 0v-2h-.75v2h.75Zm1.75 0v-2H8.5v2h.75ZM11 13h-.75v2H11v-2Z"></path></svg>');
}

 .bi-link-45deg {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-link-45deg" viewBox="0 0 16 16"><path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"/></svg>');
  filter: grayscale(0.2);
}

 .bi-clipboard-light {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(200,200,200)" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/></svg>');
}
 .bi-check2-light {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(200,200,200)" viewBox="0 0 16 16">  <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
}

 .bi-device-ssd-light {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(200,200,200)" viewBox="0 0 16 16"><path d="M4.75 4a.75.75 0 0 0-.75.75v3.5c0 .414.336.75.75.75h6.5a.75.75 0 0 0 .75-.75v-3.5a.75.75 0 0 0-.75-.75h-6.5ZM5 8V5h6v3H5Zm0-5.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm7 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0ZM4.5 11a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Zm7 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z"></path><path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2Zm11 12V2a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1v-2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2a1 1 0 0 0 1-1Zm-7.25 1v-2H5v2h.75Zm1.75 0v-2h-.75v2h.75Zm1.75 0v-2H8.5v2h.75ZM11 13h-.75v2H11v-2Z"></path></svg>');
}

 .bi-link-45deg-light {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(200,200,200)" class="bi bi-link-45deg" viewBox="0 0 16 16"><path d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z"/></svg>');
  filter: grayscale(0.2);
}


  .bi-trash {
  background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z"/></svg>');
}

  .btn-success.bi-basket {
  background: green no-repeat 95%/7% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-cart" viewBox="0 0 16 16"><path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M3.102 4l1.313 7h8.17l1.313-7zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/></svg>');
}

  .btn.bi-basket.btn-success::after {
    content: 'HT';
}

:root { 
  --logo-bg-blue : #B9DBFF;
  --logo-bg-yellow : #FFBF2E;
  --logo-marguerite : url('/public/img/logo-marguerite-flat.svg');
}

div[role=help] {
  width: 16px;
  height: 16px;
  display: inline-block;
  position:absolute;
  right: 5px;
   background: no-repeat center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="black" viewBox="0 0 16 16">    <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/></svg>'); 
}

/*
* Chat
*/
#hopes-container div,main {
  transition: all 0.5s 0.2s ease-out;   
}

html,body,main,div {
  scrollbar-color: #CCC #FFF;
}

#hopes-container.chat-minimized div#ui-main {
  display: block;
  position: absolute;
  bottom: 0px;
  left: 0px;
  top: 0px;
  right: 0px;
/*  height: 100%; */
}

#hopes-container.chat-minimized div#chat-bar {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 60px;
  height: 60px;
  z-index: 2000;
}

#hopes-container.chat-minimized div#chat-widget {
  position: fixed;
  height: 60px;
  left: 0px;
  top: 0px;
  width: 60px;
}

#chat-widget.chat-minimized #chat-header span.title {
  display: none;
}

#chat-widget #chat-header span.title {
  display: block;
  text-align: center;
}

#hopes-container.chat-expanded div#ui-main {
  display: none;
  position: absolute;
  bottom: 0px;
  left: 0px;
  top: 0px;
  right: 0px;
}

#hopes-container.chat-expanded div#chat-bar {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  top: 0px;
  width: 100%;
}

#hopes-container.chat-expanded div#chat-widget {
  position: fixed;
  bottom: 0px;
  left: 0px;
  top: 0px;
  right: 0px;
  width: 100%;
}


#hopes-container div#ui-main {
  display: block;
  position: absolute;
  bottom: 0px;
  left: 450px;
  top: 0px;
  right: 0px;
/*  height: 100%; */
}

#hopes-container div#chat-bar {
  position: absolute;
  bottom: 0px;
  left: 0px;
  top: 0px;
  width: 450px;
}

#hopes-container div#chat-widget {
  position: fixed;
  bottom: 0px;
  left: 0px;
  top: 0px;
  width: 450px;
}


@media (max-width: 768px) {
  #chat-widget {
    width: 100vw !important;
    max-height: 50vh;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }
  #chat-widget.chat-expanded {
    max-height: 100vh;
    height: 100vh;
  }
  #chat-widget.chat-minimized {
    width: 60px!important;
  }
  #chat-header { 
    font-size: 1.0rem !important;
  }
  #chat-body { 
    font-size: 0.9rem !important;
  }

  #chat-input input {
    font-size: 1.0rem !important;
  }

  #hopes-container #ui-main {
    top: 50vh!important;
    left: 0!important;
    right: 0!important;
    bottom: 0!important;
  }
  #hopes-container.chat-minimized #ui-main {
    top: 0!important;
    left: 0!important;
    right: 0!important;
    bottom: 0!important;
  }
  .sidebar {
    max-width: 0px;
  }
  #products-deck {
    position: fixed;
    left: 0px;
    right: 0px;  
}

}

#chat-widget.chat-expanded #chat-toggle {
  display: none;
}

#chat-widget.chat-minimized span {
  height: 100%;
}

#chat-widget.chat-minimized #chat-toggle {
  height: 100%;
  background: no-repeat center/100% var(--logo-marguerite);
  color : transparent;
}

#chat-widget.chat-minimized {
/*  background: no-repeat center/50% var(--logo-marguerite); */
  border : none;
}


#chat-widget.chat-minimized #chat-expand {
  display: none;
}

#chat-widget.chat-minimized #chat-expand {
  display: none;
}


#chat-widget {
  align-items: center;
  background: rgba(255, 255, 255, 0.6); /* transparence */
  backdrop-filter: blur(5px);           /* effet verre dépoli */
  -webkit-backdrop-filter: blur(5px);   /* compatibilité Safari */
 /* background: white; */
  border-right: 2px solid #EEE;
  border-bottom: 2px solid #EEE;
/*  box-shadow: 0 0 12px rgba(0,0,0,0.2); */
  border-radius: 0px;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

#chat-header {
  width: 100%;
  height: 60px!important;
  color: #444;
  font-size: 1.0em;
  padding: 12px 12px;
 /* cursor: move; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-bottom: 2px solid #EEE;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.hopes-icon {
  display: inline-block;
  vertical-align: middle;
  background: no-repeat center/100% var(--logo-marguerite);
  height: 30px;
  width: 30px;
}

.hopes-logo {
  background: no-repeat center/100% var(--logo-marguerite);
}


.hopes-logo:hover {
  animation: spin 2s linear infinite;
  transform-origin: center;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

#chat-header span.title::before {
  content: var(--logo-marguerite);
  display: inline-block;
  vertical-align: middle;
  width: 30px;
  height: 30px;
  margin-right: 5px;
}

#chat-header button {
  background: none;
  color: #666;
  border: none;
  cursor: pointer;
}

#chat-body {
  display: flex;
  flex: 1;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#chat-widget.chat-expanded #chat-body {
  font-size: 1.1rem;
  line-height: 1.75;
  padding-left: calc(50% - 500px);
  padding-right: calc(50% - 500px);
}


#chat-input {
  width: 100%;
  display: flex;
  border: 1px solid #ccc;
  font-size: 0.875rem;
}

#dash-bienvenu {
  margin-top: 4rem;
}

#dash-ask {
  margin-bottom: 1rem;
  color: var(--logo-bg-blue);
}

#dash-prompt-invite, #chat-widget.chat-expanded #chat-input {  
  width: 95%;
  max-width: 800px;
  border: 1px solid #DDD;
  border-radius: 2rem;
  height: calc-size(min-content,size + 0rem);
  margin : 0rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.0rem;
  padding: 1rem;
  font-size: 1.1rem;
}

#dash-browse {
  margin-top: 2rem;
}

#dash-browse, #dash-prompt {
  width: 95%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

#dash-browse::after {
  content : "\01F5A2";
  padding-left: 0.5rem;
  font-size: 1.2em;
}

#dash-prompt::after {
  content : "\01F5A3";
  padding-left: 0.5rem;
  font-size: 1.2em;
}
/*
#dash-prompt-invite {
  width: 95%;
  max-width: 1000px;
  border: 1px solid #DDD;
  border-radius: 2rem;
  height: 4rem;
  margin : 0rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  font-size: 1.1rem;
}
*/
#dash-prompt-invite input, #chat-input input {
  flex: 1;
  border: none;
  padding: 8px;
  width: 90%;
}

#dash-prompt-invite input, #chat-input input:focus {
  outline: none;
}

.chat-minimized #chat-body {
  display: none !important;
}
.chat-minimized #chat-input {
  display: none !important;
}

#chat-widget.chat-expanded .chat-msg {
  margin-bottom: 2rem;
}

.chat-msg.user {
  padding-left: 30%;
  text-align: right;
  color: #000;
  background: rgba(240, 240, 230, 0.0); /* transparence */
}

.chat-msg.user div {
  padding: 1.0em 1.0em 1.0em 1.5em;
  text-align: left;
  border-radius: 0.75em 0.75em 0em 0.75em;
  background: var(--logo-bg-blue); /* transparence */ 
  opacity: 60%; 
}

.chat-msg.ai::before {
  display: block;
  background: no-repeat left/25px var(--logo-marguerite) ;
  content: "Hopes >";
  height: 30px;
  padding-left: 30px;
  vertical-align: middle;
  line-height: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #777;
}

.chat-msg.ai._thinking::before {
  content: ".";
  height: 30px;
  width: 30px;
  padding-left: 0px;
  padding: 0px;
  margin: 0px;
  animation: spin 2s linear infinite;
  transform-origin: center center;
}

#chat-widget.chat-expanded .chat-msg.ai::before {
  font-size: 0.95rem;
}

.chat-msg.ai {
  text-align: left;
  color: #222;
  background: rgba(245, 245, 245, 0.0); /* transparence */
/*  background: #f1f1f1; */
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 90%;
}

.chat-msg.ai a {
  color: #333;
  padding: 0.3em;
  line-height: 2.0;
  font-weight: 600;
  text-decoration: none;
}

.chat-msg.ai a.option {
  display: block;
  font-weight: 500;
/*  color: var(--logo-bg-yellow); */
}

.chat-msg.ai a.option::before {
  content : "\263C";
}

.chat-msg.ai a::before {
  content : "";
}
.chat-msg.ai a:hover {
  color: #666;
  border-radius: 0.3em;
  background: #EEE;
}


.chat-msg.ai a.btn {
  background: #DDD;
  border-color: #BBB;
  border-radius: 0.5em;
  color: #333;
  font-weight: bold;
  padding: 0.5em 0.75em 0.5em 0.75em;
  text-decoration: none;
}
.chat-msg.ai a.btn::before {
  content: ""
}
.chat-msg.ai a.btn:hover {
  background: #EEE;
}

.chat-msg.ai H4 {
  font-size: 1.2rem;
  margin: 1rem;
}


/************  file-drop controls **********************/

.file-drop {
  --fd-border: 2px dashed var(--fd-color, #c9ced6);
  --fd-bg: hsl(220 14% 97%);
  --fd-bg-hover: hsl(220 14% 95%);
  --fd-ring: 2px solid #4c8bf7;
  --fd-radius: 16px;
  --fd-padding: 18px;
  --fd-transition: 150ms ease;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .file-drop { --fd-color: #6b7280; --fd-bg: hsl(220 8% 16%); --fd-bg-hover: hsl(220 8% 14%); }
}

.file-drop-zone {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: var(--fd-padding);
  border: var(--fd-border);
  border-radius: var(--fd-radius);
  background: var(--fd-bg);
  cursor: pointer;
  user-select: none;
  transition: background var(--fd-transition), transform var(--fd-transition), border-color var(--fd-transition);
  outline: none;
}
.file-drop-zone:hover { background: var(--fd-bg-hover); border-color: #9aa3af; }
.file-drop-zone:focus-visible { box-shadow: 0 0 0 3px rgba(76,139,247,.35); border-color: #4c8bf7; }

.file-drop-icon { width: 28px; height: 28px; opacity: .75; flex: 0 0 auto; }
.file-drop-text { display: grid; gap: 2px; }
.file-drop-link { text-decoration: underline; }
.file-drop-hint { font-size: .85rem; color: #6b7280; }

.file-drop.is-dragover .file-drop-zone {
  border-color: #4c8bf7;
  background: rgba(76,139,247,.06);
  transform: scale(0.998);
}

.file-drop-preview {
  margin-top: 10px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/************  chat button u-btn **********************/

.chat-modify-link-container {
  padding: 0;
  border: none;
}

.chat-modify-link {

}

.chat-actions-container {
  display: inline-flex;
  padding: 0.5rem;
  margin-top: 1rem;
  border-radius: 10px;
  border: 1px solid #EEE;
  align-items: middle;
}
.chat-actions-container::before {
  content: "\25B6";
}

.u-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}
.u-btn:hover:not(.pending) {
  border-color: rgba(255,255,255,.26);
}

.u-btn.pending {
  pointer-events: none;
  opacity: .65;
}

/* Le texte reste visible mais on ajoute la roue */
.u-btn.pending::after {
  content: "";
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: u-spin .7s linear infinite;
}

@keyframes u-spin {
  to { transform: rotate(360deg); }
}

/**************** chat mokup modal ********************/

:root{
  --bg-overlay: rgba(15,15,20,.55);
  --panel-bg: #0f1115;
  --panel-fg: #e8eaed;
  --muted: #9aa3af;
  --brand: #4c8bf7;
  --card-bg: #141821;
  --ring: rgba(76,139,247,.45);
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light){
  :root{
    --panel-bg: #fff;
    --panel-fg: #0f1115;
    --card-bg: #f7f8fb;
    --bg-overlay: rgba(15,15,20,.45);
  }
}

/* Overlay plein écran */
.modal-overlay{
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
}
.modal-overlay[aria-hidden="false"]{ display: flex; }

/* Panneau vertical */
.modal-panel{
  width: min(400px, 98vw);
  height: min(99vh, 980px);
  background: var(--panel-bg);
  opacity: 1;
  color: var(--panel-fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  /* grid-template-rows: auto 1fr; */
  overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop{ from{ transform: translateY(6px) scale(.98); opacity: .6; } }

.modal-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; 
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.modal-title{ font-size: 1.05rem; letter-spacing: .2px; margin: 0; }
.modal-close{
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.modal-close:hover{ color: var(--panel-fg); background: rgba(255,255,255,.06); }

.modal-body{
  width: min(100%, 450px);
  height: calc(100% - 60px);
  overflow-y: scroll;
 /* display: block; 
  grid-template-rows: 270px 50px calc(100% - 320px); */
  gap: 12px; 
  padding: 8px 8px;
}
.modal-body > .sheet {
  padding: 0px;  
}
.modal-body > .sheet > .card {
  border:none;
  padding: 0px;
}

.modal-body > .sheet > .card > .header {
  padding: 10px;
}

.modal-body > .sheet > .card > .body {
  padding: 10px;
}


/* Viewer 3D (top) */
.viewer3d-wrap{
  /* max-height: 270px; */
  position: relative;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(0,0,0,.3));
  border-radius: 12px; overflow: hidden; 
  border: 1px solid rgba(255,255,255,.06);
}
#viewer3D{ width: 100%; height: 100%; display: block; background: #0b0d12; }

/* Action bar (middle) */
.action-bar{
  width: 100%;
  max-height: 50px;
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid rgba(225,225,225,.06);
  gap: 12px;
  padding: 0px;
  justify-content: center;
}

/* Cartes (bottom) */
.cards-wrap{
  max-height: calc(100% - min(400px, 98vw) - 50px);
  display: block;
  gap: 12px;
  overflow: auto;
}
@media (max-width: 820px){ .cards-wrap{ grid-template-columns: 1fr; } }



/***********************************************/
.technical-resume {
  overflow-x: auto;
}