/* Champs --------------------------------------------------------------------- */
.champ { min-width: 0; }
.champ > label:not(.coche),
.options legend {
  display: block;
  margin: 0 0 6px 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gris);
}
.facultatif { font-weight: 600; letter-spacing: 0; text-transform: none; }

.champ input[type="text"],
.champ input[type="email"],
.champ select,
.champ textarea,
.quand-date input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--filet);
  border-radius: var(--rayon-champ);
  background: var(--champ);
  color: var(--encre);
  font-size: 17px;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
.champ textarea { padding: 14px 16px; min-height: 160px; line-height: 1.5; font-weight: 500; resize: vertical; }
.champ input::placeholder { color: var(--gris); font-weight: 500; opacity: 1; }
.champ input:focus,
.champ select:focus,
.champ textarea:focus,
.quand-date input:focus,
.ligne-choix select:focus {
  outline: none;
  border-color: var(--outremer);
  box-shadow: 0 0 0 4px rgb(42 51 216 / .2);
}

.champ-aide { margin: 7px 0 0 2px; font-size: 14px; color: var(--gris); }
.champ-message { margin: 7px 0 0 2px; font-size: 14px; font-weight: 700; color: var(--alerte); }
.champ-erreur input, .champ-erreur select, .champ-erreur textarea { border-color: var(--alerte); }

/* Ligne « libellé — liste » */
.ligne-choix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.ligne-choix label { font-size: 14px; font-weight: 600; color: var(--gris); }
.ligne-choix select {
  min-height: 44px;
  max-width: 100%;
  padding: 0 12px;
  border: 1.5px solid var(--filet);
  border-radius: var(--rayon-pastille);
  background: var(--blanc);
  font-weight: 700;
}

/* Cases à cocher */
.coche {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.coche input {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--outremer);
}

/* Pastille glissante (Quand, Tri, Carte) : des boutons radio, une pastille qui glisse.
   --k est le rang de l'option cochée ; il se règle tout seul avec :has(). */
.segment {
  --n: 3;
  --k: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 4px;
  border-radius: 14px;
  background: var(--papier);
}
.segment-4 { --n: 4; }
.segment:has(input:nth-of-type(2):checked) { --k: 1; }
.segment:has(input:nth-of-type(3):checked) { --k: 2; }
.segment:has(input:nth-of-type(4):checked) { --k: 3; }
.segment-pastille {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n));
  border-radius: 10px;
  background: var(--outremer);
  transform: translateX(calc(var(--k) * 100%));
  transition: transform .55s var(--ease-swap);
}
.segment label {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--gris);
  cursor: pointer;
  transition: color .35s ease;
}
.segment input:checked + label { color: var(--blanc); }
.segment input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: 3px; box-shadow: 0 0 0 6px var(--encre); }

/* Formulaire de contact -------------------------------------------------------- */
.formulaire { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
.formulaire-note { font-size: 14px; color: var(--gris); }
.formulaire .bouton-principal { width: auto; align-self: flex-start; padding-inline: 28px; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.erreurs, .confirmation, .avertissement, .etat {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--blanc);
  border-left: 6px solid var(--outremer);
}
.erreurs { border-left-color: var(--alerte); }
.confirmation { border-left-color: var(--sobre); }
.avertissement { border-left-color: var(--signal); }
.effacer-retour { margin-left: 12px; font-weight: 700; color: var(--sobre); }
