/* MyShop — thème caisse / showroom (Bootstrap 5 + surcouche) */
:root {
  --hm-bg: #0f1419;
  --hm-surface: #1a2332;
  --hm-border: rgba(255, 255, 255, 0.08);
  --hm-text: #e8eef7;
  --hm-muted: #8b9cb3;
  --hm-accent: #c9a227;
  --hm-accent-2: #3d9a7a;
  --hm-danger: #130a0a;
  --hm-radius: 14px;
  --hm-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --hm-placeholder: rgba(255, 255, 255, 0.78);
}

body.hm-body {
  background: linear-gradient(165deg, #0b0f14 0%, #121a24 45%, #0f1419 100%);
  color: var(--hm-text);
  min-height: 100vh;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ---- Layout dashboard (comme template admin) ---- */
.hm-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(26, 35, 50, 0.92);
  border-bottom: 1px solid var(--hm-border);
  backdrop-filter: blur(12px);
}

.hm-topbar-brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--hm-text);
}

.hm-topbar-spacer {
  flex: 1;
}

.hm-burger {
  width: 40px;
  height: 36px;
  border: 1px solid var(--hm-border);
  background: rgba(15, 20, 25, 0.45);
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
}

.hm-burger span {
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
}

/* Shell : sidebar + contenu alignés proprement */
.hm-shell {
  display: flex;
  height: calc(100vh - 54px);
}

/* Sidebar fixe à gauche (desktop) */
.hm-offcanvas {
  --bs-offcanvas-bg: rgba(10, 16, 28, 0.98);
  --bs-offcanvas-color: var(--hm-text);
}

.hm-sidebar {
  width: 240px;
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.98) 0%, rgba(10, 16, 28, 0.94) 100%);
  border-right: 1px solid var(--hm-border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  overflow: auto;
  height: 100%;
  flex: 0 0 240px;
}

.hm-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 6px 12px;
  border-bottom: 1px solid var(--hm-border);
  margin-bottom: 10px;
}

.hm-user-name {
  font-weight: 700;
  color: #fff;
}

.hm-section {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 10px 6px 6px;
}

.hm-menu .nav-link {
  color: rgba(232, 238, 247, 0.78);
  padding: 10px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.hm-menu .nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hm-menu .nav-link.active {
  background: rgba(201, 162, 39, 0.14);
  border: 1px solid rgba(201, 162, 39, 0.28);
  color: #ffe08a;
}

.hm-ico {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  opacity: 0.9;
}

.hm-sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hm-border);
}

/* Zone contenu : décalée pour laisser la sidebar */
.hm-content {
  margin-left: 0;
}

/* Mobile : sidebar offcanvas */
@media (max-width: 991.98px) {
  .hm-shell {
    display: block;
    height: auto;
  }

  .hm-sidebar {
    position: static;
    top: auto;
    height: auto;
    width: 100%;
    border-right: none;
    overflow: visible;
    flex: none;
  }

  .hm-content {
    margin-left: 0;
    height: auto;
    overflow: visible;
  }
}

/* Desktop : la sidebar occupe réellement 240px, le contenu prend le reste */
@media (min-width: 992px) {
  #hmSidebar {
    flex: 0 0 240px;
  }

  .hm-content {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Contenu à droite : footer collé en bas sans “vide” */
.hm-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: auto;
}

.hm-page {
  flex: 1 1 auto;
}

.hm-footer {
  margin-top: auto;
  border-top: 1px solid var(--hm-border);
  background: rgba(10, 16, 28, 0.25);
}

.hm-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
}

.hm-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--hm-border);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hm-stat {
  border-left: 4px solid var(--hm-accent);
}

.hm-stat.alt {
  border-left-color: var(--hm-accent-2);
}

.hm-badge-soft {
  background: rgba(201, 162, 39, 0.15);
  color: #f0d78c;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.hm-btn-gold {
  --bs-btn-bg: #c9a227;
  --bs-btn-border-color: #c9a227;
  --bs-btn-hover-bg: #b08f1f;
  --bs-btn-hover-border-color: #b08f1f;
  --bs-btn-color: #1a1305;
  --bs-btn-hover-color: #1a1305;
  font-weight: 600;
}

.hm-btn-reappro {
  --bs-btn-color: #e8f4ea;
  --bs-btn-border-color: rgba(61, 154, 122, 0.65);
  --bs-btn-hover-bg: rgba(61, 154, 122, 0.2);
  --bs-btn-hover-border-color: #3d9a7a;
  font-weight: 500;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Champs formulaire : texte saisi + placeholders bien lisibles (blanc cassé) */
.hm-form-control,
.hm-form-control:focus {
  background: rgba(15, 20, 25, 0.72);
  border-color: var(--hm-border);
  color: #f5f8fc;
}

.hm-form-control::placeholder {
  color: var(--hm-placeholder);
  opacity: 1;
}

.hm-form-control::-webkit-input-placeholder {
  color: var(--hm-placeholder);
}

.hm-form-control::-moz-placeholder {
  color: var(--hm-placeholder);
  opacity: 1;
}

.hm-form-control:-ms-input-placeholder {
  color: var(--hm-placeholder);
}

.hm-form-control:focus {
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.15);
  color: #ffffff;
}

select.hm-form-control,
select.hm-form-control:focus {
  color: #f5f8fc;
}

select.hm-form-control option {
  color: #1a1f26;
  background: #ffffff;
}

textarea.hm-form-control::placeholder {
  color: var(--hm-placeholder);
}

/* Zone caisse : marges latérales pour aérer le formulaire */
.hm-pos-layout {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2.75rem);
  padding-right: clamp(1rem, 4vw, 2.75rem);
}

.hm-pos-form-card .card-body {
  padding-left: clamp(1.25rem, 3vw, 2rem);
  padding-right: clamp(1.25rem, 3vw, 2rem);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.table-hm {
  --bs-table-bg: transparent;
  --bs-table-color: var(--hm-text);
  --bs-table-border-color: var(--hm-border);
}

.table-hm thead th {
  color: var(--hm-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Showroom TV */
.showroom-root {
  background: #050608;
  color: #f2f4f8;
  min-height: 100vh;
}

.showroom-hero {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.showroom-clock {
  font-variant-numeric: tabular-nums;
  color: #9fb0c8;
}

.showroom-card {
  background: linear-gradient(160deg, #12161d 0%, #0c0f14 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  height: 100%;
}

.showroom-price {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffe08a;
}

.showroom-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7d8ca3;
}

.showroom-pulse {
  animation: hm-pulse 2.4s ease-in-out infinite;
}

/* Carousel showroom : 5 produits par lot, rotation automatique */
.showroom-slide {
  display: none !important;
  flex-wrap: wrap;
}

.showroom-slide.is-active {
  display: flex !important;
}

.showroom-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.25s ease, background 0.25s ease;
}

.showroom-dot.is-active {
  background: #ffe08a;
  transform: scale(1.2);
}

@keyframes hm-pulse {

  0%,
  100% {
    opacity: 0.85;
  }

  50% {
    opacity: 1;
  }
}

@media print {

  .hm-navbar,
  .no-print {
    display: none !important;
  }
}