.custom-athoms-header {
    overflow: hidden;
}
.custom-athoms-header img{
    width: 55%;
}
.custom-athoms-header a{
    text-align: center;
}
.custom-athoms-header {
    background: var(--custom-athoms-header-color);
    max-width: 100%;
}


.custom-athoms-initial {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;      /* centre vertical */
  justify-content: center;  /* centre horizontal */
  border-radius: 0.95rem;
  background-color: var(--bs-primary);
}

.custom-athoms-initial p {
  margin: 0;               /* IMPORTANT */
  font-weight: 600;
  color: #fff;
  font-size: 20px;
}
/* Barre flottante de réactions (style WhatsApp-ish) */
.chat-react-menu {
  position: fixed;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  border: 1px solid rgba(0,0,0,.06);
}

.chat-react-menu button {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  padding: 6px 6px;
  border-radius: 999px;
  cursor: pointer;
}

.chat-react-menu button:hover {
  background: rgba(0,0,0,.06);
}

.chat-react-menu .chat-react-plus {
  font-size: 18px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badges réactions sous les bulles */
.chat-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chat-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.chat-reaction-chip[data-mine="1"] {
  background: rgba(0, 136, 255, .16);
}
.font-h2{
    font-size: 1.5rem !important;
}
.input-group-text{
    border: none !important;
}
.input-group > .form-floating:not(:first-child) > .form-control, .input-group > .form-floating:not(:first-child) > .form-select {
  border-top-left-radius: 0!important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 0.95rem !important;
  border-bottom-right-radius: 0.95rem !important;
}
.input-group-text i{
  font-size: 1.4rem !important;
  color: var(--bs-primary) !important;
}
.select-countrie .select2-selection--single {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 0.95rem !important;
  border-bottom-right-radius: 0.95rem !important;
  height: 50.75px;
}
.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.text-black{
  color: #000 !important;
}
/* Dropdown autocomplete (produits) */
.js-autocomplete-result {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2000;
  margin-top: .25rem;
  top: 50.75px;
}

.ac-menu {
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: .5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.ac-item {
  padding: .6rem .75rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.ac-item:last-child { border-bottom: none; }

.ac-item:hover,
.ac-item:focus {
  background: rgba(0,123,255,.08);
  outline: none;
}

.ac-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.ac-title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  min-width: 0;
}

.ac-code {
  font-weight: 600;
  white-space: nowrap;
}

.ac-designation {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.ac-sep { opacity: .5; }

.ac-price {
  font-weight: 700;
  white-space: nowrap;
}

.ac-desc {
  margin-top: .25rem;
  color: #6c757d;
  font-size: .875rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* 2 lignes max */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ac-empty {
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: .5rem;
  padding: .75rem;
  color: #6c757d;
}.js-autocomplete-result .ac-item:hover,
.js-autocomplete-result #listsearch li:hover {
background: rgba(var(--bs-link-color-rgb), 0.18) !important;
  border-left: 4px solid var(--primary);
}
/* ========= Autocomplete UX ========= */
.js-autocomplete-result .ac-item.active,
.js-autocomplete-result #listsearch li.active {
  background: rgba(var(--bs-link-color-rgb), 0.18) !important;
  border-left: 4px solid var(--primary);
}

.js-autocomplete-result .ac-item.active .ac-title,
.js-autocomplete-result #listsearch li.active {
  font-weight: 600;
}

/* Focus visible (tab / navigation) */
.js-autocomplete-result .ac-item:focus,
.js-autocomplete-result #listsearch li:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(var(--bs-link-color-rgb), 0.35);
}

/* Pour éviter que <mark> masque le surlignage */
.js-autocomplete-result mark {
  background: rgba(var(--bs-link-color-rgb), 0.18);
  padding: 0 .12rem;
  border-radius: .2rem;
}

.js-autocomplete-result .ac-item.active {
  background: rgba(var(--bs-link-color-rgb), 0.18) !important;
  border-left: 4px solid var(--bs-primary);
}

/* ═══════════════════════════════════════════════════
   CHAT — Améliorations UI (ajouté 2026-03-16)
   ═══════════════════════════════════════════════════ */

/* ── Message wrapper hover actions ── */
.chat-msg-wrapper {
    position: relative;
}

.chat-msg-actions-bar {
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.chat-msg-wrapper:hover .chat-msg-actions-bar {
    opacity: 1;
    pointer-events: auto;
}

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.1s;
    padding: 0;
    line-height: 1;
}

.chat-action-btn:hover {
    background: rgba(0,0,0,.08);
}

.chat-action-btn.chat-action-danger:hover {
    background: rgba(220, 53, 69, 0.12);
}

/* ── Réactions améliorées ── */
.chat-reaction-chip {
    transition: transform 0.1s, background 0.1s;
    border: 1px solid transparent;
}

.chat-reaction-chip:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,.1);
}

.chat-reaction-chip[data-mine="1"] {
    background: rgba(0, 136, 255, .15);
    border-color: rgba(0, 136, 255, .35);
}

/* ── Menu réactions flottant ── */
.chat-react-menu {
    animation: chatReactMenuIn 0.15s ease;
}

@keyframes chatReactMenuIn {
    from { opacity: 0; transform: scale(0.9) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Toast notifications ── */
#asteria-toast-container .toast {
    min-width: 300px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    animation: toastSlideIn 0.25s ease;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Paste preview bar ── */
#pastePreviewBar {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; overflow: hidden; }
    to   { opacity: 1; max-height: 200px; }
}

/* ── Drawer chat ── */
#kt_drawer_chat .card {
    min-height: 100%;
}

/* ── Custom audio player ── */
.chat-audio-player .ap-progress {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(0,0,0,.12);
    outline: none;
    cursor: pointer;
}
.chat-audio-player .ap-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bs-primary, #009ef7);
    cursor: pointer;
    margin-top: -4px;
}
.chat-audio-player .ap-progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bs-primary, #009ef7);
    cursor: pointer;
    border: none;
}
.chat-audio-player .ap-play-btn {
    transition: background-color .2s, transform .15s;
}
.chat-audio-player .ap-play-btn:active {
    transform: scale(.9);
}

/* ── Recording pulse ── */
@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,.5); }
    50%       { box-shadow: 0 0 0 6px rgba(220,53,69,0); }
}
.recording-pulse {
    animation: recordPulse 1.2s ease-in-out infinite;
    background-color: rgba(220,53,69,.12) !important;
    color: #dc3545 !important;
}

/* ── Drawer : actions sur message (hover uniquement) ── */
.drawer-msg-actions {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.drawer-msg-row:hover .drawer-msg-actions {
    opacity: 1;
    pointer-events: auto;
}
/* Touch : tap sur le message pour afficher les actions */
.drawer-msg-row.actions-visible .drawer-msg-actions {
    opacity: 1;
    pointer-events: auto;
}
/* Drawer : avatar groupe */
.drawer-group-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--kt-success-light, #e8fff3);
    color: var(--kt-success, #50cd89);
    font-size: 18px; flex-shrink: 0;
}

/* ── Drawer chat : bloquer le scroll de la page quand le drawer est ouvert ── */
body:has(#kt_drawer_chat.drawer-on) {
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   Global Search — Command palette (Ctrl+F / Ctrl+K)
   ══════════════════════════════════════════════════════ */
#gs-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
}
#gs-modal.open { display: block; }
#gs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
}
#gs-box {
    position: absolute;
    top: 12vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 96vw);
    background: var(--bs-body-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,.2);
    overflow: hidden;
}
#gs-input-wrap {
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--bs-border-color, #eee);
    gap: 12px;
}
#gs-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1.05rem;
    padding: 18px 0;
    color: var(--bs-body-color, #181c32);
    font-family: inherit;
}
#gs-input::placeholder { color: var(--bs-gray-400, #b5b5c3); }
#gs-status {
    padding: 6px 18px;
    font-size: .78rem;
    color: var(--bs-gray-500, #a1a5b7);
    min-height: 26px;
    border-bottom: 1px solid var(--bs-border-color, #f1f1f1);
}
#gs-results {
    overflow-y: auto;
    max-height: calc(72vh - 170px);
}
.gs-group-label {
    padding: 8px 18px 4px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-gray-500, #a1a5b7);
    border-top: 1px solid var(--bs-border-color, #f1f1f1);
}
.gs-group-label:first-child { border-top: 0; }
.gs-item {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    cursor: pointer;
    transition: background .1s;
}
.gs-item:hover,
.gs-item.gs-selected { background: var(--bs-light, #f9f9f9); }
[data-bs-theme=dark] .gs-item:hover,
[data-bs-theme=dark] .gs-item.gs-selected { background: rgba(255,255,255,.06); }
.gs-item-text { flex: 1; min-width: 0; }
.gs-item-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--bs-body-color, #181c32);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-item-sub {
    font-size: .78rem;
    color: var(--bs-gray-500, #a1a5b7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-item mark {
    background: transparent;
    color: var(--bs-primary, #009ef7);
    font-weight: 700;
    padding: 0;
}
.gs-empty {
    padding: 36px 18px;
    text-align: center;
    color: var(--bs-gray-500, #a1a5b7);
    font-size: .9rem;
}
#gs-footer {
    display: flex;
    gap: 16px;
    padding: 8px 18px;
    border-top: 1px solid var(--bs-border-color, #eee);
    font-size: .72rem;
    color: var(--bs-gray-400, #b5b5c3);
}
#gs-footer kbd {
    background: var(--bs-gray-200, #f4f4f4);
    border: 1px solid var(--bs-gray-300, #e4e6ef);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: .7rem;
    font-family: inherit;
    color: var(--bs-gray-600, #7e8299);
    margin-right: 3px;
}
.gs-avatar-wrap {
    width: 35px; height: 35px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
    background: var(--bs-gray-200, #f4f4f4);
    display: flex; align-items: center; justify-content: center;
}
.gs-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ── Mode formulaire (devis_form.js) — autocomplete par ligne ── */

/* Le td de désignation est le contexte de positionnement */
#cartTable td.position-relative { overflow: visible; }

/* Dropdown recherche client */
#client-ac-results {
  top: 100%;
  margin-top: 2px;
  min-width: 100%;
  z-index: 3000;
}

/* Dropdown : positionné sous le 1er input (≈ 34px) + gap 2px */
#cartTable td .js-autocomplete-result {
  top: 36px;          /* juste sous le champ désignation */
  margin-top: 0;
  min-width: 380px;   /* assez large pour voir réf + nom + prix */
}

/* Dialers dans le tableau : boutons compacts */
#cartTable .input-group[data-kt-dialer] .btn {
  padding: .25rem .4rem;
}
#cartTable .input-group[data-kt-dialer] input[data-kt-dialer-control="input"] {
  min-width: 60px;
  font-size: .85rem;
}

.athoms_underline{
  position: relative;
}
.athoms_underline::before{
content: '';
  background-color: var(--bs-primary);
  height: 3px;
  width: 90px;
  position: absolute;
  left: 40px;
  bottom: 5px;
  border-radius: 3px;
}
.br-none{
  border-radius: 0 !important;
}
.show > .btn.btn-light-dark{
 color: var(--bs-dark);
  border-color: var(--bs-dark-light) !important;
  background-color: var(--bs-dark-light) !important;
}

.page-link.active, .active > .page-link {
  z-index: 3;
  color: var(--bs-pagination-active-color) !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-pagination-active-border-color) !important;
}
.miniatureInitial{
 width: 160px;
  height: 160px;
  max-width: none;
  position: relative;
  background-color: var(--bs-primary);
}
.miniatureInitial > span{
width: 100%;
  flex-shrink: 0;
  display: inline-block;
  border-radius: 0.95rem;
  justify-content: center;
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  font-size: 60px;
}