.cp {
  max-width: 920px;
  margin: 0 auto;
}

.cp-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex-wrap: wrap;
}

.cp-steps li {
  flex: 1 1 140px;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.cp-steps li.is-active {
  background: var(--brand);
  color: #fff;
}

.cp-steps li.is-done {
  background: rgba(91, 149, 131, 0.18);
  color: var(--brand-2);
}

.cp-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.cp-panel[hidden] {
  display: none;
}

.cp-panel h3 {
  margin-top: 0;
}

.cp-field {
  display: block;
  margin-bottom: 1rem;
}

.cp-field > span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cp input[type="email"],
.cp input[type="text"],
.cp input[type="date"],
.cp textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

.cp textarea {
  min-height: 90px;
  resize: vertical;
}

.cp-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cp-error {
  color: #a3361f;
  font-weight: 600;
  margin: 0.75rem 0 0;
}

.cp-hello {
  font-size: 1.05rem;
}

.cp-family {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.3rem;
}

.cp-products {
  display: grid;
  gap: 0.9rem;
}

.cp-product {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.cp-photo {
  object-fit: contain;
}

.cp-photo,
.cp-gallery {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background: var(--cream);
}

.cp-gallery {
  position: relative;
  overflow: hidden;
}

.cp-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cp-gallery-track::-webkit-scrollbar {
  display: none;
}

.cp-gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: start;
}

.cp-gallery-prev,
.cp-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(20, 31, 36, 0.15);
}

.cp-gallery-prev {
  left: 0.3rem;
}

.cp-gallery-next {
  right: 0.3rem;
}

.cp-gallery-dots {
  position: absolute;
  bottom: 0.35rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.cp-gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(29, 36, 40, 0.25);
}

.cp-gallery-dots span.is-on {
  background: var(--brand);
}

.cp-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 600;
  cursor: pointer;
}

.cp-check input {
  margin-top: 0.25rem;
}

#cp-prelevement p {
  margin: 0 0 0.6rem;
}

.cp-product h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.cp-product p {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.cp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
}

.cp-option .cp-price {
  color: var(--muted);
  white-space: nowrap;
}

.cp-mention {
  display: block;
  color: #8a6a1c;
  font-size: 0.8rem;
  font-weight: 600;
}

.cp-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.cp-qty button {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  background: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
}

.cp-qty input {
  width: 2.8rem;
  border: 0;
  text-align: center;
  font: inherit;
  -moz-appearance: textfield;
}

.cp-qty input::-webkit-outer-spin-button,
.cp-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.cp-summary {
  position: sticky;
  bottom: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: var(--brand-2);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: 600;
}

#cp-resume-franco {
  display: block;
  font-weight: 500;
  opacity: 0.85;
}

#cp-resume-franco.cp-franco-ok {
  color: #b9e3d3;
  opacity: 1;
}

.cp-choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.cp-choice input {
  margin-top: 0.3rem;
}

.cp-choice small {
  display: block;
  color: var(--muted);
}

.cp-note {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--cream);
  margin: 0.5rem 0 1rem;
}

.cp-note.is-ok {
  background: rgba(91, 149, 131, 0.16);
}

.cp-recap {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.cp-recap td {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.cp-recap td:last-child {
  text-align: right;
  white-space: nowrap;
}

.cp-big {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand);
}

@media (max-width: 560px) {
  .cp-product {
    grid-template-columns: 1fr;
  }

  .cp-photo,
  .cp-gallery {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-height: 260px;
  }
}
