/* Address Fields */
.address-input-group {
  margin-bottom: 15px;
}
/* Styles pour mettre en évidence l'option cargo sélectionnée */

.cargo-option {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffffff;
  min-height: 140px;
}

/* Style par défaut au survol */
.cargo-option:hover {
  border-color: #28a745;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
  transform: translateY(-2px);
}

/* ✅ NOUVEAU: Style pour l'option sélectionnée */
.cargo-option:has(input[type="radio"]:checked) {
  background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
  border-color: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
  transform: translateY(-1px);
}

/* Alternative pour les navigateurs qui ne supportent pas :has() */
.cargo-option.selected {
  background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
  border-color: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
  transform: translateY(-1px);
}

/* Icône de confirmation pour l'option sélectionnée */
.cargo-option:has(input[type="radio"]:checked)::before,
.cargo-option.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 15px;
  width: 24px;
  height: 24px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  animation: checkmarkAppear 0.3s ease-out;
}

/* Animation pour l'apparition de la coche */
@keyframes checkmarkAppear {
  0% {
      opacity: 0;
      transform: scale(0.5);
  }
  100% {
      opacity: 1;
      transform: scale(1);
  }
}

/* Style pour le titre de l'option sélectionnée */
.cargo-option:has(input[type="radio"]:checked) .cargo-title,
.cargo-option.selected .cargo-title {
  color: #155724;
  font-weight: 600;
}

/* Style pour la description de l'option sélectionnée */
.cargo-option:has(input[type="radio"]:checked) .cargo-description,
.cargo-option.selected .cargo-description {
  color: #155724;
}

/* Masquer le radio button par défaut */
.cargo-option input[type="radio"] {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

/* Style pour le titre */
.cargo-title {
  font-size: 18px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

/* Style pour la description */
.cargo-description {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* Amélioration de la mise en page des options cargo */
.cargo-type-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* Style responsive pour mobile */
@media (max-width: 768px) {
  .cargo-type-options {
      grid-template-columns: 1fr;
      gap: 15px;
  }
  
  .cargo-option {
      padding: 15px;
      min-height: 120px;
  }
  
  .cargo-title {
      font-size: 16px;
  }
  
  .cargo-description {
      font-size: 13px;
  }
}

/* Effet de focus pour l'accessibilité */
.cargo-option:focus-within {
  outline: 2px solid #28a745;
  outline-offset: 2px;
}

/* Style pour les options non sélectionnées quand une est active */
.cargo-type-options:has(input[type="radio"]:checked) .cargo-option:not(:has(input[type="radio"]:checked)) {
  opacity: 0.8;
  transform: scale(0.98);
}

/* Animation de transition entre les sélections */
.cargo-option {
  will-change: transform, background, border-color;
}

/* Style pour améliorer la visibilité des listes à puces */
.cargo-description ul {
  margin: 8px 0;
  padding-left: 18px;
  list-style-type: none;
}

.cargo-description li {
  position: relative;
  margin: 4px 0;
  padding-left: 16px;
}

.cargo-description li::before {
  content: "•";
  color: #28a745;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* Style pour l'option sélectionnée avec effet de bordure animée */
.cargo-option:has(input[type="radio"]:checked)::after,
.cargo-option.selected::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #28a745, #20c997, #28a745);
  border-radius: 8px;
  z-index: -1;
  animation: borderGlow 2s ease-in-out infinite alternate;
}

/* Animation de la bordure pour l'option sélectionnée */
@keyframes borderGlow {
  0% {
      opacity: 0.6;
  }
  100% {
      opacity: 0.9;
  }
}

/* Amélioration de l'indicateur visuel pour les listes */
.cargo-option:has(input[type="radio"]:checked) .cargo-description li::before,
.cargo-option.selected .cargo-description li::before {
  color: #155724;
  transform: scale(1.1);
}
.address-input-container {
  display: flex;
  align-items: center;
  position: relative;
}

.address-input-container input {
  flex-grow: 1;
  padding-right: 40px;
}

.address-input-button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.address-input-button:hover {
  background-color: var(--primary-hover);
}

.address-format-hint {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Map Mode Switcher */
.map-mode-switcher {
  display: flex;
  margin-bottom: 10px;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.map-mode-btn {
  flex: 1;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.map-mode-btn:not(:last-child) {
  border-right: 1px solid #e9ecef;
}

.map-mode-btn:hover {
  background-color: #e9ecef;
}

.map-mode-btn.active {
  background-color: var(--primary-color);
  color: white;
}

/* Main settings and variables */
:root {
  --primary-color: #2c9b48; /* Twowin Green */
  --primary-hover: #238a3b;
  --secondary-color: #1a5a2c; /* Dark Green */
  --secondary-hover: #144224;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #06d6a0;
  --error-color: #ef476f;
  --border-radius: 10px;
  --card-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;

  /* Added colors for price zones */
  --green-zone-color: #28a745;
  --blue-zone-color: #007bff;
  --red-zone-color: #dc3545;
  --orange-zone-color: #fd7e14;
}

/* Reset and basic styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f5f7fa;
  color: var(--dark-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Logo and Header */
header {
  text-align: center;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.logo-img {
  height: 60px;
  margin-right: 15px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.2rem;
  color: #6c757d;
}

/* Cards */
.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  border-top: 3px solid var(--primary-color);
}

.card-header {
  padding: 1.5rem;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  margin-right: 1rem;
}

.card-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
}

.card-body {
  padding: 2rem;
}

/* Cargo Types */
.cargo-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cargo-option {
  flex: 1;
  min-width: 250px;
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.cargo-option:hover {
  border-color: var(--primary-color);
  background-color: #f8f9fa;
}

.cargo-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cargo-option input[type="radio"]:checked + .cargo-title {
  color: var(--primary-color);
  font-weight: 600;
}

.cargo-option input[type="radio"]:checked ~ .cargo-description {
  color: var(--dark-color);
}

.cargo-option input[type="radio"]:checked {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.cargo-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.cargo-description {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--secondary-color);
}

.range-container {
  position: relative;
  padding-bottom: 2rem;
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 5px;
  background: #e9ecef;
  outline: none;
  margin-bottom: 1rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

.range-value {
  position: absolute;
  right: 0;
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 500;
}

/* Manual Input */
.manual-input {
  margin-top: 1rem;
}

.manual-input label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #6c757d;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid #ced4da;
  font-size: 1rem;
  transition: var(--transition);
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 155, 72, 0.1);
}

.manual-price-container {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e9ecef;
}

/* Map */
.map-container {
  height: 400px; /* Adjust height as needed */
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
  overflow: hidden; /* Ensure iframe respects border-radius */
}

 .map-container iframe {
     width: 100%;
     height: 100%;
     border: none;
 }

#map, #volumeMap {
  height: 100% !important;
  border-radius: var(--border-radius);
  width: 100% !important;
}
.leaflet-container {
  height: 100% !important;
  min-height: 400px !important; /* Ensure minimum height */
}
.map-info {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.map-info p {
  margin-bottom: 0.5rem;
}

.map-info span {
  font-weight: 500;
  color: var(--secondary-color);
}

/* Styles for map tooltip */
.map-tooltip {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 3px;
  z-index: 1000;
}


.map-tooltip::before {
  display: none;
}

/* Styles for map search */
.leaflet-control-geosearch {
  width: 100%;
  max-width: 400px;
}

.leaflet-control-geosearch form {
  border-radius: var(--border-radius);
  overflow: hidden;
  width: 100%;
}

.leaflet-control-geosearch input {
  padding: 10px 15px;
  font-size: 16px;
  width: 100%;
  min-width: 300px;
  height: 40px;
}

.leaflet-routing-container {
  max-height: 200px;
  overflow-y: auto;
  width: 250px !important;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 10px;
  box-shadow: var(--card-shadow);
}

/* Styles pour la barre de recherche de carte */
.search-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 999;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    cursor: pointer;
}

.search-button:hover {
    background-color: var(--primary-hover);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Mise à jour du style map-container pour supporterla position relative */
.map-container {
    position: relative;
}
/* Styles pour la barre de recherche au-dessus de l'iframe */
.map-container {
  position: relative;
}

.map-search-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  max-width: 400px;
}

.search-input-group {
  display: flex;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

.search-button {
  padding: 0 15px;
  background-color: #2c9b48;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background-color: #238a3b;
}

.search-results {
  margin-top: 5px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}
/* Styles pour la barre de recherche au-dessus de l'iframe */
.map-search-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  max-width: 400px;
}

.search-input-group {
  display: flex;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

.search-button {
  padding: 0 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background-color: var(--primary-hover);
}

.search-results {
  margin-top: 5px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.zone-result {
  margin-top: 5px;
  padding: 10px 15px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: none;
}

.zone-result.zone-1 {
  background-color: rgba(40, 167, 69, 0.1);
  border-left: 4px solid #28a745;
}

/* Styles pour la barre de recherche au-dessus de l'iframe */
.map-container {
  position: relative;
}

.map-search-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  max-width: 400px;
}

.search-input-group {
  display: flex;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

.search-button {
  padding: 0 15px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button:hover {
  background-color: var(--primary-hover);
}

.search-results {
  margin-top: 5px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.zone-result {
  margin-top: 5px;
  padding: 10px 15px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: none;
}

.zone-price {
  font-size: 1.2em;
  font-weight: 600;
  margin-top: 5px;
}

.zone-result.zone-1 {
  background-color: rgba(40, 167, 69, 0.1);
  border-left: 4px solid #28a745;
}

.zone-result.zone-2 {
  background-color: rgba(0, 123, 255, 0.1);
  border-left: 4px solid #007bff;
}

.zone-result.zone-3 {
  background-color: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
}

.zone-result.zone-4 {
  background-color: rgba(253, 126, 20, 0.1);
  border-left: 4px solid #fd7e14;
}

.zone-result.zone-outside {
  background-color: rgba(108, 117, 125, 0.1);
  border-left: 4px solid #6c757d;
}

.zone-result.zone-2 {
  background-color: rgba(0, 123, 255, 0.1);
  border-left: 4px solid #007bff;
}

.zone-result.zone-3 {
  background-color: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
}

.zone-result.zone-4 {
  background-color: rgba(253, 126, 20, 0.1);
  border-left: 4px solid #fd7e14;
}

.zone-result.zone-outside {
  background-color: rgba(108, 117, 125, 0.1);
  border-left: 4px solid #6c757d;
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}


/* Checkboxes */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
}

.checkbox-container.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #e9ecef;
  border-radius: 4px;
  transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container.disabled:hover input ~ .checkmark {
  background-color: #e9ecef;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 8px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Radio Buttons */
.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.radio-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1rem;
  user-select: none;
  flex: 1;
  min-width: 150px;
}

.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.radio-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #e9ecef;
  border-radius: 50%;
  transition: var(--transition);
}

.radio-container:hover input ~ .radio-checkmark {
  background-color: #ccc;
}

.radio-container input:checked ~ .radio-checkmark {
  background-color: var(--primary-color);
}

.radio-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.radio-container input:checked ~ .radio-checkmark:after {
  display: block;
}

.radio-container .radio-checkmark:after {
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

  /* In-City Price Zone Specific Styles */
  .price-zone-options {
      margin-top: 10px;
  }

  .price-zone-options .radio-container {
      min-width: 180px; /* Adjust as needed */
  }

   .price-zone-options .radio-container .radio-checkmark {
       background-color: #e9ecef; /* Default checkmark background */
   }

  .price-zone-options .radio-container input:checked ~ .radio-checkmark {
     background-color: var(--primary-color); /* Default checked color */
  }

  /* Specific zone colors for checkmark */
  .price-zone-options .green-zone input:checked ~ .radio-checkmark {
      background-color: var(--green-zone-color);
  }

  .price-zone-options .blue-zone input:checked ~ .radio-checkmark {
      background-color: var(--blue-zone-color);
  }

  .price-zone-options .red-zone input:checked ~ .radio-checkmark {
      background-color: var(--red-zone-color);
  }

  .price-zone-options .orange-zone input:checked ~ .radio-checkmark {
      background-color: var(--orange-zone-color);
  }


/* Result */
.result-container {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.result-header {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.result-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.result-price.highlight {
  animation: highlight-animation 1s ease;
}

@keyframes highlight-animation {
  0% {
    transform: scale(1);
    color: var(--primary-color);
  }
  50% {
    transform: scale(1.1);
    color: var(--secondary-color);
  }
  100% {
    transform: scale(1);
    color: var(--primary-color);
  }
}
/* Styles améliorés pour les champs éditables dans la liste des produits */
.editable-field {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s, background-color 0.2s;
}

.editable-field:focus {
  outline: none;
  border-color: #007bff;
  background-color: #f8f9ff;
}

.editable-field:hover:not(:focus):not([readonly]) {
  border-color: #999;
}

.editable-name {
  min-width: 200px;
}

.dimensions-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.dimensions-inputs span {
  color: #666;
  font-weight: 500;
  font-size: 16px;
}

.editable-dimension {
  width: 80px;
  text-align: center;
  font-size: 14px;
}

.editable-volume {
  width: 100px;
  text-align: center;
  background-color: #f5f5f5;
  cursor: not-allowed;
  font-size: 14px;
}

.editable-weight {
  width: 90px;
  text-align: center;
  font-size: 14px;
}

.editable-quantity {
  width: 80px;
  text-align: center;
  font-size: 14px;
}

/* Ajuster la grille du tableau pour plus d'espace */
.product-list-item {
  display: grid;
  grid-template-columns: 2.5fr 3fr 1.2fr 1.2fr 1fr 60px;
  gap: 15px;
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.product-list-item:hover {
  background-color: #f8f9fa;
}

/* En-têtes du tableau */
.product-list-header {
  display: grid;
  grid-template-columns: 2.5fr 3fr 1.2fr 1.2fr 1fr 60px;
  gap: 15px;
  padding: 12px 10px;
  background: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
}

.product-list-header > div {
  text-align: center;
}

.product-list-header > div:first-child {
  text-align: left;
}

/* Input number : améliorer les flèches */
.editable-field::-webkit-inner-spin-button,
.editable-field::-webkit-outer-spin-button {
  opacity: 0.7;
  height: 28px;
}

.editable-field:hover::-webkit-inner-spin-button,
.editable-field:hover::-webkit-outer-spin-button {
  opacity: 1;
}

/* Icône de suppression */
.delete-product {
  cursor: pointer;
  color: #dc3545;
  font-size: 18px;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.delete-product:hover {
  background-color: #fee;
  color: #c82333;
}

/* Container de la liste de produits */
.product-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
}

/* Responsive design pour les petits écrans */
@media (max-width: 1200px) {
  .product-list-item,
  .product-list-header {
      grid-template-columns: 2fr 2.5fr 1fr 1fr 0.8fr 50px;
      gap: 10px;
  }
  
  .editable-dimension {
      width: 70px;
  }
  
  .editable-volume,
  .editable-weight {
      width: 80px;
  }
  
  .editable-quantity {
      width: 70px;
  }
}

@media (max-width: 768px) {
  .product-list-item,
  .product-list-header {
      grid-template-columns: 1.5fr 2fr 0.8fr 0.8fr 0.6fr 40px;
      gap: 8px;
      font-size: 12px;
  }
  
  .editable-field {
      padding: 4px 6px;
      font-size: 12px;
  }
  
  .editable-dimension {
      width: 60px;
  }
  
  .editable-volume,
  .editable-weight {
      width: 70px;
  }
  
  .editable-quantity {
      width: 60px;
  }
}

.result-details {
  color: #6c757d;
}
/* Modification du conteneur principal pour utiliser toute la largeur */
.container {
  max-width: 1600px; /* Augmenté de 1200px à 1600px */
  margin: 0 auto;
  padding: 2rem 3rem; /* Augmenté le padding horizontal */
  width: 100%; /* S'assurer qu'il prend toute la largeur disponible */
}

/* Optimisation du tableau des produits pour utiliser plus d'espace */
.product-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  width: 100%; /* Forcer la largeur à 100% */
}

/* Ajuster les colonnes pour mieux utiliser l'espace */
.product-list-header {
  display: grid;
  grid-template-columns: 3fr 3.5fr 1.3fr 1.3fr 1.2fr 80px; /* Proportions optimisées */
  gap: 20px; /* Augmenté l'espace entre colonnes */
  padding: 15px 20px; /* Augmenté le padding */
  background: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  font-size: 15px; /* Légèrement plus grand */
}

.product-list-item {
  display: grid;
  grid-template-columns: 3fr 3.5fr 1.3fr 1.3fr 1.2fr 80px; /* Mêmes proportions */
  gap: 20px; /* Augmenté l'espace entre colonnes */
  padding: 15px 20px; /* Augmenté le padding */
  border-bottom: 1px solid #eee;
  align-items: center;
}

/* Augmenter la taille des champs éditables */
.editable-field {
  width: 100%;
  padding: 8px 12px; /* Augmenté le padding */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px; /* Augmenté la taille de police */
  background: white;
  transition: border-color 0.2s, background-color 0.2s;
}

.editable-name {
  min-width: 250px; /* Augmenté */
}

.editable-dimension {
  width: 95px; /* Augmenté */
  text-align: center;
  font-size: 15px;
}

.editable-volume {
  width: 110px; /* Augmenté */
  text-align: center;
  background-color: #f5f5f5;
  cursor: not-allowed;
  font-size: 15px;
}

.editable-weight {
  width: 100px; /* Augmenté */
  text-align: center;
  font-size: 15px;
}

.editable-quantity {
  width: 90px; /* Augmenté */
  text-align: center;
  font-size: 15px;
}

/* Icône de suppression plus grande */
.delete-product {
  cursor: pointer;
  color: #dc3545;
  font-size: 20px; /* Augmenté */
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

/* Optimisation pour les très grands écrans */
@media (min-width: 1600px) {
  .container {
    max-width: 1800px;
    padding: 2rem 4rem;
  }
  
  .product-list-header,
  .product-list-item {
    grid-template-columns: 3.5fr 4fr 1.4fr 1.4fr 1.3fr 90px;
    gap: 25px;
    padding: 18px 25px;
  }
}

/* Ajustements pour grands écrans */
@media (min-width: 1400px) and (max-width: 1599px) {
  .container {
    max-width: 1500px;
    padding: 2rem 3.5rem;
  }
}

/* Responsive design amélioré */
@media (max-width: 1200px) {
  .container {
    padding: 2rem;
  }
  
  .product-list-item,
  .product-list-header {
    grid-template-columns: 2.5fr 3fr 1.2fr 1.2fr 1fr 70px;
    gap: 15px;
    padding: 12px 15px;
  }
  
  .editable-dimension {
    width: 80px;
  }
  
  .editable-volume,
  .editable-weight {
    width: 90px;
  }
  
  .editable-quantity {
    width: 75px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .product-list-item,
  .product-list-header {
    grid-template-columns: 1.8fr 2.2fr 0.9fr 0.9fr 0.7fr 50px;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .editable-field {
    padding: 5px 8px;
    font-size: 13px;
  }
  
  .editable-dimension {
    width: 65px;
  }
  
  .editable-volume,
  .editable-weight {
    width: 75px;
  }
  
  .editable-quantity {
    width: 65px;
  }
  
  .delete-product {
    font-size: 16px;
    padding: 6px;
  }
}

/* Amélioration du card-body pour plus d'espace */
.card-body {
  padding: 2.5rem; /* Augmenté de 2rem à 2.5rem */
}

/* Optimisation du résumé des produits */
.product-summary {
  margin-top: 25px;
  background-color: #f8f9fa;
  padding: 20px 25px; /* Augmenté le padding */
  border-radius: var(--border-radius);
  border: 1px solid #e9ecef;
}

.product-summary p {
  margin-bottom: 8px;
  font-size: 15px; /* Augmenté la taille de police */
}

/* Amélioration des dimensions inputs groupés */
.dimensions-inputs {
  display: flex;
  align-items: center;
  gap: 8px; /* Augmenté l'espace */
  justify-content: center;
}

.dimensions-inputs span {
  color: #666;
  font-weight: 500;
  font-size: 17px; /* Augmenté */
}

/* Buttons */
.button-container {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.primary-button, .secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.primary-button {
  background-color: var(--primary-color);
  color: white;
}

.primary-button:hover {
  background-color: var(--primary-hover);
}

.secondary-button {
  background-color: white;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.secondary-button:hover {
  background-color: var(--secondary-color);
  color: white;
}

.button-icon {
  margin-right: 0.5rem;
}

/* Helper Classes */
.hidden {
  display: none !important;
}

.mt-15 {
  margin-top: 15px;
}

.mb-15 {
  margin-bottom: 15px;
}

/* Tables */
.price-tables {
  margin-top: 3rem;
}

.price-tables h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.price-tables h4 {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.price-tables p {
  margin-bottom: 1rem;
}

.new-list {
  list-style-position: inside;
  margin: 1rem 0;
  padding-left: 1rem;
}

.new-list li {
  margin-bottom: 0.5rem;
  position: relative;
}

.new-list li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.new-table-container {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.new-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.new-table th,
.new-table td {
  padding: 0.75rem;
  border: 1px solid #e9ecef;
}

.new-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--secondary-color);
  text-align: left;
}

.new-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.new-table tr:hover {
  background-color: #e8f5eb;
}

/* Messages */
.success-message {
  color: var(--primary-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-message {
  color: var(--error-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
  font-size: 0.9rem;
}

.company-info {
  color: var(--primary-color);
  font-weight: 500;
}

  /* New styles for product handling */
  .product-list {
      margin-top: 20px;
      border: 1px solid #e9ecef;
      border-radius: var(--border-radius);
      overflow: hidden;
  }

  .product-list-header {
      display: grid;
      grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr 60px; /* Adjusted columns */
      background-color: #f8f9fa;
      padding: 10px;
      font-weight: 600;
      border-bottom: 1px solid #e9ecef;
       gap: 10px; /* Added gap */
  }

  .product-list-item {
      display: grid;
      grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr 60px; /* Adjusted columns */
      padding: 10px;
      border-bottom: 1px solid #e9ecef;
      align-items: center;
       gap: 10px; /* Added gap */
  }

  .product-list-item:last-child {
      border-bottom: none;
  }

  .product-list-item:nth-child(even) {
      background-color: #f8f9fa;
  }

  .delete-product {
      color: var(--error-color);
      cursor: pointer;
      text-align: center;
  }

  .product-form {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive columns */
      gap: 10px;
      margin-bottom: 15px;
  }

  .add-product-btn {
      background-color: var(--primary-color);
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: var(--border-radius);
      cursor: pointer;
      font-weight: 500;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 5px;
  }

  .add-product-btn:hover {
      background-color: var(--primary-hover);
  }

  .product-summary {
      margin-top: 20px;
      background-color: #f8f9fa;
      padding: 15px;
      border-radius: var(--border-radius);
      border: 1px solid #e9ecef; /* Added border */
  }

  .product-summary h4 {
      margin-top: 0; /* Adjusted margin */
      margin-bottom: 10px; /* Adjusted margin */
  }

  .product-summary p {
      margin-bottom: 5px;
  }

  .product-summary strong {
      color: var(--secondary-color);
  }
  /* Styles pour l'input de quantité éditable */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.quantity-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 3px;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.quantity-btn:hover {
  background: #0056b3;
}

.quantity-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Styles pour l'animation du véhicule recommandé */
#tonnageRecommendedVehicle,
#volumeRecommendedVehicle {
    transition: all 0.3s ease;
    display: inline-block;
}

/* Animation pour les changements de véhicule recommandé */
.vehicle-updated {
    background: #fff3cd !important;
    color: #856404 !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Style pour les notifications de changement de véhicule */
.notification.vehicle-change {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Highlighting pour les valeurs qui ont changé */
.value-changed {
    animation: valueHighlight 0.8s ease-in-out;
}

@keyframes valueHighlight {
    0% {
        background-color: #fff3cd;
        transform: scale(1);
    }
    50% {
        background-color: #ffeaa7;
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Style pour mettre en évidence les totaux recalculés */
.product-summary p strong {
    transition: all 0.2s ease;
}

.product-summary p strong.updated {
    color: #007bff;
    font-weight: bold;
}

/* Amélioration visuelle pour le bouton Рассчитать */
#calculateBtn {
    position: relative;
    overflow: hidden;
}

#calculateBtn.calculating {
    background: #6c757d;
    cursor: wait;
}

#calculateBtn.calculating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: calculating 1s infinite;
}

@keyframes calculating {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Style pour les messages d'erreur de calcul */
.calculation-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
}

.calculation-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
}

/* Nouveau style pour l'input de quantité */
.quantity-input {
  width: 50px;
  height: 25px;
  text-align: center;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  padding: 2px 4px;
  margin: 0 2px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quantity-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.quantity-input:hover {
  border-color: #007bff;
}

/* Style pour les inputs invalides */
.quantity-input:invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* Masquer les flèches des inputs number dans Chrome/Safari */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Masquer les flèches des inputs number dans Firefox */
.quantity-input[type=number] {
  -moz-appearance: textfield;
}

/* Responsive design pour les petits écrans */
@media (max-width: 768px) {
  .quantity-controls {
      gap: 3px;
  }
  
  .quantity-input {
      width: 40px;
      font-size: 12px;
  }
  
  .quantity-btn {
      width: 22px;
      height: 22px;
      font-size: 12px;
  }
}

/* Animation pour les changements de quantité */
.quantity-input.quantity-updated {
  animation: quantityHighlight 0.5s ease-in-out;
}

@keyframes quantityHighlight {
  0% {
      background-color: #d4edda;
      border-color: #28a745;
  }
  100% {
      background-color: white;
      border-color: #ced4da;
  }
}

/* Style pour les contrôles de quantité dans le header de la liste */
.product-list-header .quantity-controls {
  justify-content: center;
  font-weight: bold;
  color: #495057;
}

/* Amélioration de l'accessibilité */
.quantity-input:focus {
  /* Améliorer la visibilité pour les utilisateurs utilisant le clavier */
  z-index: 1;
  position: relative;
}

/* Style pour les notifications de quantité */
.notification.quantity-update {
  font-size: 13px;
  padding: 8px 12px;
}

  /* Styles for compatibility alert */
  .compatibility-alert {
      background-color: #fff3cd;
      color: #856404;
      padding: 15px;
      border-radius: var(--border-radius);
      margin-top: 15px;
      border-left: 4px solid #ffeeba;
      display: none; /* Hidden by default */
      align-items: center;
      gap: 10px;
  }

   /* Styles for in-city options and map */
  .in-city-options {
      /* Styles for the container */
       margin-top: 15px;
       padding-top: 15px;
       border-top: 1px dashed #e9ecef;
  }

  .in-city-options .map-container {
      margin-top: 20px;
      height: 400px; /* Adjust height as needed */
  }


  /* Responsiveness */
  @media (max-width: 768px) {
      .container {
          padding: 1rem;
      }

      h1 {
          font-size: 2rem;
      }

      .card-header, .card-body {
          padding: 1.25rem;
      }

      .button-container {
          flex-direction: column;
      }

      .primary-button, .secondary-button {
          width: 100%;
      }

      .logo-img {
          height: 40px;
      }

      .cargo-type-options {
          flex-direction: column;
      }

       .product-list-header, .product-list-item {
          grid-template-columns: 1fr 1fr 1fr 60px; /* Adjusted columns for smaller screens */
      }

      .hide-mobile {
          display: none;
      }

       .product-form {
          grid-template-columns: 1fr; /* Stack inputs on very small screens */
       }

       .map-container {
           height: 300px; /* Reduce map height on smaller screens */
       }

       .leaflet-container {
          min-height: 300px !important;
       }
  }

   @media (max-width: 500px) {
      .product-list-header, .product-list-item {
          grid-template-columns: 1fr 1fr 60px; /* Further adjusted columns for smaller screens */
      }
   }

/* ==========================================================================
   ADMIN — Bouton et modals d'édition des prix
   ========================================================================== */

.admin-prices-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.admin-prices-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(45deg);
}

.admin-modal[hidden] { display: none !important; }
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.admin-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
}
.admin-modal-small { max-width: 420px; }
.admin-modal-large { max-width: 900px; }

.admin-modal-header,
.admin-modal-footer {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.admin-modal-footer {
    border-bottom: none;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}
.admin-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}
.admin-modal-close {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
}
.admin-modal-close:hover { color: #000; }

.admin-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.admin-modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}
.admin-modal-body input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.admin-error {
    color: #c0392b;
    margin-top: 10px;
    font-size: 14px;
}

.admin-table-block {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px 16px;
    margin-bottom: 18px;
}
.admin-table-block legend {
    padding: 0 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}
.admin-row {
    display: grid;
    grid-template-columns: 1fr 2fr 32px;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.admin-row-header {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.admin-row-prices {
    display: flex;
    gap: 6px;
}
.admin-row-prices input,
.admin-vehicle-name {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}
.admin-row-prices input { text-align: right; }
.admin-row-delete {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.admin-row-delete:hover { background: #c0392b; }
.admin-add-row {
    margin-top: 8px;
    font-size: 13px;
    padding: 6px 12px;
}

/* Affichage prix séparés : client + chauffeur côte à côte */
.result-price {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: stretch;
}
.price-block {
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    border-radius: 8px;
    background: #f1f8f4;
    border: 1px solid #c7e6d2;
    min-width: 160px;
}
.price-block-driver {
    background: #fff4e6;
    border-color: #ffd9a8;
}
.price-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.price-value {
    font-size: 26px;
    font-weight: 700;
    color: #28a745;
    line-height: 1.1;
}
.price-block-driver .price-value {
    color: #e67e22;
}

@media (max-width: 480px) {
    .result-price { gap: 10px; }
    .price-block { min-width: 0; flex: 1 1 100%; }
    .price-value { font-size: 22px; }
}

/* Bloc de chargement de commande inline (1C + Excel) */
.order-load-block {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}
.order-load-title {
    margin: 0 0 16px;
    color: #495057;
    font-size: 18px;
}
.order-load-inline {
    max-width: 480px;
    margin: 0 auto;
    text-align: left;
}
.order-load-inline label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}
.order-load-row {
    display: flex;
    gap: 8px;
}
.order-load-row input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}
.order-load-row input:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
}
.order-load-row .btn {
    padding: 10px 18px;
    white-space: nowrap;
}
.order-load-or {
    margin: 14px 0 12px;
    color: #888;
    font-size: 14px;
    text-transform: lowercase;
}
.order-load-excel .btn {
    padding: 10px 18px;
}

@media (max-width: 480px) {
    .order-load-row {
        flex-direction: column;
    }
    .order-load-row .btn { width: 100%; }
}

/* Select override véhicule */
.vehicle-override-group {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}
.vehicle-override-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}
.vehicle-override-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
}
.vehicle-override-select:focus {
    outline: none;
    border-color: var(--primary-color, #28a745);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.15);
}

.admin-section-title {
    margin: 24px 0 12px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 6px;
    font-size: 16px;
}

.admin-vehicle-block {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 14px 14px;
    margin-bottom: 18px;
}
.admin-vehicle-block legend {
    padding: 0 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}
.admin-vehicle-row {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr 0.7fr 0.7fr 0.7fr 0.8fr 0.8fr 0.7fr 0.5fr 28px;
    gap: 4px;
    align-items: center;
    margin-bottom: 4px;
}
.admin-vehicle-header {
    font-weight: 600;
    color: #555;
    font-size: 12px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.admin-vehicle-row input {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}
.admin-vehicle-row input[type="number"] { text-align: right; }
.admin-add-vehicle {
    margin-top: 8px;
    font-size: 13px;
    padding: 6px 12px;
}

@media (max-width: 900px) {
    .admin-vehicle-row {
        grid-template-columns: 1fr 1fr;
    }
    .admin-vehicle-header { display: none; }
    .admin-vehicle-row input { font-size: 13px; }
}

@media (max-width: 600px) {
    .admin-row {
        grid-template-columns: 1fr 32px;
    }
    .admin-row-prices {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
}
/* ===== Recommandations côte à côte (standard + IA DeepSeek) ===== */
.recommendations-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.recommendation-box {
    flex: 1 1 260px;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.recommendation-box .recommendation-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.recommendation-box p {
    margin: 0 0 6px 0;
    font-size: 16px;
}

.recommendation-hint {
    color: #888;
    font-size: 12px;
}

.ai-recommendation {
    background: #f3f0ff;
    border-color: #b8a7f5;
}

.ai-recommendation .recommendation-title {
    color: #5a3fc0;
}

.btn-ai {
    font-size: 13px;
    padding: 5px 12px;
    margin-top: 2px;
    cursor: pointer;
}

.ai-details {
    margin-top: 8px;
    font-size: 13px;
    color: #444;
    border-top: 1px dashed #b8a7f5;
    padding-top: 8px;
}

.ai-details .ai-reasoning {
    margin: 0 0 6px 0;
}

.ai-details .ai-issues {
    margin: 6px 0 0 0;
    padding: 6px 8px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 3px;
}

.ai-details .ai-issues ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.ai-confidence {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.ai-confidence.high { background: #d4edda; color: #155724; }
.ai-confidence.medium { background: #fff3cd; color: #856404; }
.ai-confidence.low { background: #f8d7da; color: #721c24; }

/* ===== Feedback recommandations + popup statistiques ===== */
.recommendation-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

.feedback-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

.feedback-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feedback-btn {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 14px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-btn:hover { transform: translateY(-1px); }
.feedback-btn:disabled { opacity: 0.6; cursor: wait; }

.feedback-btn.fb-ok { border-color: #a3d9a5; }
.feedback-btn.fb-ok:hover { background: #e7f6e7; }
.feedback-btn.fb-bad { border-color: #f1b0b7; }
.feedback-btn.fb-bad:hover { background: #fdecea; }

.feedback-btn.fb-selected {
    box-shadow: 0 0 0 2px #5a3fc0 inset;
    font-weight: 600;
}

.feedback-btn.fb-stats {
    border-color: #b8a7f5;
    background: #f3f0ff;
    color: #5a3fc0;
    margin-left: auto;
}
.feedback-btn.fb-stats:hover { background: #e6dfff; }

/* Popup statistiques */
.stats-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.stats-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.stats-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.stats-modal-header h3 { margin: 0; font-size: 18px; }

.stats-modal-close {
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #888;
}
.stats-modal-close:hover { color: #000; }

.stats-modal-body { padding: 16px 18px; }

.stats-total { margin: 0 0 12px 0; }

.stats-accuracy-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.stats-accuracy-box {
    flex: 1 1 200px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fafafa;
}

.stats-accuracy-title { font-size: 13px; color: #666; margin-bottom: 4px; }
.stats-accuracy-value { font-size: 26px; font-weight: 700; margin-bottom: 6px; }

.stats-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.stats-bar-fill { height: 100%; border-radius: 4px; }
.stats-bar-fill.fill-1c { background: #4c8bf5; }
.stats-bar-fill.fill-ai { background: #7c5cd6; }

.stats-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.stats-count-chip {
    font-size: 12px;
    background: #f1f3f5;
    border-radius: 12px;
    padding: 3px 10px;
}

.stats-table-wrap { overflow-x: auto; }

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.stats-table th, .stats-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.stats-table th { color: #666; font-weight: 600; background: #fafafa; }

/* ===== Choix de la source pour le calcul (1С / ИИ) ===== */
.calc-source-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.calc-source-choice input[type="radio"] {
    accent-color: #5a3fc0;
    cursor: pointer;
}

.recommendation-box.selected-for-calc {
    border-width: 2px;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
    position: relative;
}

.recommendation-box.selected-for-calc .calc-source-choice {
    color: #28a745;
}

.recommendation-box.selected-for-calc::after {
    content: "✓ для расчёта";
    position: absolute;
    top: -10px;
    right: 10px;
    background: #28a745;
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
}

/* ===== Carte de recommandation entièrement cliquable ===== */
.recommendation-box {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.recommendation-box:hover:not(.selected-for-calc) {
    border-color: #999;
    transform: translateY(-1px);
}

/* Le radio est masqué : la sélection se fait en cliquant sur la carte */
.calc-source-choice input[type="radio"] {
    display: none;
}

.recommendation-box:not(.selected-for-calc) .calc-source-choice::before {
    content: "○ ";
    color: #999;
}

.recommendation-box.selected-for-calc .calc-source-choice::before {
    content: "● ";
}
