/* =========================================================
   RD PRINT SOLUTIONS — CONFIGURATEUR D'ÉQUIPE
   S'appuie sur les variables de styles.css
   ========================================================= */

/* ---------- Intro ---------- */
.cfg-hero {
  position: relative;
  padding: calc(var(--hdr-h) + 64px) var(--gutter) clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.cfg-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.cfg-hero .eyebrow { margin-bottom: 16px; }
.cfg-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.022em;
  margin: 0 0 18px;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}
.cfg-hero h1 em { font-style: normal; color: var(--accent); }
.cfg-hero p {
  margin: 0;
  max-width: 60ch;
  font-size: var(--lede);
  line-height: 1.55;
  color: var(--ink-2);
}
.cfg-howto {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 28px;
  list-style: none;
  padding: 0;
}
.cfg-howto li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}
.cfg-howto li b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
}

/* ---------- Layout ---------- */
.cfg-wrap {
  background: var(--bg);
  padding: clamp(40px, 5vw, 72px) 0 clamp(60px, 8vw, 120px);
}
.cfg-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 1080px){
  .cfg-layout { grid-template-columns: 1fr; }
}

/* ---------- Step block ---------- */
.cfg-step { margin-bottom: clamp(44px, 5vw, 72px); }
.cfg-step:last-child { margin-bottom: 0; }
.cfg-step-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 20px;
  align-items: start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.cfg-step-no {
  grid-row: 1 / span 2;
  width: 44px; height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.cfg-step-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -.018em;
  margin: 4px 0 0;
  color: var(--ink);
}
.cfg-step-head p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--mute);
  grid-column: 2;
}

/* ---------- Sector chips ---------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 640px){ .sector-grid { grid-template-columns: repeat(2, 1fr); } }
.sector-chip {
  appearance: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
  font-family: inherit;
  color: var(--ink);
}
.sector-chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.sector-chip svg { width: 26px; height: 26px; color: var(--ink); opacity: .9; }
.sector-chip span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
}
.sector-chip.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.sector-chip.is-on svg { color: #fff; opacity: 1; }

/* ---------- Headcount ---------- */
.headcount {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.headcount-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.headcount-label b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.headcount-label small {
  font-size: 13px;
  color: var(--mute);
}

/* ---------- Stepper ---------- */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.stepper button {
  appearance: none;
  border: 0;
  background: transparent;
  width: 38px; height: 38px;
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease);
}
.stepper button:hover { background: var(--accent-soft); }
.stepper button:disabled { color: var(--mute-2); cursor: not-allowed; }
.stepper input {
  width: 52px;
  border: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm button { width: 32px; height: 32px; font-size: 16px; }
.stepper--sm input { width: 44px; font-size: 14px; }

/* ---------- Category ---------- */
.cat { margin-bottom: 34px; }
.cat:last-child { margin-bottom: 0; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.cat-head h3 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
  white-space: nowrap;
}
.cat-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Product cards ---------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 12px;
}
.prod-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.prod-card.is-on {
  border-color: var(--ink);
  box-shadow: 0 10px 30px -16px rgba(15,15,15,.25);
}
.prod-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font-family: inherit;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prod-ico {
  width: 40px; height: 40px;
  color: var(--ink);
  opacity: .9;
}
.prod-ico svg { width: 100%; height: 100%; }
.prod-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.prod-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--mute);
}
.prod-check {
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
  background: #fff;
}
.prod-check svg {
  width: 13px; height: 13px;
  color: #fff;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.prod-card.is-on .prod-check { background: var(--ink); border-color: var(--ink); }
.prod-card.is-on .prod-check svg { opacity: 1; transform: scale(1); }

/* controls revealed when selected */
.prod-controls {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.prod-card.is-on .prod-controls { display: flex; }
.prod-ctrl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prod-ctrl-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}
.tech-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='%237B7B7B' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat right 8px center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink);
  padding: 7px 26px 7px 10px;
  cursor: pointer;
  max-width: 60%;
}
.tech-select:focus { outline: none; border-color: var(--ink); }

/* ---------- Besoins (grandes cases larges) ---------- */
.need-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 560px){ .need-grid { grid-template-columns: 1fr; } }
.need-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.need-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.need-card.is-on {
  border-color: var(--ink);
  box-shadow: 0 12px 34px -18px rgba(15,15,15,.3);
}
.need-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 22px 52px 22px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  font-family: inherit;
  color: var(--ink);
}
.need-ico { width: 40px; height: 40px; color: var(--ink); opacity: .9; }
.need-ico svg { width: 100%; height: 100%; }
.need-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.need-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.need-desc { font-size: 13px; line-height: 1.45; color: var(--mute); }
.need-card .prod-check { top: 18px; right: 18px; }
.need-card.is-on .prod-check { background: var(--ink); border-color: var(--ink); }
.need-card.is-on .prod-check svg { opacity: 1; transform: scale(1); }

/* ---------- Marquage : brand color ---------- */
.brand-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
}
@media (max-width: 640px){ .brand-block { grid-template-columns: 1fr; } }
.brand-block h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  margin: 0 0 12px;
  color: var(--ink);
}
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: transform .2s var(--ease);
  padding: 0;
  appearance: none;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.swatch.is-on::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px; height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12l5 5L20 6' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}
.swatch[data-light="1"].is-on::after {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 12l5 5L20 6' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

/* logo drop (reuse .drop look on light bg) */
.cfg-drop {
  display: block;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  text-align: center;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.cfg-drop:hover, .cfg-drop.drag { background: var(--bg-soft); border-color: var(--ink); }
.cfg-drop .drop-line { font-size: 14px; color: var(--ink); }
.cfg-drop .drop-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--mute); margin-top: 4px; }
.cfg-drop .drop-files { font-family: var(--font-mono); font-size: 11px; color: var(--ink); margin-top: 8px; display: block; }

/* ---------- Coordonnées ---------- */
.cfg-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
}
.cfg-form .field-full { grid-column: 1 / -1; }
@media (max-width: 640px){ .cfg-form { grid-template-columns: 1fr; } }
.cfg-field { position: relative; }
.cfg-field input,
.cfg-field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  padding: 22px 0 10px;
  outline: none;
  transition: border-color .25s var(--ease);
  border-radius: 0;
}
.cfg-field textarea { resize: vertical; min-height: 88px; }
.cfg-field input:focus,
.cfg-field textarea:focus { border-bottom-color: var(--ink); }
.cfg-field label {
  position: absolute;
  left: 0; top: 24px;
  font-size: 14px;
  color: var(--mute);
  pointer-events: none;
  transition: transform .25s var(--ease), font-size .25s var(--ease), color .25s var(--ease), letter-spacing .25s var(--ease);
  transform-origin: left top;
}
.cfg-field label span { color: var(--be-red); margin-left: 2px; }
.cfg-field input:focus + label,
.cfg-field input:not(:placeholder-shown) + label,
.cfg-field textarea:focus + label,
.cfg-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-20px) scale(.74);
  color: var(--ink);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cfg-field input::placeholder,
.cfg-field textarea::placeholder { color: transparent; }

/* =========================================================
   RECAP PANEL
   ========================================================= */
.recap {
  position: sticky;
  top: calc(var(--hdr-h) + 20px);
  background: var(--bg-dark);
  color: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.recap-top {
  height: 3px;
  background: linear-gradient(90deg,
    #0A0A0A 0 33.33%, var(--be-yellow) 33.33% 66.66%, var(--be-red) 66.66% 100%);
}
.recap-inner { padding: 26px 26px 24px; }
.recap-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin: 0 0 6px;
}
.recap-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.015em;
  margin: 0 0 18px;
  color: #fff;
}
.recap-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.recap-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.recap-meta-row span:first-child { color: rgba(255,255,255,.55); }
.recap-meta-row span:last-child { color: #fff; font-weight: 500; text-align: right; }

.recap-list {
  list-style: none;
  margin: 0;
  padding: 16px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 320px;
  overflow-y: auto;
}
.recap-empty {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.5);
  padding: 18px 0 6px;
}
.recap-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: baseline;
}
.recap-item-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.01em;
  color: #fff;
}
.recap-item-qty {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #fff;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.recap-item-qty svg { width: 15px; height: 15px; }
.recap-item-tech {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--be-yellow);
}
.recap-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.recap-total-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.recap-total-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.015em;
  color: #fff;
}
.recap-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.recap-actions .cta { width: 100%; }
.recap-cta {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.recap-cta:hover { background: #EFEFEF; border-color: #EFEFEF; color: var(--ink); }
.recap-cta:disabled { background: rgba(255,255,255,.18); border-color: transparent; color: rgba(255,255,255,.5); cursor: not-allowed; }
.recap-wa {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  gap: 10px;
}
.recap-wa:hover { background: rgba(37,211,102,.16); border-color: #25D366; color: #fff; }
.recap-wa svg { width: 18px; height: 18px; }
.recap-note {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  text-align: center;
  line-height: 1.6;
}

/* mobile: recap becomes a docked bar summary that expands */
@media (max-width: 1080px){
  .recap { position: static; margin-top: 8px; }
}

/* ---------- success overlay ---------- */
.cfg-success {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15,15,15,.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cfg-success.open { display: flex; }
.cfg-success-card {
  background: #fff;
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
}
.cfg-success-check {
  width: 60px; height: 60px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cfg-success-check svg { width: 30px; height: 30px; color: #fff; }
.cfg-success-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.018em;
  margin: 0 0 10px;
  color: var(--ink);
}
.cfg-success-card p {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- toast ---------- */
.cfg-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 120%);
  z-index: 150;
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.cfg-toast.show { transform: translate(-50%, 0); opacity: 1; }
.cfg-toast .flag-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--be-yellow);
  flex-shrink: 0;
}
