/* ---------- Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 0 !important;
  height: auto !important;
}

body {
  background: #f4f5fb;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Header + steps ---------- */
header {
  background: #ffffff;
  height: 30px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin-bottom: 0;
}

.logo {
  font-family: "Space Age", Orbitron, system-ui, sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.16em;
  color: #f70438;
  text-align: center;
}

.steps-bar {
  display: none;
}

.step-item {
  text-align: center;
}

.step-item .step-number {
  display: block;
  font-weight: 600;
  color: #fd053b;
  margin-bottom: 2px;
  font-size: 16px;
  height: 30px;
}

.step-item .step-label {
  display: block;
  font-size: 0.9rem;
}

/* ---------- Layout principal ---------- */
main {
  padding: 16px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.top-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 20px;
}

/* ---------- Panels (volets) ---------- */
.panel {
  background: #ffffff;
  border-radius: 5px;
  padding: 8px 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.top-columns .panel {
  display: flex;
  flex-direction: column;
}

.top-columns .panel > *:last-child {
  margin-top: auto;
}

.panel h2 {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 14px;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  color: #111827;
}

.panel h3 {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 14px;
  margin: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2c323b;
  text-align: center;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  width: 80%;
  padding: 10px 0;
  margin-top: 16px;
  border: none;
  border-radius: 4px;
  background: #fa0339;
  color: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  font-family: "Orbitron", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#btn-devis {
  display: block;
  width: 80%;
  margin: 18px auto 0;
  text-align: center;
}

#btn-upload {
  align-self: center;
  margin-top: auto;
  margin-bottom: 0;
  width: 80%;
}

/* ---------- Footer ---------- */
.hb3d-footer {
  background: #ffffff;
  color: #111827;
  padding: 8px 24px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-family: "Space Age", "Orbitron", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin-top: -45px;
}

.hb3d-footer-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hb3d-footer-main {
  display: inline-block;
}

.footer-copy {
  display: block;
  margin-top: 4px;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #999999;
}

/* ---------- Formulaires & tableaux ---------- */
label {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  color: #4b5563;
  font-family: Orbitron, system-ui, sans-serif;
}

select,
input[type="number"],
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 6px 8px;
  margin-top: 3px;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  font-size: 0.87rem;
  background: #ffffff;
  color: #111827;
}

textarea#notes,
textarea[name="notes"] {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #000000;
}

#notes {
  min-height: 100px;
}

.panel #quantite {
  font-size: 12px;
  font-family: Orbitron, system-ui, sans-serif;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 6px;
  margin-bottom: 10px;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 5px 6px;
  text-align: left;
}

th {
  background: #f3f4f6;
  color: #374151;
}

.panel table .cell-filename {
  max-width: 140px;
  word-break: break-word;
  white-space: normal;
}

.panel table .cell-filename span {
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---------- Couleurs / chips ---------- */
.couleurs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip-color {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  user-select: none;
}

.chip-color input[type="radio"] {
  display: none;
}

.chip-color .swatch {
  width: 23px;
  height: 23px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.chip-color .swatch-label {
  font-size: 0.75rem;
}

.chip-color input[type="radio"]:checked + .swatch {
  outline: 2px solid #f97316;
  outline-offset: 1px;
}

.swatch-panier {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  margin-right: 4px;
  background-color: #e5e7eb;
  vertical-align: middle;
}

.swatch-panier-label {
  font-size: 0.75rem;
  vertical-align: middle;
}

/* ---------- Upload zone / viewer ---------- */
.upload-zone {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  margin-bottom: 16px;
  background: #f9fafb;
  font-size: 0.9rem;
  color: #4b5563;
}

.upload-zone strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
}

.viewer {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #6b7280;
  background: #f9fafb;
}

/* ---------- Bloc upload / logo HB3D ---------- */
.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  text-align: center;
}

.hb3d-mark {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Space Age", "Orbitron", system-ui, sans-serif;
}

.hb3d-mark .name {
  width: 100%;
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  color: #fc0439;
  text-align: center;
}

.hb3d-mark .subtitle {
  width: 100%;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  margin-top: 4px;
  text-align: center;
}

.hb3d-mark .name p,
.hb3d-mark .subtitle p {
  margin: 0;
  text-align: center;
}

.hb3d-mark img {
  display: block;
  margin: 12px auto;
}

.circular-upload {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.35);
  background: conic-gradient(#e11d48 calc(var(--progress, 0) * 1%), #e5e7eb 0);
  transition: background 0.4s ease-out;
}

.circular-upload::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #ffffff;
}

.circular-upload span {
  position: relative;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 1rem;
  color: #111827;
}

#hb3d-upload-text,
.upload-text {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  font-size: 0.82rem;
  color: #4b5563;
}

/* ---------- Panier ---------- */
.panier-stack {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  margin-bottom: 18px;
}

.panier-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.panier-label {
  margin: 0;
  font-family: Orbitron, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b5563;
}

.panier-value {
  font-family: Orbitron, system-ui, sans-serif;
  font-size: 1rem;
  color: #111827;
  text-align: left;
  word-break: break-word;
}

.panier-couleur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panier-row-total .panier-label,
.panier-row-total .panier-value {
  font-weight: 700;
}

.panier-row-total .panier-value {
  font-size: 1.1rem;
  color: #fa0339;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .top-columns {
    grid-template-columns: 1fr;
  }

  .steps-bar {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .top-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-bar {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 6px;
  }
}

/* Desktop 4 colonnes déjà couvert par la règle de base .top-columns */


/* === TEST VISUEL 1 : panier + respiration générale === */

/* Un peu plus d'air dans les volets */
.panel {
  padding: 12px 14px;
  border-radius: 8px;
}

/* Titres de volets légèrement plus lisibles */
.panel h2 {
  margin-bottom: 6px;
  padding-bottom: 8px;
  line-height: 1.35;
}

/* Panier plus propre */
.panier-stack {
  margin-top: 12px;
  margin-bottom: 22px;
}

.panier-row {
  grid-template-columns: 120px 1fr;
  column-gap: 14px;
  padding: 11px 0;
}

/* Valeurs un peu plus nettes */
.panier-value {
  font-size: 1.02rem;
  line-height: 1.35;
}

/* Le total doit ressortir franchement */
.panier-row-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 2px solid #f3d3db;
  border-bottom: none;
}

.panier-row-total .panier-label {
  font-size: 0.82rem;
  color: #374151;
}

.panier-row-total .panier-value {
  font-size: 1.28rem;
  font-weight: 800;
  color: #fa0339;
  letter-spacing: 0.02em;
}

/* Boutons un peu plus premium visuellement */
.btn {
  border-radius: 6px;
}

/* === TEST VISUEL 2 : lisibilité libellés + centrage images machines === */

/* Libellés plus lisibles dans le panier / récap */
.panier-label,
.panier-row .panier-label,
.panier-row-total .panier-label {
  font-weight: 700;
}

/* Si les champs du récap "Nom du fichier / Couleur / etc." utilisent cette classe */
.panier-row .panier-value {
  font-weight: 600;
}

/* Variante utile si tes libellés de formulaire ou de résumé sont de vrais labels */
label,
.form-label,
.resume-label,
.devis-label {
  font-weight: 700;
}

/* Centrage des visuels machines dans le volet 2 */
.machine-card,
.machine-box,
.tech-card,
.tech-box,
.machine-image,
.tech-image {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Image elle-même centrée proprement */
.machine-card img,
.machine-box img,
.tech-card img,
.tech-box img,
.machine-image img,
.tech-image img {
  display: block;
  margin: 0 auto;
  object-position: center;
}

/* Si les cartes FDM / SLA sont en colonne, garde un alignement net */
.machine-card,
.machine-box,
.tech-card,
.tech-box {
  flex-direction: column;
}

.panier-label {
  font-weight: 800;
  color: #374151;
}

.panier-value {
  font-weight: 600;
}

/* === TEST VISUEL 2 BIS : lisibilité + centrage volet 2 === */

/* Libellés plus lisibles */
.panier-label {
  font-weight: 800;
  color: #374151;
}

.panier-value {
  font-weight: 600;
}

/* Volet 2 : tableau technologies */
.panel table {
  margin: 10px auto 0;
  border-collapse: collapse;
}

.panel table td {
  text-align: center;
  vertical-align: top;
  padding: 6px 10px;
}

.panel table td img {
  display: block;
  margin: 0 auto 6px auto;
}

.panel table td p {
  margin: 0;
  font-weight: 700;
  text-align: center;
}

/* === TEST VISUEL 3 : volet 3 plus lisible === */

.panier-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #374151;
}

.panier-value {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
footer,
footer p,
.footer-copyright,
.copyright {
  color: #000000;
}

footer p,
footer span,
footer small,
footer div {
  color: #000000 !important;
}
/* Boutons plus lisibles */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="file"]::file-selector-button {
  font-size: 1.02rem;
  font-weight: 800;
}

/* === Finition HB3D === */

/* Libellés formulaires plus présents */
label {
  font-weight: 700;
  color: #374151;
}

/* Bloc TOTAL encore plus premium */
.panier-row-total {
  background: #fff7f9;
  border-radius: 0px;
  padding-bottom: 14px;
}

.panier-row-total .panier-value {
  font-size: 1.35rem;
}

#remise-info {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: #e6004c;
}

.panier-remise-message {
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #e6004c;
  margin-top: 4px;
}

/* Option 1 : si le disque est dans un conteneur dédié */
.circular-upload,
.upload-text {
  position: relative;
  top: 25px;
}
.upload-text {
  font-size: 0,98rem;
  font-weight: 600;
  line-height: 1.35;
  color: #252627;
}


.hb3d-instructions {
  margin: 50px auto 18px;
  padding: 16px 18px;
  max-width: 520px;
  background: #fff7f8;
  border: 1px solid #f3c7d1;
  border-radius: 10px;
  color: #374151;
  text-align: left;
}

.hb3d-instructions p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.hb3d-instructions p:last-child {
  margin-bottom: 0;
}

