@font-face {
  font-family: 'BBBDMSans';
  src: url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Light.woff2') format('woff2'),
       url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'BBBDMSans';
  src: url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Regular.woff2') format('woff2'),
       url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'BBBDMSans';
  src: url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Medium.woff2') format('woff2'),
       url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'BBBDMSans';
  src: url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Bold.woff2') format('woff2'),
       url('sources/typos/bbb-dm-sans-main/webfonts/BBBDMSans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Crozet';
  src: url('sources/typos/crozet-te-main/webfonts/Crozet-Regular.woff2') format('woff2'),
       url('sources/typos/crozet-te-main/webfonts/Crozet-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

:root {
  color: #1d1020;
  background: #f7e0eb;
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
}
body {
  background:
    linear-gradient(90deg, rgba(212,50,142,0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(212,50,142,0.1) 1px, transparent 1px),
    radial-gradient(circle at top left, #ffdce9 0%, #f8f0f4 24%, #fbeaf3 100%);
  background-size: 80px 80px, 80px 80px, 100% 100%;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.page-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}
.bg-welcome {
  position: absolute;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  pointer-events: none;
  user-select: none;
  text-align: center;
}
.bg-welcome-title {
  font-family: 'Crozet', serif;
  font-size: 140px;
  line-height: 0.9;
  color: rgb(202, 6, 104);
  letter-spacing: -0.02em;
}
.bg-welcome-intro {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgba(212, 47, 132, 0.438);
  margin: 0;
  letter-spacing: 0.01em;
}
.top-actions {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2px;
}
.top-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #d42f84;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.top-btn:hover {
  opacity: 0.6;
}
.top-zoom-level {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d42f84;
  min-width: 34px;
  text-align: center;
  user-select: none;
}
.top-sep {
  width: 1px;
  height: 16px;
  background: rgba(212, 47, 132, 0.2);
  margin: 0 4px;
}
.toolbar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  background: white;
  border-radius: 999px;
  box-shadow: 0 8px 40px rgba(29, 16, 32, 0.14), 0 0 0 1px rgba(212, 47, 132, 0.1);
}
.toolbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #3d2538;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  position: relative;
}
.toolbar-btn:hover,
.toolbar-btn.is-active {
  background: rgba(212, 47, 132, 0.1);
  color: #d42f84;
}
.toolbar-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border-radius: inherit;
}
.toolbar-sep {
  width: 1px;
  height: 22px;
  background: rgba(212, 47, 132, 0.15);
  margin: 0 6px;
  flex-shrink: 0;
}
.toolbar-zoom-level {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3d2538;
  min-width: 38px;
  text-align: center;
  user-select: none;
  letter-spacing: 0.02em;
}
.toolbar-select {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #3d2538;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  min-width: 72px;
  transition: background 0.15s ease, color 0.15s ease;
}
.toolbar-select:hover {
  background: rgba(212, 47, 132, 0.08);
  color: #d42f84;
}
.board-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.board {
  position: absolute;
  inset: 0;
  width: 2400px;
  height: 1600px;
  transform-origin: 0 0;
  transform: translate(0px, 0px);
  background: transparent;
  cursor: grab;
}
.board:active {
  cursor: grabbing;
}
.board.is-transitioning {
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
select {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(212,50,142,0.2);
  background: #fff;
}
.canvas-arrow {
  position: absolute;
  top: 580px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  user-select: none;
  color: rgba(212, 47, 132, 0.35);
}
.canvas-arrow span {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* Penderie */
.wardrobe {
  position: absolute;
  top: 880px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.wardrobe-left {
  flex-shrink: 0;
}
.wardrobe-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 820px;
}
.wardrobe-right-bottom {
  display: flex;
  gap: 20px;
}
.w-block {
  border: 1.5px solid rgba(212, 47, 132, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  padding: 28px 32px;
  backdrop-filter: blur(4px);
}
.w-block--outfit {
  width: 420px;
  min-height: 620px;
  border-style: dashed;
  border-color: rgba(212, 47, 132, 0.25);
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
}
.w-block--small {
  flex: 1;
  min-width: 220px;
}
.w-block-header {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(212, 47, 132, 0.45);
  margin-bottom: 20px;
}
.wardrobe-items {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  padding-bottom: 4px;
}
.wardrobe-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  position: relative;
  margin-right: -60px;
  transition: transform 0.2s ease;
  z-index: 1;
}
.wardrobe-item:last-child {
  margin-right: 0;
}
.wardrobe-item:hover {
  transform: translateY(-12px) translateX(6px);
  z-index: 20;
}
.wardrobe-item:active {
  cursor: grabbing;
}
.wardrobe-item-img {
  width: 120px;
  height: 160px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(29, 16, 32, 0.18));
}
.wardrobe-item-swatch {
  width: 120px;
  height: 160px;
  border-radius: 16px;
  filter: drop-shadow(0 6px 14px rgba(29, 16, 32, 0.14));
}
.wardrobe-item-name {
  font-family: 'BBBDMSans', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(60, 30, 50, 0.5);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-item {
  position: absolute;
  width: 160px;
  cursor: grab;
  background: transparent;
  border: none;
  overflow: visible;
}
.workspace-item:active {
  cursor: grabbing;
}
.delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: transparent;
  color: #d42f84;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
  padding: 0;
}
/* Desktop : croix au hover */
@media (hover: hover) {
  .workspace-item:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
  }
}
/* Mobile : croix au tap (classe toggleée par JS) */
.workspace-item.is-selected .delete-btn {
  opacity: 1;
  transform: scale(1);
}
.workspace-item-img {
  width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(29, 16, 32, 0.22));
  transition: filter 0.2s ease;
}
.workspace-item:hover .workspace-item-img {
  filter: drop-shadow(0 14px 36px rgba(29, 16, 32, 0.3));
}
.workspace-item-preview {
  width: 100%;
  min-height: 140px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #f4dff0;
  color: #4c2f4a;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(38, 18, 45, 0.12);
}
.workspace-item .label {
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(60, 30, 50, 0.5);
}
@media (max-width: 980px) {
  .board {
    width: 1800px;
    height: 1200px;
  }
}
@media (max-width: 720px) {
  .toolbar {
    bottom: 16px;
    padding: 4px 8px;
    gap: 0;
  }
  .toolbar-select {
    min-width: 60px;
    font-size: 0.72rem;
  }
  .toolbar-sep {
    margin: 0 3px;
  }
}
