/* Catalogue pyro — même UX que Clients / Projets (clients-page, KPI, topbar, card + tableau) */

.catalogue-pyro-page {
  max-width: 100%;
}

.catalogue-topbar .clients-topbar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.catalogue-select-input {
  max-width: 280px;
}

.catalogue-search-input {
  flex: 1;
  min-width: min(100%, 240px);
  width: 100%;
  max-width: none;
}

/* Grille : dans la carte, pas de double « boîte » */
.catalogue-table-card.clients-card {
  padding: 0;
  overflow: hidden;
}

.catalogue-table-wrap {
  min-width: 0;
}

.catalogue-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}

.catalogue-scroll::-webkit-scrollbar {
  height: 10px;
}

.catalogue-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(236, 72, 153, 0.45), rgba(139, 92, 246, 0.4));
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.catalogue-table-inner {
  min-width: 1480px;
}

.catalogue-head,
.catalog-row {
  display: grid;
  grid-template-columns:
    88px minmax(190px, 1.35fr) minmax(170px, 1.1fr) 100px 76px 44px 52px 48px 52px minmax(130px, 1fr) minmax(140px, 1.1fr) 44px 78px 68px 52px 84px 52px 40px;
  gap: 10px 12px;
  align-items: center;
}

.catalogue-head {
  padding: 12px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.catalogue-head span {
  white-space: nowrap;
}

.catalogue-head__play {
  justify-self: end;
  text-align: right;
}

.catalogue-head__delete {
  justify-self: center;
  text-align: center;
}

.catalogue-body {
  max-height: min(68vh, 680px);
  overflow-y: auto;
}

.catalogue-empty {
  padding: 32px;
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

.catalog-row {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.16s ease, transform 0.16s ease;
}

.catalog-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.catalog-row:hover {
  background: rgba(236, 72, 153, 0.1);
}

.catalog-row:last-child {
  border-bottom: none;
}

.catalog-cell {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
  min-width: 0;
}

.catalog-cell--ref {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(244, 114, 182, 0.98);
}

.catalog-cell--nom {
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.catalog-cell--cat {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.3;
}

.catalog-cell--effet {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
}

.catalog-cell--num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.catalog-cell--prix {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #fff;
}

.catalog-cell--qty {
  display: flex;
  justify-content: center;
}

.catalog-cell--total {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(167, 243, 208, 0.95);
}

.catalog-row__meta {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

/* Badge stock type Pyroshop */
.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.stock-badge--muted {
  background: rgba(100, 116, 139, 0.35);
  color: #94a3b8;
  font-weight: 500;
}

.catalog-qty-input {
  width: 48px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.catalog-qty-input:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.catalog-row__play-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.catalog-row__delete-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.catalog-play {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(139, 92, 246, 0.32));
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.15);
  color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.2s ease;
}

.catalog-play:hover:not(:disabled) {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.catalog-play:active:not(:disabled) {
  transform: scale(0.98);
}

.catalog-play:disabled,
.catalog-play.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.catalog-play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.catalog-del-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  font-size: 1rem;
  cursor: pointer;
}

.catalog-del-btn:hover {
  background: rgba(239, 68, 68, 0.24);
}

/* Modal vidéo — overlay comme modal-overlay-modern (clients / feux-passes) */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.video-modal__box {
  width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(12, 18, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.video-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.video-modal__ref {
  font-size: 0.8rem;
  color: rgba(244, 114, 182, 0.95);
  font-family: ui-monospace, monospace;
}

.video-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.video-modal__close:hover {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
}

.video-modal__body {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.45);
}

.video-modal__body video,
.video-modal__body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
}

/* Modale ajout — mêmes classes que clients / feux-passes (modal-overlay-modern, modal-box-modern) */
#catalogueAddModal .modal-box-large.catalogue-add-modal__box {
  width: min(960px, 96vw);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding-bottom: 26px;
}

.catalogue-add-modal__intro {
  margin: 0 0 20px;
}

.catalogue-add-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 16px;
}

.catalogue-add-form-grid .full {
  grid-column: 1 / -1;
}

#catalogueAddModal .modal-actions-modern {
  margin-top: 24px;
}
