/* Copie depuis frontend/assets/css/styles.css — coque Configurer le produit */
:root {
  --white: #ffffff;
  --cloud: #f4f7fb;
  --steel: #66758c;
  --ink-soft: #475569;
  --ink-faint: #b6c2d4;
  --grey-line: #c3cedd;
  --r-lg: 14px;
  --shadow-md: 0 14px 38px rgba(28, 42, 66, 0.07);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
.appshell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.appshell__top {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.appshell__logo {
  height: 19px;
  width: auto;
}

.appshell__top-spacer {
  flex: 1;
}

.appshell__avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid #cddcff;
  color: var(--blue);
  font-size: 0.625rem;
  font-weight: 800;
}

.appshell__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.appshell__side {
  border-right: 1px solid var(--line);
  padding: 12px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--white);
}

.appshell__sidelabel {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8d9bb0;
  padding: 5px 8px 7px;
}

.appshell__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.appshell__nav::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  opacity: 0.55;
  flex: none;
}

.appshell__nav.is-on {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.appshell__nav.is-on::before {
  opacity: 1;
}

.appshell__side-foot {
  margin-top: auto;
  padding-top: 10px;
}

.appshell__plan {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--steel);
}

.appshell__main {
  min-width: 0;
  min-height: 0;
  background: var(--cloud);
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

/* Le contenu s'efface avant d'etre remplace : jamais de saut sec */
.appshell__main.is-swapping {
  opacity: 0.28;
  transform: translateY(5px);
}

.appshell__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 0;
  margin: 0;
  font-size: 0.75rem;
  color: var(--steel);
  min-height: 28px;
  flex-wrap: wrap;
}

.appshell__crumb b {
  color: var(--blue);
  font-weight: 600;
}

.appshell__crumb i {
  font-style: normal;
  color: var(--ink-faint);
}

.appshell__crumb strong {
  color: var(--navy);
  font-weight: 650;
}

.appshell__head {
  padding: 8px 16px 0;
}

.appshell__head h4 {
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0;
}

.appshell__head p {
  margin: 3px 0 0;
  font-size: 0.75rem;
  color: var(--steel);
}

.appshell__tabs {
  display: flex;
  gap: 22px;
  margin: 12px 18px 0;
  border-bottom: 1px solid var(--line);
}

.appshell__tabs span {
  padding: 0 2px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--steel);
  position: relative;
}

.appshell__tabs span.is-on {
  color: var(--navy);
}

.appshell__tabs span.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.appshell__screen {
  flex: 1;
  padding: 14px 16px 16px;
  min-height: 0;
}

.mpbadge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.5625rem;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
}

.mpbadge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.mpbadge--ready {
  color: #1c7a53;
  background: #e4f6ee;
}

.use {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.usepanel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  overflow: hidden;
}

.usepanel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.usepanel__thumb {
  width: 42px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  display: grid;
  place-items: center;
  padding: 3px;
}

.usepanel__thumb svg {
  width: 100%;
  height: 100%;
}

.usepanel__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.usepanel__body {
  padding: 11px 12px 12px;
  display: grid;
  gap: 8px;
}

.usepanel__gen {
  width: 100%;
  margin-top: 4px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.usepanel__gen.is-pulse {
  transform: scale(1.03);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.28);
}

.usecol {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.useview {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--cloud);
  background-image: radial-gradient(rgba(11, 18, 32, 0.09) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
}

.useview svg {
  width: 100%;
  height: 100%;
  max-height: 220px;
}

.useview__label {
  position: absolute;
  top: 10px;
  left: 13px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

/* Les developpes recalcules : on doit voir la piece changer de forme
   et la quantite s'allumer quand la formule la fait exister. */

.usedevs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.usedev {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  cursor: pointer;
  transition: opacity 0.35s var(--ease), border-color 0.35s var(--ease),
    border-style 0.35s var(--ease), box-shadow 0.2s var(--ease);
}

.usedev.is-on {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.usedev__view {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fafbfd, #f2f6fb);
}

.usedev__view svg {
  width: 100%;
  height: 100%;
}

.usedev__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.usedev__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usedev__qty {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.625rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.usedev.is-off {
  border-style: dashed;
  border-color: #cfd8e6;
  background: transparent;
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.usedev.is-off .usedev__qty {
  background: #eef2f7;
  color: var(--steel);
  font-weight: 700;
}

/* Fichiers DXF : sous l’entrée + les aperçus */

.usefiles {
  grid-column: 1 / -1;
  border: 1px solid #bfd6c9;
  border-radius: 9px;
  background: #f3fbf7;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
  display: grid;
  gap: 4px;
  padding: 8px 12px;
}

.usefiles.is-empty {
  border-color: var(--line);
  background: #fbfcfe;
}

.usefiles.is-empty .usefiles__head {
  color: var(--steel);
}

.usefiles.is-empty .usefiles__head b {
  color: #6b7a90;
}

.usefiles.is-empty .usefiles__ico,
.usefiles.is-empty .usefiles__ico::before {
  background: var(--grey-line);
}

.usefiles__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.75rem;
  color: #1c7a53;
}

.usefiles__head b {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  color: #14603f;
}

.usefiles__ico {
  width: 15px;
  height: 12px;
  flex: none;
  border-radius: 2px 3px 3px 3px;
  background: #64b995;
  position: relative;
}

.usefiles__ico::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: #64b995;
}

.usefiles__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.75rem;
  color: #37485f;
  min-height: 1.2em;
}

.usefiles__list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  animation: softUp 0.35s var(--ease) both;
}

.usefiles__list li::before {
  content: "\2713";
  color: #1c7a53;
  font-weight: 700;
}

.usefiles__list li.is-wait {
  color: #9aa7b8;
  animation: none;
}

.usefiles__list li.is-wait::before {
  content: "\00b7";
  color: var(--grey-line);
}

.usefiles__list em {
  font-style: normal;
  color: var(--steel);
}

.usefiles__foot {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1c7a53;
  font-variant-numeric: tabular-nums;
}

.usefiles__foot:empty {
  display: none;
}

/* Champs de configuration : Nombre, Liste, Oui/Non */

.params {
  display: grid;
  gap: 6px;
}

.param {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
}

.param__ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f2f5f9;
  color: #68768b;
  font-size: 0.75rem;
}

.param > label,
.param > span:not(.param__ico) {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.param input,
.param select {
  width: 100%;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.switch {
  justify-self: end;
  position: relative;
  width: 38px;
  height: 21px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #e6ebf3;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.25);
  transition: transform 0.18s var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--blue);
  border-color: var(--blue);
}

.switch[aria-checked="true"]::after {
  transform: translateX(17px);
}

.panel__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

@keyframes softUp {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* â”€â”€ SVG technique â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cad-outline {
  fill: rgba(47, 107, 255, 0.05);
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linejoin: round;
}

.cad-hole {
  fill: var(--white);
  stroke: var(--navy);
  stroke-width: 2;
}

/* Géométrie ajoutée par une règle du Produit : elle doit se distinguer
   immédiatement de ce que l'utilisateur a dessiné lui-même. */
.cad-new {
  fill: var(--white);
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linejoin: round;
}

.cad-dim {
  stroke: var(--blue);
  stroke-width: 1;
}

.cad-ext {
  stroke: var(--blue);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.cad-fold {
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-dasharray: 8 4 2 4;
  opacity: 0.85;
}

.cad-arrow {
  fill: var(--blue);
  stroke: none;
}

.cad-text {
  fill: var(--blue);
  font: 600 12px Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}

.cad-node {
  fill: var(--white);
  stroke: var(--blue);
  stroke-width: 1.5;
}

.cad-axis {
  stroke: var(--steel);
  stroke-width: 1;
  opacity: 0.6;
}

@media (max-width: 1180px) {
  .use {
    grid-template-columns: 236px minmax(0, 1fr);
  }
}

@media (max-width: 940px) {
  .use {
    grid-template-columns: 1fr;
  }
  .appshell__body {
    grid-template-columns: 1fr;
  }
  .appshell__side {
    display: none;
  }
  .appshell__screen {
    padding: 14px;
  }
  .appshell__crumb,
  .appshell__head,
  .appshell__tabs {
    padding-left: 14px;
    padding-right: 14px;
  }
  .usedevs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}