/* Conteneur général */
form {
  max-width: 800px;
  margin: 0 auto;
  font-family: "Segoe UI", Roboto, sans-serif;
  color: #222;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Titres */
h2.label-titre {
  text-align: center;
  color: #444;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

h3 {
  margin-top: 30px;
  color: #333;
  font-size: 1.3rem;
  border-left: 4px solid #007ACC;
  padding-left: 8px;
}

/* Ligne et colonnes */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.col {
  flex: 1;
  min-width: 200px;
}

.col.half {
  flex: 0 0 48%;
}

.col.third,
.col.md\:w-1\/3 {
  flex: 0 0 31%;
}

/* Labels */
label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #555;
}

/* Inputs et selects */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fafafa;
}

input[readonly] {
  background: #eee;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #007ACC;
  box-shadow: 0 0 5px rgba(0, 122, 204, 0.2);
  outline: none;
}

/* Radios et checkbox */
input[type="radio"],
input[type="checkbox"] {
  margin-right: 6px;
}

/* Bouton submit */
input[type="submit"],
button {
  display: inline-block;
  background-color: #007ACC;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

input[type="submit"]:hover,
button:hover {
  background-color: #005A99;
  transform: translateY(-2px);
}

p {
  margin: 10px 0;
}

.conditional-field {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}
.conditional-field.show {
  max-height: 200px; /* suffisant pour le contenu */
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .col.half, .col.third, .col.md\:w-1\/3 {
    flex: 1 1 100%;
  }
  form {
    padding: 15px;
  }
}
.conditional-field {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.conditional-field.show {
  max-height: 200px; /* ajuste selon ton besoin */
  opacity: 1;
}