/* Form controls - Base styles */
.form-control,
.form-select {
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--bg-white);
}

/* Focus states - unified for all form elements */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-focus);
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}

/* Select customization */
.form-select {
  cursor: pointer;
  padding-right: var(--spacing-xl);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNSIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzVDNUU2MSIgZD0ibTcuMzM0IDkuNSA1IDUgNS01aC0xMFoiLz48L3N2Zz4=");
  background-position: right 0.1rem center;
  background-repeat: no-repeat;
  background-size: 25px 24px;
}

/* Select options */
.form-select option {
  cursor: pointer;
  padding: 0.5rem;
}

.form-select option:focus,
.form-select option:hover,
.form-select option:active {
  background-color: var(--bg-primary-light);
  color: var(--primary-color);
}

/* Checkbox and Radio */
.form-check {
  align-items: center;
  display: flex;
  margin-bottom: 0.5rem;
}

.form-check-input {
  border: 2px solid var(--primary-color);
  background-color: var(--bg-white);
  cursor: pointer;
  height: var(--font-xl);
  margin-right: var(--spacing-sm);
  margin-top: 0;
  width: var(--font-xl);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  color: var(--text-dark);
  cursor: pointer;
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.5;
}

/* Form groups */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  color: var(--text-primary);
  font-size: var(--font-xxs);
  font-weight: 500;
  letter-spacing: 0.015rem;
  line-height: 1rem;
  margin-bottom: var(--spacing-xs);
}

.form-label.large {
  width: 24rem;
}

/* Form validation states */
.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success-color);
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
}

/* Dropdown customization */
.dropdown-menu {
  border: none;
  box-shadow: 0 2px 8px var(--shadow-color);
  background-color: var(--bg-white);
}

.dropdown-edf-response .dropdown-menu {
  padding: var(--spacing-md);
}

.dropdown-edf-response .dropdown-item {
  border-bottom: 1px solid var(--border-gray);
  color: var(--text-dark);
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.5rem;
  padding: var(--spacing-xs);
}

.dropdown-edf-response li:last-child .dropdown-item {
  border-bottom: 0;
}

.dropdown-item:hover {
  background: var(--bg-primary-light);
  color: var(--primary-color);
}

/* Ensure all focusable elements have appropriate focus states */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}

/* Ensure form controls have consistent focus styles */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-focus);
  outline: var(--outline-focus);
  outline-offset: var(--outline-offset);
}

/* Dark select */
.dark-select-container {
  position: relative;
  width: 100px;
}

.dark-select {
  width: 100%;
  padding: var(--spacing-xxs) var(--spacing-xs);
  background-color: #5a5a5a;
  color: white;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  border-radius: 5.875rem;
  border: 1px solid var(--bg-dark);
  background: var(--bg-dark);
}

.dark-select-container::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid white;
  pointer-events: none;
}

.dark-select::-ms-expand {
  display: none;
}

/* Style pour les placeholders - plus légers et discrets */
.form-control::placeholder {
  color: #a0a0a0;
  opacity: 0.7;
  font-style: italic;
  font-weight: 300;
}

.form-control:focus::placeholder {
  opacity: 0.5;
}
