/* styles/cmdk.css */

/* Overlay plein écran */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
}

/* Conteneur */
.cmdk-container {
  width: 100%;
  max-width: 680px;
  margin-top: 10vh;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  box-shadow: 0 20px 50px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05), 0 0 20px rgba(0,0,0,.06) inset;
  background-image: radial-gradient(ellipse at center, rgba(0,0,0,.04) 0%, transparent 70%);
  background-clip: padding-box;
  border: 1px solid #e7eaf3;
  overflow: hidden;
}

/* Racine */
.cmdk-root {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Barre de recherche */
.cmdk-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7eaf3;
  background: #fff;
  justify-content: space-between;
  position: relative;
}
}
.cmdk-input-wrapper kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}
}
.cmdk-input {
  flex: 1;
  outline: none;
  border: 0;
  background: transparent;
  font-size: 14px;
  padding: 8px 0;
  color: #111827;
  min-width: 0;
  padding-right: 48px;
}
}

/* ESC pill */
.cmdk-esc {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}
}

/* Liste */
.cmdk-list {
  max-height: 56vh;
  overflow: auto;
  background: inherit;
}

/* Titre de groupe (cmdk ajoute un élément [cmdk-group-heading]) */
.cmdk-root [cmdk-group-heading] {
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 600;
  color: #64748b;
  padding: 10px 14px;
  text-transform: uppercase;
}
}

/* Items */
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  color: #111827;
}
}
.cmdk-item[aria-selected="true"] {
  background: #f3f6ff;
}
}

.cmdk-item-icon {
  width: 22px;
  text-align: center;
  opacity: .8;
}
.cmdk-item-subtitle {
  font-size: 12px;
  opacity: .7;
}

/* Empty / Loading */
.cmdk-empty {
  padding: 16px 14px;
  font-size: 14px;
  color: #64748b;
}

/* Footer */
.cmdk-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid #e7eaf3;
  background: inherit;
}
}
.cmdk-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}
.cmdk-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}
}

/* Item layout with right-aligned badge and meta line (for contrats) */
.cmdk-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.cmdk-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.cmdk-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}
.cmdk-item-meta {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
}
.cmdk-dot { opacity: .6; }

/* Badges */
.cmdk-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cmdk-badge--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.cmdk-badge--muted {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}
  .cmdk-badge--muted {
    background: #111827;
    color: #d1d5db;
    border-color: #374151;
  }
}