/*
 * Simulateur de planning Vinted — styles scopés (.vc-pl*).
 * Palette de marque VintedCRM : teal #007782.
 */

.vc-pl {
  --vc-teal: #007782;
  --vc-teal-dark: #005d66;
  --vc-teal-soft: #e0f7f9;
  --vc-ink: #1f2937;
  --vc-muted: #6b7280;
  --vc-border: #e5e7eb;
  --vc-bg: #f9fafb;

  max-width: 64rem;
  margin: 0 auto 3rem;
  color: var(--vc-ink);
}

.vc-pl *,
.vc-pl *::before,
.vc-pl *::after {
  box-sizing: border-box;
}

.vc-pl__card {
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.vc-pl__card h2,
.vc-pl__card h3 {
  margin-top: 0;
}

.vc-pl__source {
  display: inline-block;
  background: var(--vc-teal-soft);
  border: 1px solid #b3ebee;
  color: var(--vc-teal-dark);
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  margin: 0.4rem 0 0.6rem;
}

/* ---- Heatmap ---- */
.vc-pl__heatmap-wrap {
  overflow-x: auto;
}
.vc-pl__heatmap {
  border-collapse: separate;
  border-spacing: 4px;
  min-width: 540px;
  width: 100%;
  table-layout: fixed;
}
/* Colonne des heures étroite ; les 7 jours se partagent le reste à parts égales. */
.vc-pl__heatmap th:first-child,
.vc-pl__rowlabel {
  width: 58px;
}
.vc-pl__heatmap th {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vc-muted);
  padding: 2px;
}
.vc-pl__heatmap td {
  text-align: center;
  border-radius: 6px;
  height: 38px;
  font-size: 0.7rem;
  color: #fff;
  cursor: default;
  position: relative;
}
.vc-pl__heatmap .vc-pl__rowlabel {
  color: var(--vc-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: right;
  padding-right: 6px;
  white-space: nowrap;
}
.vc-pl__cell[data-score="0"] { background: #f3f4f6; color: #9ca3af; }
.vc-pl__cell[data-score="1"] { background: #cdeef0; color: #155e63; }
.vc-pl__cell[data-score="2"] { background: #8ddbe0; color: #114e52; }
.vc-pl__cell[data-score="3"] { background: #4dc7ce; }
.vc-pl__cell[data-score="4"] { background: #1a9aa3; }
.vc-pl__cell[data-score="5"] { background: #007782; }

.vc-pl__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--vc-muted);
}
.vc-pl__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.vc-pl__swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.vc-pl__swatch--5 { background: #007782; }
.vc-pl__swatch--4 { background: #1a9aa3; }
.vc-pl__swatch--3 { background: #4dc7ce; }
.vc-pl__swatch--2 { background: #8ddbe0; }
.vc-pl__swatch--1 { background: #cdeef0; }

/* ---- Formulaire planning ---- */
.vc-pl__form {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .vc-pl__form {
    grid-template-columns: 1fr 1fr;
  }
}
.vc-pl__field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}
.vc-pl__field input[type="number"],
.vc-pl__field select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--vc-border);
  border-radius: 10px;
  font-size: 1rem;
}
.vc-pl__field > label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Aides */
.vc-pl__help {
  font-size: 0.92rem;
  color: var(--vc-muted);
  margin: 0.3rem 0 1.4rem;
}
.vc-pl__field-help {
  font-size: 0.8rem;
  color: var(--vc-muted);
  margin: 0 0 0.6rem;
}
.vc-pl__hint-tip {
  font-size: 0.8rem;
  color: var(--vc-teal);
  cursor: help;
}

/* Slider teal + valeur en badge */
.vc-pl__slider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.vc-pl__field input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--vc-teal-soft);
  outline: none;
  padding: 0;
}
.vc-pl__field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vc-teal);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.vc-pl__field input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--vc-teal);
  cursor: pointer;
}
.vc-pl__range-val {
  flex-shrink: 0;
  min-width: 2.4rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: var(--vc-teal);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
}
.vc-pl__bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--vc-muted);
  margin-top: 0.35rem;
}
.vc-pl__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.vc-pl__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--vc-border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.vc-pl__chip input {
  accent-color: var(--vc-teal);
}

/* ---- Planning généré ---- */
.vc-pl__plan {
  display: none;
  margin-top: 1.5rem;
}
.vc-pl__plan.is-visible {
  display: block;
}
.vc-pl__day {
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
}
.vc-pl__day-name {
  font-weight: 700;
  color: var(--vc-teal-dark);
  margin: 0 0 0.4rem;
}
.vc-pl__action {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.92rem;
  padding: 0.2rem 0;
}
.vc-pl__action time {
  font-weight: 700;
  min-width: 56px;
  color: var(--vc-ink);
}
.vc-pl__tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.vc-pl__tag--new {
  background: var(--vc-teal-soft);
  color: var(--vc-teal-dark);
}
.vc-pl__tag--relist {
  background: #fef9c3;
  color: #854d0e;
}
.vc-pl__empty {
  color: var(--vc-muted);
  font-size: 0.88rem;
}

/* ---- Tips ---- */
.vc-pl__tip {
  background: var(--vc-teal-soft);
  border: 1px solid #b3ebee;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--vc-teal-dark);
}
