:root {
  /* --bg:           #0c0e13;
  --surface:      #12151c;
  --surface-2:    #181c25; */
  --bg:           #0c0e13;
  --surface:      #12151c;
  --surface-2:    #dde0ea;
  --border:       rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.14);
  /* --accent:       #fc6cb4; */
  --accent:       #7c6cfc;
  --accent-glow:  rgba(124,108,252,0.2);
  /* --accent-2:     #fc6cb4; */
  --accent-2:     #0d6efd;
  --text:         #181c25;
  --text-muted:   #4e5364;
  --danger:       #f87171;
  --danger-glow:  rgba(248,113,113,0.2);
  --radius:       16px;
  --radius-sm:    10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
} */

.card-model {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem 2rem 2.25rem;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.55);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.slot-counter {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.slot-counter strong {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--accent);
}

/* ── Slots row ── */
.slots-row {
  /* display: grid;
  grid-template-columns: repeat(3, 1fr); */
  gap: 0.875rem;
}

/* ── Slot wrapper (image + button below) ── */
.slot-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Single slot ── */
.img-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Number badge */
.slot-number {
  position: absolute;
  top: 0.55rem;
  left: 0.6rem;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* Green dot */
.slot-dot {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74,222,128,0.65);
  z-index: 3;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.34,1.56,.64,1);
}

/* ── Empty drop zone ── */
.slot-drop {
  width: 100%;
  height: 100%;
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s, opacity 0.2s;
  padding: 1rem;
  text-align: center;
}

.slot-drop:hover,
.slot-drop:focus-visible {
  border-color: var(--accent);
  background: rgba(124,108,252,0.05);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.slot-drop.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(124,108,252,0.1);
  box-shadow: 0 0 0 5px var(--accent-glow);
}

.slot-drop.drag-over .slot-icon {
  transform: scale(1.18) translateY(-2px);
}

.slot-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(124,108,252,0.35);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
}

.slot-icon svg { width: 18px; height: 18px; color: #fff; }

.slot-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.slot-hint {
  font-size: 0.63rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Filled state ── */
.slot-filled {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.slot-filled_cadre {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.img-slot.has-image .slot-drop   { pointer-events: none; opacity: 0; }
.img-slot.has-image .slot-filled { display: block; }
.img-slot.has-image .slot-filled_cadre { display: block; }

.img-slot.has-image .slot-number {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
}

.img-slot.has-image .slot-dot {
  opacity: 1;
  transform: scale(1);
}

.slot-filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.slot-filled_cadre img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.img-slot.has-image:hover .slot-filled img {
  transform: scale(1.06);
  filter: brightness(0.42);
}

.img-slot.has-image:hover .slot-filled_cadre img {
  transform: scale(1.06);
  filter: brightness(0.42);
}

/* Overlay */
.slot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.25s;
}

.img-slot.has-image:hover .slot-overlay { opacity: 1; }

.btn-delete {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
  box-shadow: 0 4px 18px var(--danger-glow);
}

.btn-delete:hover {
  transform: scale(1.18);
  box-shadow: 0 8px 26px rgba(248,113,113,0.55);
}

.btn-delete svg { width: 15px; height: 15px; }

.slot-img-name {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
}

/* ── Upload loader overlay ── */
.slot-uploading {
  position: absolute;
  inset: 0;
  background: rgba(12,14,19,0.75);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  z-index: 4;
  border-radius: var(--radius);
  backdrop-filter: blur(3px);
}

.img-slot.is-uploading .slot-uploading { display: flex; }

.upload-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(124,108,252,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.upload-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* ── Insert ref button ── */
.btn-insert-ref {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.22s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}

/* Disabled (no image yet) */
.btn-insert-ref:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Enabled (image uploaded) */
.btn-insert-ref:not(:disabled) {
  background: linear-gradient(135deg, rgba(124,108,252,0.15), rgba(252,108,180,0.1));
  color: var(--accent);
  border: 1px solid rgba(124,108,252,0.3);
  box-shadow: 0 2px 12px rgba(124,108,252,0.1);
}

.btn-insert-ref:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(124,108,252,0.25), rgba(252,108,180,0.18));
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,108,252,0.3);
}

.btn-insert-ref:not(:disabled):active {
  transform: scale(0.97);
}

.btn-insert-ref svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Copied flash */
.btn-insert-ref.copied {
  background: rgba(74,222,128,0.15) !important;
  border-color: rgba(74,222,128,0.4) !important;
  color: var(--success) !important;
}

/* Pop-in animation */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

.slot-filled.anim { animation: popIn 0.35s cubic-bezier(.34,1.56,.64,1) both; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 1.75rem;
  right: 1.75rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: none;
}

.toast-msg {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.95rem;
  font-size: 0.76rem;
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  animation: slideIn 0.28s ease both, fadeOut 0.28s 2.72s ease forwards;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-msg.error   { border-left-color: var(--danger); }
.toast-msg.success { border-left-color: var(--success); }

.toast-icon { flex-shrink: 0; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(14px); }
}







.card_model {
  height: 200px;
  width: 100%;
  background-image: url();
  background-position: center;
  background-size: cover;
}

.IA_card_title {
  position: relative;
  left:10px;
  top: 5px;
}

.card_padding {
  padding:10px;
}

.space_card {
  height: 75px;
}




.comparison-slider {
  position: relative;
  width: 100%;
  height: 400px; /* À ajuster selon tes besoins */
  overflow: hidden;
}
.comparison-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.comparison-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-overlay {
  width: 50%; /* Position initiale du curseur */
  z-index: 2;
}
/* Le slider invisible par-dessus */
.slider-input {
  position: absolute;
  inset: 0;
  background: transparent;
  appearance: none;
  z-index: 3;
  cursor: col-resize;
  margin: 0;
}
.slider-input::-webkit-slider-thumb {
  appearance: none;
  width: 4px;
  height: 1000px;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.card_buy_credit {
  min-width: 220px;
}




.img-slot_cadre {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Number badge */
.slot-number_cadre {
  position: absolute;
  top: 0.55rem;
  left: 0.2rem;
  width: 50px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.img-slot.has-image .slot-number_cadre {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
}

.big_slot {
  height: 250px;
  max-width: 75vw;
}


.printer_status{
  position:absolute;  
  bottom:25px; 
  left:25px; 
  height:7px; 
  width:7px; 
  border-radius:50px;
}
.printer_unconnected{
  color:#ff6464;
  background:#ff6464;
 }

.printer_connected{
  animation: blinker 1.5s linear infinite;
  color:#7dd87d;
  background:#7dd87d;
}

.printer_connected_hub{
  animation: blinker_hub 1.5s linear infinite;
  color:#4da9ff;
  background:#4da9ff;
}

@keyframes blinker {
  /* 50% {
   opacity: 0;
 } */
 0% {
  /* transform: scale(0.1); */
  box-shadow: 0 0 0 0 rgb(125 216 125 / 60%);
  opacity:1;
  }

  50% {
    /* transform: scale(1); */
    box-shadow: 0 0 0 10px rgba(125, 216, 125, 0);
    /* opacity: 0.5; */
  }
}

@keyframes blinker_hub {
  /* 50% {
   opacity: 0;
 } */
 0% {
  /* transform: scale(0.1); */
  box-shadow: 0 0 0 0 rgba(125, 161, 216, 0.6);
  opacity:1;
  }

  50% {
    /* transform: scale(1); */
    box-shadow: 0 0 0 10px rgba(125, 216, 125, 0);
    /* opacity: 0.5; */
  }
}


#editPrinterHub {
  max-width: 400px;
}
/* Cache le select par défaut */
#printer_hub_select {
  display: none;
}

/* Si le BODY (ou un parent commun) contient l'input coché, on affiche le select */
body:has(#printer_hub_option:checked) #printer_hub_select {
  display: block;
}






#gridContainer .row {
    transition: all 0.2s ease;
}

.input-group-text {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Empêcher les flèches sur les inputs number pour un look plus clean */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}