/* ===========================
   Veille concurrentielle
   =========================== */

/* --- Formulaire --- */
.vc-search-form {
  display: flex;
  flex-direction: column;
  gap: 24px; /* au lieu de 12px, plus de marge entre les champs */
  margin-bottom: 20px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
}


.vc-search-form label {
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.vc-search-form input,
.vc-search-form select {
  width: 100%;
  padding: 8px;
  border: 1px solid #00a2c6;   /* bleu turquoise comme le bouton */
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.vc-search-form input:focus,
.vc-search-form select:focus {
  outline: none;
  border-color: #008bb0;       /* bleu plus foncé au focus */
  box-shadow: 0 0 4px rgba(0,162,198,0.5);
}

.vc-search-form button {
  width: 100%;
  padding: 8px;
  border: 1px solid #00a2c6;   /* même bleu pour cohérence */
  border-radius: 4px;
  font-size: 14px;
  background: #00a2c6;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}
.vc-search-form button:hover {
  background: #008bb0;
  border-color: #008bb0;
}


.vc-search-form button {
  background: #00a2c6;       /* bouton turquoise */
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}
.vc-search-form button:hover {
  background: #008bb0;
}

/* Dates côte à côte sur desktop */
.vc-search-form .vc-dates {
  display: flex;
  gap: 12px;
}
.vc-search-form .vc-dates div {
  flex: 1;
}

/* Responsive : dates sur une ligne, puis sites, puis catégories, puis bouton */
@media (max-width: 768px) {
  .vc-search-form {
    gap: 16px;
  }
  .vc-search-form .vc-dates {
    flex-direction: row;
  }
  .vc-search-form .vc-dates div {
    flex: 1;
  }
}

/* --- Loader --- */
.vc-loader {
  display: none; /* masqué par défaut */
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  font-weight: bold;
  color: #004080;
}

.vc-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #ddd;
  border-top: 3px solid #00a2c6;
  border-radius: 50%;
  animation: vc-spin 1s linear infinite;
}

@keyframes vc-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Chart --- */
.vc-chart-container {
  margin: 20px 0;
  background: #fafafa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* --- Tableau comparatif --- */
.vc-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 400px; /* scroll vertical si trop de lignes */
  border: 1px solid #ddd;
  margin-top: 20px;
}

.vc-comparatif {
  border-collapse: collapse;
  width: 100%;
  min-width: 800px; /* force scroll horizontal si écran étroit */
}

.vc-comparatif th,
.vc-comparatif td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.vc-comparatif th {
  background: #00a2c6;
  color: white;
  position: sticky;
  top: 0; /* header fixe */
  z-index: 2;
}

/* Colonne Sites fixe */
.vc-comparatif th:first-child,
.vc-comparatif td:first-child {
  position: sticky;
  left: 0;
  background: #004080;
  color: white;
  z-index: 3;
}

/* Hover sur lignes */
.vc-comparatif tbody tr:hover {
  background: #f0f8ff;
}

/* Modele colonne : wrap texte */
.vc-comparatif td.vc-modele {
  white-space: normal;
  word-wrap: break-word;
}
.vc-select-wrapper {
  position: relative;   /* repère pour l'absolu */
  width: 100%;
}

.vc-select-wrapper select {
  width: 100%;
}

.vc-uncheck-container {
  position: absolute;
  top: -26px;   /* recule un peu plus haut pour ne pas chevaucher le select */
  right: 0;
  z-index: 10;
}

.vc-uncheck-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  color: #004080;
  background: #fff;
  padding: 2px 4px;
  border-radius: 4px;
}

/* Agrandir Prix total */
.vc-comparatif th:nth-child(5),
.vc-comparatif td:nth-child(5) {
  width: 120px; /* plus large */
}

/* Réduire Modèle */
.vc-comparatif th:nth-child(4),
.vc-comparatif td:nth-child(4) {
  width: 180px; /* plus étroit qu'avant */
  max-width: 180px;
}
