/*
 * Analyseur d'export Vinted — styles scopés (.vc-an*).
 * 100% client : aucune donnée n'est envoyée au serveur.
 * Palette de marque VintedCRM : teal #007782.
 */

.vc-an {
  --vc-teal: #007782;
  --vc-teal-dark: #005d66;
  --vc-teal-soft: #e0f7f9;
  --vc-green: #15803d;
  --vc-amber: #b45309;
  --vc-red: #b91c1c;
  --vc-ink: #1f2937;
  --vc-muted: #6b7280;
  --vc-border: #e5e7eb;
  --vc-bg: #f9fafb;

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

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

/* ---- Zone d'upload ---- */
.vc-an__drop {
  border: 2px dashed #b3ebee;
  background: var(--vc-teal-soft);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.vc-an__drop:hover,
.vc-an__drop.is-dragover {
  background: #d4f1f4;
  border-color: var(--vc-teal);
}
.vc-an__drop-icon {
  font-size: 2.5rem;
}
.vc-an__drop-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.6rem 0 0.3rem;
}
.vc-an__drop-sub {
  color: var(--vc-muted);
  font-size: 0.9rem;
  margin: 0;
}
.vc-an__drop input[type="file"] {
  display: none;
}
.vc-an__privacy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--vc-teal-dark);
  font-weight: 600;
}

.vc-an__demo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.4rem;
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 14px;
}
.vc-an__demo-row span {
  font-size: 0.95rem;
  color: var(--vc-ink);
  font-weight: 600;
}
.vc-an__demo-btn {
  background: var(--vc-teal);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 119, 130, 0.3);
  transition: background 0.15s ease, transform 0.1s ease;
}
.vc-an__demo-btn:hover {
  background: var(--vc-teal-dark);
  transform: translateY(-1px);
}
.vc-an__demo-btn:focus-visible {
  outline: 3px solid rgba(0, 119, 130, 0.35);
  outline-offset: 2px;
}

/* Mention "aperçu / extrait" au-dessus du tableau de performance */
.vc-an__extract {
  font-size: 0.85rem;
  color: var(--vc-amber);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  margin: 0 0 0.8rem;
  display: none;
}
.vc-an__extract.is-visible {
  display: inline-block;
}

/* ---- Guide 3 étapes ---- */
.vc-an__steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}
@media (min-width: 640px) {
  .vc-an__steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.vc-an__step {
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.9rem;
}
.vc-an__step b {
  display: block;
  color: var(--vc-teal);
  margin-bottom: 0.25rem;
}

/* ---- Loader ---- */
.vc-an__loader {
  display: none;
  text-align: center;
  padding: 2rem;
  color: var(--vc-muted);
}
.vc-an__loader.is-visible {
  display: block;
}
.vc-an__spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--vc-teal-soft);
  border-top-color: var(--vc-teal);
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  animation: vcAnSpin 0.8s linear infinite;
}
@keyframes vcAnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Erreur ---- */
.vc-an__error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--vc-red);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.vc-an__error.is-visible {
  display: block;
}

/* ---- Dashboard ---- */
.vc-an__dash {
  display: none;
}
.vc-an__dash.is-visible {
  display: block;
}
.vc-an__section {
  background: #fff;
  border: 1px solid var(--vc-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.vc-an__section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

/* ---- Metric cards ---- */
.vc-an__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .vc-an__cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
.vc-an__card {
  background: var(--vc-bg);
  border-radius: 12px;
  padding: 1rem;
}
.vc-an__card-label {
  font-size: 0.8rem;
  color: var(--vc-muted);
  margin: 0;
}
.vc-an__card-value {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0.2rem 0 0;
  color: var(--vc-teal-dark);
  font-variant-numeric: tabular-nums;
}

/* ---- Table ---- */
.vc-an__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.vc-an__filters select,
.vc-an__filters input {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--vc-border);
  border-radius: 8px;
  font-size: 0.85rem;
}
.vc-an__table-wrap {
  overflow-x: auto;
}
.vc-an__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}
.vc-an__table th,
.vc-an__table td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--vc-border);
}
.vc-an__table th {
  cursor: pointer;
  user-select: none;
  color: var(--vc-muted);
  font-weight: 600;
}
.vc-an__table th:hover {
  color: var(--vc-teal);
}
.vc-an__toggle {
  display: none;
  width: 100%;
  margin-top: 0.8rem;
  background: var(--vc-teal-soft);
  border: 1px solid #b3ebee;
  color: var(--vc-teal-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
}
.vc-an__toggle:hover {
  background: #d4f1f4;
}
.vc-an__badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.vc-an__badge--vendu {
  background: #f0fdf4;
  color: var(--vc-green);
}
.vc-an__badge--actif {
  background: var(--vc-teal-soft);
  color: var(--vc-teal-dark);
}
.vc-an__badge--supprime {
  background: #f3f4f6;
  color: var(--vc-muted);
}

/* ---- Chart ---- */
.vc-an__chart-wrap {
  position: relative;
  height: 320px;
}

/* ---- Score de dressing (jauge), intégré à la Vue d'ensemble ---- */
.vc-an__score-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vc-border);
}
.vc-an__subhead {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}
.vc-an__score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.vc-an__gauge {
  --val: 0;
  --col: var(--vc-teal);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--col) calc(var(--val) * 1%), #eef0f2 0);
  display: grid;
  place-items: center;
}
.vc-an__gauge-inner {
  width: 104px;
  height: 104px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
}
.vc-an__gauge-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.vc-an__gauge-max {
  font-size: 0.75rem;
  color: var(--vc-muted);
}
.vc-an__score-detail {
  flex: 1;
  min-width: 220px;
}
.vc-an__score-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--vc-border);
}
.vc-an__reco {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.88rem;
}
.vc-an__reco ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.vc-an__mt {
  margin-top: 0.6rem;
}
.vc-an__pseudo {
  margin-bottom: 1rem;
}
.vc-an__pseudo-detected {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--vc-ink);
  background: var(--vc-bg);
  border: 1px solid var(--vc-border);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  margin: 0;
}
.vc-an__pseudo-detected.is-visible {
  display: inline-flex;
}
.vc-an__pseudo-ask {
  display: none;
}
.vc-an__pseudo-ask.is-visible {
  display: block;
}
.vc-an__pseudo-input {
  width: 100%;
  max-width: 320px;
  margin: 0.3rem 0 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--vc-border);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ---- Alerte seuil fiscal ---- */
.vc-an__alert {
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--vc-red);
}
