/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 /* ===== Reset minimal ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== Container champ ===== */
.form-group {
  margin-bottom: 16px;
}

/* ===== Label ===== */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

/* ===== Input & Select ===== */
.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

/* ===== Focus ===== */
.form-control:focus {
  border-color: #16a34a; /* vert propre */
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* ===== Placeholder ===== */
.form-control::placeholder {
  color: #9ca3af;
}

/* ===== Disabled ===== */
.form-control:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ===== Select personnalisé ===== */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.24 4.5a.75.75 0 01-1.08 0l-4.24-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;

  padding-right: 40px;
  cursor: pointer;
}

/* ===== États ===== */

/* Erreur */
.form-control.error {
  border-color: #dc2626;
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Succès */
.form-control.success {
  border-color: #16a34a;
}

/* ===== Message aide ===== */
.form-text {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

/* Message erreur */
.form-text.error {
  color: #dc2626;
}

/* ===== Input avec icône ===== */
.input-icon {
  position: relative;
}

.input-icon input {
  padding-left: 38px;
}

.input-icon .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 14px;
  color: #9ca3af;
}