/* Comptra GCom — UI moderne */

:root {
  --ink: #0b1220;
  --muted: #667085;
  --line: #e8edf5;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --brand: #1a5cff;
  --brand-2: #0f3dcc;
  --brand-soft: #eaf0ff;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #f04438;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 8px 30px rgba(16, 24, 40, 0.1);
  --font: 'DM Sans', system-ui, sans-serif;
  --topbar-h: 64px;
  --utility-h: 52px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body.gcom-body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ——— Header ——— */
.gcom-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

/* Bande utilitaire en haut : marque + Outils + Admin */
.gcom-utility {
  background: #0f172a;
  color: #e2e8f0;
  min-height: var(--utility-h);
}

.gcom-utility__inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: var(--utility-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gcom-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.gcom-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gcom-brand__mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.gcom-brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1;
}

.gcom-brand__line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.gcom-brand__product {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.gcom-brand__app {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.gcom-brand__underline {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #4c7dff 20%,
    #93c5fd 50%,
    #4c7dff 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  transform-origin: left center;
  animation: brandUnderlineIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both,
             brandUnderlineShine 2.8s ease-in-out 0.7s infinite;
}

.gcom-brand:hover .gcom-brand__underline {
  animation-duration: 0.7s, 1.4s;
}

@keyframes brandUnderlineIn {
  from {
    opacity: 0;
    transform: scaleX(0.15);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes brandUnderlineShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.gcom-utility__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.gcom-utility__sep {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 184, 0.35);
  margin: 0 0.25rem;
}

.gcom-utility__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.gcom-utility__btn:hover,
.gcom-utility__btn.show {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.gcom-utility__caret {
  font-size: 0.55rem;
  opacity: 0.65;
}

.gcom-user {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: background 0.14s;
}

.gcom-user:hover,
.gcom-user.show {
  background: rgba(255, 255, 255, 0.08);
}

.gcom-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4c7dff, #1a5cff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.gcom-user__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.gcom-user__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.gcom-user__role {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 500;
}

.gcom-user__caret {
  font-size: 0.55rem;
  color: #94a3b8;
}

/* Bande modules */
.gcom-topbar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gcom-topbar__inner {
  height: var(--topbar-h);
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.gcom-topbar__toggle {
  align-self: center;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  display: none;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.gcom-topbar__toggle:hover,
.gcom-topbar__toggle.is-active {
  background: var(--brand-soft);
  border-color: #c9d7ff;
  color: var(--brand-2);
}

.gcom-modules {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  display: flex;
  align-items: stretch;
}

.gcom-modules__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.2rem;
  width: 100%;
  overflow: visible;
}

.gcom-modules__item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100px;
  position: static;
  display: flex;
}

.gcom-modules__btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #667085;
  font: inherit;
  width: 100%;
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s, box-shadow 0.14s;
}

.gcom-modules__btn::after {
  content: none;
}

.gcom-modules__btn > i {
  font-size: 0.95rem;
  line-height: 1;
  color: #98a2b3;
  transition: color 0.14s;
}

.gcom-modules__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.gcom-modules__btn:hover {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.gcom-modules__btn:hover > i {
  color: var(--brand);
}

.gcom-modules__btn.is-active,
.gcom-modules__btn.is-open,
.gcom-modules__btn.show,
.gcom-modules__btn[aria-expanded="true"] {
  color: var(--brand-2);
  background: #fff;
  border-color: #c9d7ff;
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.08);
}

.gcom-modules__btn.is-active > i,
.gcom-modules__btn.is-open > i {
  color: var(--brand);
}

.gcom-modules__btn:active {
  transform: none;
}

/* Dropdowns */
.gcom-mega.dropdown-menu {
  display: none;
  min-width: 268px;
  max-height: min(70vh, 520px);
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 0.35rem !important;
  box-shadow: 0 10px 32px rgba(16, 24, 40, 0.12) !important;
  background: #fff !important;
  z-index: 4000 !important;
  margin: 0 !important;
}

.gcom-mega.dropdown-menu.show {
  display: block !important;
  animation: menuIn 0.14s ease;
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.gcom-mega .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
  font-weight: 500;
  font-size: 0.84rem;
  color: #344054;
}

.gcom-mega .dropdown-item:hover {
  background: #f5f8ff;
  color: var(--brand-2);
}

.gcom-mega__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f2f4f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  flex-shrink: 0;
  font-size: 0.72rem;
}

.gcom-mega .dropdown-item:hover .gcom-mega__icon {
  background: var(--brand-soft);
  color: var(--brand);
}

.gcom-tools-menu,
.gcom-user-menu {
  min-width: 260px;
  max-height: min(72vh, 540px);
  overflow: auto;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 0.35rem !important;
  z-index: 4000 !important;
  box-shadow: 0 10px 32px rgba(16, 24, 40, 0.12) !important;
}

.gcom-tools-menu .dropdown-header,
.gcom-user-menu .dropdown-header {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #98a2b3;
  font-weight: 700;
  padding: 0.4rem 0.65rem 0.2rem;
}

.gcom-tools-menu .dropdown-item,
.gcom-user-menu .dropdown-item {
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #344054;
}

.gcom-tools-menu .dropdown-item i,
.gcom-user-menu .dropdown-item i {
  width: 1rem;
  text-align: center;
  color: #98a2b3;
  font-size: 0.8rem;
}

.gcom-tools-menu .dropdown-item:hover,
.gcom-user-menu .dropdown-item:hover {
  background: #f5f8ff;
  color: var(--brand-2);
}

.gcom-tools-menu .dropdown-item:hover i,
.gcom-user-menu .dropdown-item:hover i {
  color: var(--brand);
}

.gcom-user-menu__head {
  padding: 0.55rem 0.7rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gcom-user-menu__head strong {
  font-size: 0.88rem;
  color: var(--ink);
}

.gcom-user-menu__head small {
  color: var(--muted);
  font-size: 0.72rem;
}

/* Context / sous-nav */
.gcom-context {
  background: #fff;
  border-top: 1px solid #eef2f7;
}

.gcom-context__inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0.65rem 1rem 0;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  gap: 0.85rem;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.gcom-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.gcom-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.gcom-breadcrumb a:hover {
  text-decoration: underline;
}

.gcom-breadcrumb__sep {
  color: #c0c7d4;
}

.gcom-context__title h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
}

.gcom-context__title h1.is-animating {
  animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.gcom-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.05rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.gcom-tabs::-webkit-scrollbar { display: none; }

.gcom-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem;
  color: #667085;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.14s, border-color 0.14s;
  border-radius: 6px 6px 0 0;
}

.gcom-tabs__link i {
  font-size: 0.68rem;
  opacity: 0.7;
}

.gcom-tabs__link:hover {
  color: var(--ink);
}

.gcom-tabs__link.is-active {
  color: var(--brand-2);
  border-bottom-color: var(--brand);
}

.gcom-tabs__link.is-active i {
  opacity: 1;
  color: var(--brand);
}

.gcom-context__actions {
  padding-bottom: 0.4rem;
}

.gcom-context.is-empty .gcom-tabs {
  display: none;
}

/* Main */
.gcom-main {
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(26, 92, 255, 0.06), transparent 55%),
    radial-gradient(700px 280px at 100% 0%, rgba(15, 61, 204, 0.04), transparent 50%),
    var(--canvas);
}

#gcomWorkspace {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 2rem !important;
}

#gcomWorkspace.is-loading {
  opacity: 0.85;
}

.gcom-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Cards */
#gcomWorkspace .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#gcomWorkspace .card:hover {
  box-shadow: var(--shadow-lg);
}

#gcomWorkspace .card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 1.15rem;
}

#gcomWorkspace .card-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
  margin: 0;
}

#gcomWorkspace .card-body {
  padding: 1.1rem 1.15rem;
}

#gcomWorkspace .table {
  margin-bottom: 0;
}

#gcomWorkspace .table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

#gcomWorkspace .table td {
  vertical-align: middle;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  border-color: #f1f4f9;
}

#gcomWorkspace .table-hover tbody tr {
  transition: background 0.12s;
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#gcomWorkspace .table-hover tbody tr:nth-child(1) { animation-delay: 0.03s; }
#gcomWorkspace .table-hover tbody tr:nth-child(2) { animation-delay: 0.06s; }
#gcomWorkspace .table-hover tbody tr:nth-child(3) { animation-delay: 0.09s; }
#gcomWorkspace .table-hover tbody tr:nth-child(4) { animation-delay: 0.12s; }
#gcomWorkspace .table-hover tbody tr:nth-child(5) { animation-delay: 0.15s; }

#gcomWorkspace .table-hover tbody tr:hover {
  background: #f8faff;
}

/* KPI */
.gcom-kpi .stats-icon,
.stats-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
}

.stats-icon.purple { background: linear-gradient(145deg, #9b8afb, #6d28d9); }
.stats-icon.blue { background: linear-gradient(145deg, #6b9bff, #1a5cff); }
.stats-icon.green { background: linear-gradient(145deg, #3dd68c, #12b76a); }
.stats-icon.orange { background: linear-gradient(145deg, #ffb020, #f79009); }
.stats-icon.red { background: linear-gradient(145deg, #ff7a70, #f04438); }
.stats-icon.dark { background: linear-gradient(145deg, #667085, #344054); }

.gcom-kpi {
  transition: transform 0.2s, box-shadow 0.2s;
}

.gcom-kpi:hover {
  transform: translateY(-3px);
}

.gcom-kpi h6 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted) !important;
}

.gcom-kpi h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.badge {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.35em 0.55em;
}

.bg-light-primary { background: var(--brand-soft) !important; color: var(--brand-2) !important; }
.bg-light-success { background: #e8f8f0 !important; color: #027a48 !important; }
.bg-light-warning { background: #fff6e8 !important; color: #b54708 !important; }
.bg-light-danger { background: #fef3f2 !important; color: #b42318 !important; }
.bg-light-info { background: #eef8ff !important; color: #026aa2 !important; }
.bg-light-secondary { background: #f2f4f7 !important; color: #475467 !important; }

.progress {
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #b3c7ff;
  box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.1);
}

/* Filter bar */
.gcom-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gcom-filter-bar__search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}

.gcom-filter-bar__search > i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  pointer-events: none;
}

.gcom-filter-bar__search .form-control {
  padding-left: 2.35rem;
  height: 40px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.gcom-filter-bar__search .form-control:focus {
  background: #fff;
}

.gcom-filter-bar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gcom-filter-bar__filters .form-select {
  width: auto;
  min-width: 140px;
  height: 40px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  padding-left: 0.9rem;
}

.gcom-filter-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.gcom-filter-bar__actions .btn {
  height: 40px;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
}

#gcomWorkspace .card.mb-3:has(.input-group) {
  border-radius: 18px;
}

#gcomWorkspace .card.mb-3:has(.input-group) .input-group-text,
#gcomWorkspace .card.mb-3:has(.input-group) .form-control {
  border: 0;
  background: #f8fafc;
  height: 40px;
}

/* Buttons */
#gcomWorkspace .btn,
.modal .btn {
  border-radius: 10px;
  font-weight: 600;
  font-family: inherit;
  padding: 0.45rem 0.95rem;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

#gcomWorkspace .btn-sm,
.modal .btn-sm {
  border-radius: 9px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

#gcomWorkspace .btn:active,
.modal .btn:active {
  transform: translateY(1px);
}

#gcomWorkspace .btn-primary,
.modal .btn-primary {
  background: linear-gradient(180deg, #3d74ff, var(--brand));
  border-color: var(--brand-2);
  box-shadow: 0 4px 12px rgba(26, 92, 255, 0.25);
}

#gcomWorkspace .btn-primary:hover,
.modal .btn-primary:hover {
  background: linear-gradient(180deg, #5a88ff, var(--brand-2));
  border-color: var(--brand-2);
}

#gcomWorkspace .btn-success {
  background: linear-gradient(180deg, #32d583, #12b76a);
  border-color: #039855;
}

#gcomWorkspace .btn-danger {
  background: linear-gradient(180deg, #ff6b61, #f04438);
  border-color: #d92d20;
}

#gcomWorkspace .btn-warning {
  background: linear-gradient(180deg, #ffb020, #f79009);
  border-color: #dc6803;
  color: #1a1a1a;
}

#gcomWorkspace .btn-info {
  background: linear-gradient(180deg, #36bffa, #0ba5ec);
  border-color: #0086c9;
  color: #fff;
}

#gcomWorkspace .btn-secondary {
  background: #667085;
  border-color: #475467;
}

#gcomWorkspace .btn-dark {
  background: #101828;
  border-color: #101828;
}

#gcomWorkspace .btn-outline-primary,
#gcomWorkspace .btn-outline-success,
#gcomWorkspace .btn-outline-info,
#gcomWorkspace .btn-outline-warning,
#gcomWorkspace .btn-outline-secondary,
#gcomWorkspace .btn-outline-danger {
  background: #fff;
  border-width: 1.5px;
}

#gcomWorkspace .btn-outline-primary {
  color: var(--brand-2);
  border-color: #c9d7ff;
}

#gcomWorkspace .btn-outline-primary:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-2);
}

#gcomWorkspace .btn-outline-success { color: #027a48; border-color: #a6f4c5; }
#gcomWorkspace .btn-outline-success:hover { background: #e8f8f0; color: #027a48; }
#gcomWorkspace .btn-outline-info { color: #026aa2; border-color: #b2e3ff; }
#gcomWorkspace .btn-outline-info:hover { background: #eef8ff; color: #026aa2; }
#gcomWorkspace .btn-outline-warning { color: #b54708; border-color: #fedf89; }
#gcomWorkspace .btn-outline-warning:hover { background: #fff6e8; color: #b54708; }
#gcomWorkspace .btn-outline-secondary { color: #475467; border-color: #d0d5dd; }
#gcomWorkspace .btn-outline-secondary:hover { background: #f2f4f7; color: #344054; }
#gcomWorkspace .btn-outline-danger { color: #b42318; border-color: #fecdca; }
#gcomWorkspace .btn-outline-danger:hover { background: #fef3f2; color: #b42318; }

.btn-light-primary {
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid #c9d7ff;
}

.btn-light-primary:hover {
  background: #dce6ff;
  color: var(--brand-2);
}

.btn-light-secondary {
  background: #f2f4f7;
  color: #475467;
  border: 1px solid #e4e7ec;
}

.btn-light-secondary:hover {
  background: #e4e7ec;
  color: #344054;
}

/* Charts / POS leftovers */
.gcom-chart-placeholder {
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem 0.25rem 1.5rem;
}

.gcom-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.gcom-bars > div {
  flex: 1;
  height: var(--h, 50%);
  background: linear-gradient(180deg, #8eb0ff, var(--brand));
  border-radius: 10px 10px 4px 4px;
  position: relative;
}

.gcom-bars > div span {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.gcom-photo-placeholder {
  height: 170px;
  border: 2px dashed #d0d5dd;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.gcom-barcode-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  text-align: center;
  background: #fff;
}

.gcom-barcode-bars {
  height: 48px;
  margin: 0.75rem 0;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 13px);
}

.gcom-qr {
  width: 72px;
  height: 72px;
  margin: 0.75rem auto;
  background:
    linear-gradient(#111 0 0) 0 0 / 30% 30% no-repeat,
    linear-gradient(#111 0 0) 100% 0 / 30% 30% no-repeat,
    linear-gradient(#111 0 0) 0 100% / 30% 30% no-repeat,
    repeating-conic-gradient(#111 0% 25%, #fff 0% 50%) 50% / 20% 20%;
  border: 2px solid #111;
  border-radius: 6px;
}

.gcom-pos {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 400px);
  gap: 1.15rem;
  min-height: 65vh;
}

.gcom-pos-item {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 1.05rem 0.85rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.gcom-pos-item:hover {
  border-color: #b3c7ff;
  box-shadow: 0 10px 24px rgba(26, 92, 255, 0.1);
  transform: translateY(-2px);
}

.gcom-pos-item span {
  color: #027a48;
  font-weight: 700;
}

.modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

#gcomToasts .toast {
  border-radius: 12px;
  border: 0;
  box-shadow: var(--shadow-lg);
  animation: rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ——— Responsive ——— */

/* Tablettes & petits écrans */
@media (max-width: 1199.98px) {
  .gcom-modules__item {
    max-width: 88px;
  }

  .gcom-modules__label {
    font-size: 0.62rem;
  }

  .gcom-modules__btn > i {
    font-size: 0.85rem;
  }

  .gcom-context__inner {
    grid-template-columns: minmax(120px, 160px) 1fr;
  }

  .gcom-context__actions {
    grid-column: 1 / -1;
    padding-bottom: 0.55rem;
  }
}

/* < lg : navigation mobile + contenu adaptable */
@media (max-width: 991.98px) {
  .gcom-utility__inner {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .gcom-brand__product {
    display: none;
  }

  .gcom-user__meta,
  .gcom-user__caret {
    display: none;
  }

  .gcom-utility__btn span,
  .gcom-utility__caret {
    display: none;
  }

  .gcom-utility__btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
  }

  .gcom-utility__sep {
    display: none;
  }

  .gcom-topbar__inner {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    padding: 0.45rem 0.75rem;
  }

  .gcom-topbar__toggle {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .gcom-modules {
    display: none;
    width: 100%;
  }

  .gcom-modules.is-open {
    display: flex;
  }

  .gcom-modules__list {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 0 0.25rem;
  }

  .gcom-modules__item {
    flex: 0 0 calc(25% - 0.3rem);
    max-width: none;
    width: auto;
  }

  .gcom-modules__btn {
    min-height: 64px;
    border: 1px solid var(--line);
    background: #fff;
  }

  .gcom-modules__label {
    font-size: 0.68rem;
    white-space: normal;
    line-height: 1.15;
  }

  .gcom-context__inner {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: start;
    padding: 0.55rem 0.75rem 0;
  }

  .gcom-context__title h1 {
    font-size: 0.98rem;
  }

  .gcom-tabs {
    width: 100%;
    margin: 0 -0.25rem;
    padding: 0 0.25rem 0.1rem;
    -webkit-overflow-scrolling: touch;
  }

  .gcom-tabs__link {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
  }

  #gcomWorkspace {
    padding: 0.85rem 0.75rem 1.5rem !important;
  }

  #gcomWorkspace .card-header {
    padding: 0.8rem 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #gcomWorkspace .card-body {
    padding: 0.85rem 0.9rem;
  }

  #gcomWorkspace .card-header.d-flex {
    align-items: flex-start !important;
  }

  .gcom-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.75rem;
    border-radius: 14px;
  }

  .gcom-filter-bar__search {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .gcom-filter-bar__filters {
    width: 100%;
  }

  .gcom-filter-bar__filters .form-select {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
  }

  .gcom-filter-bar__actions {
    margin-left: 0;
    width: 100%;
  }

  .gcom-filter-bar__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .gcom-table-wrap,
  #gcomWorkspace .table-responsive {
    margin: 0 -0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  #gcomWorkspace .table thead th,
  #gcomWorkspace .table td {
    padding: 0.65rem 0.7rem;
    font-size: 0.82rem;
  }

  .gcom-kpi .card-body {
    flex-wrap: wrap;
  }

  .gcom-kpi h4 {
    font-size: 1.05rem;
  }

  .gcom-kpi h4 small {
    display: block;
    margin-top: 0.1rem;
  }

  .gcom-pos {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0.85rem;
  }

  .gcom-pos__beta .btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .gcom-pos__beta .btn-group > .btn {
    border-radius: 8px !important;
  }

  .gcom-pos .d-flex.gap-2.mb-3 {
    flex-wrap: wrap;
  }

  .gcom-pos .d-flex.gap-2.mb-3 .form-control {
    flex: 1 1 180px;
  }

  #gcomToasts {
    left: 0.75rem !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
    width: auto !important;
    max-width: none;
  }

  #gcomToasts .toast {
    width: 100%;
  }

  .modal-dialog {
    margin: 0.75rem;
  }
}

/* Téléphones */
@media (max-width: 575.98px) {
  .gcom-utility {
    min-height: 40px;
  }

  .gcom-utility__inner {
    padding: 0 0.65rem;
  }

  .gcom-brand__mark {
    width: 36px;
    height: 36px;
  }

  .gcom-brand__mark img {
    width: 28px;
    height: 28px;
  }

  .gcom-modules__item {
    flex: 0 0 calc(33.333% - 0.28rem);
  }

  .gcom-breadcrumb {
    font-size: 0.65rem;
  }

  #gcomWorkspace {
    padding: 0.7rem 0.55rem 1.25rem !important;
  }

  .gcom-filter-bar__filters .form-select {
    flex: 1 1 100%;
  }

  .gcom-kpi h4 {
    font-size: 0.95rem;
  }

  .stats-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 0.85rem;
  }

  #gcomWorkspace .row.g-3 > [class*="col-"] {
    margin-bottom: 0;
  }

  .btn-group {
    flex-wrap: wrap;
  }
}

@media (min-width: 992px) {
  .gcom-modules {
    display: flex !important;
  }

  .gcom-topbar__toggle {
    display: none !important;
  }
}

/* —— Lookup searchable (clients / articles) —— */
.gcom-lookup {
  position: relative;
}
.gcom-lookup-menu {
  position: absolute;
  z-index: 1080;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e8edf5);
  border-radius: var(--radius-sm, 12px);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem 0;
}
.gcom-lookup-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  color: inherit;
}
.gcom-lookup-item:hover,
.gcom-lookup-item.is-active {
  background: var(--brand-soft, #eaf0ff);
}
.gcom-lookup-item__title {
  font-weight: 600;
  font-size: 0.9rem;
}
.gcom-lookup-item__meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted, #667085);
  margin-top: 0.1rem;
}
.gcom-lookup-empty,
.gcom-lookup-loading {
  padding: 0.75rem 0.85rem;
  color: var(--muted, #667085);
  font-size: 0.85rem;
}
.gcom-lookup.is-selected .gcom-lookup-input {
  border-color: #12b76a;
  background: #f6fffb;
}

