form {
  display: flex;
  flex-direction: column;
}

form h1 {
  padding-top: 1em;
}

form a {
  cursor: pointer;

  color: var(--bleu-mise-en-avant);
  text-decoration: none;
}

form label,
fieldset {
  display: block;
  margin-bottom: 3em;

  font-weight: bold;
}

form label .infos-complementaires {
  font-weight: normal;
  font-size: 0.9em;
  color: var(--texte-moyen);
}

form input {
  box-sizing: border-box;
  width: 100%;

  margin-top: 0.3em;
  padding: 0.8em;

  border: solid 1px var(--liseres);
  border-radius: 5px;
  background: var(--fond-pale);

  font-family: Marianne;
}

form :is(input, textarea)[readonly] {
  color: #667892;
  background: #dbecf1;
  user-select: none;
  cursor: not-allowed;
}

form input[type='checkbox'][disabled] {
  background: #dbecf1;
  cursor: not-allowed;
  border: none;
}

form input[type='radio'][disabled] {
  background: #dbecf1;
  cursor: not-allowed;
  border: none;
}

form input[type='radio'][disabled]:checked {
  background: white;
  border: 1px solid #dbecf1;
}

form input[type='radio'][disabled]:before {
  filter: brightness(0);
}

form input[type='checkbox'][disabled]:before {
  border-color: black;
}

select[disabled] {
  color: #667892;
  background: #dbecf1;
  appearance: none !important;
  cursor: not-allowed;
}

fieldset {
  margin: 0 0 1em 0;
  padding: 0 0 2em;
  border: none;
}

input:focus {
  border-color: var(--bleu-mise-en-avant);
  outline: none;
}

input[type='text'] {
  margin-bottom: 1em;
}

input[type='text']:last-of-type {
  margin-bottom: 0;
}

input[type='date'] {
  width: 11em;
}

input[type='checkbox'],
input[type='radio'] {
  appearance: none;
  background-color: #fff;
  margin: 0 1em 0 0;
  padding: 0;
  width: 1.6em;
  height: 1.6em;
  transform: translateY(0.4em);
  flex-shrink: 0;
}

input[type='checkbox'] {
  border-radius: 0.15em;
  border: 1px solid var(--gris-fonce);
  cursor: pointer;
}

input[type='radio'] {
  border: 1.5px solid black;
  border-radius: 50%;
  cursor: pointer;
}

input[type='checkbox']:focus {
  outline: 0.5px solid var(--bleu-mise-en-avant);
  outline-offset: 2px;
}

input[type='checkbox']:checked {
  background-color: var(--bleu-mise-en-avant);

  border-color: var(--bleu-mise-en-avant);
}

input[type='radio']:checked {
  border-color: var(--bleu-mise-en-avant);
}

input[type='checkbox']:checked::before,
input[type='radio']:checked::before {
  content: '';
  display: block;
}

input[type='checkbox']:checked::before {
  margin: auto;
  width: 0.4em;
  height: 0.9em;
  border-right: 0.15em #fff solid;
  border-bottom: 0.15em #fff solid;
  transform: rotate(0.12turn);
}

input[type='radio']:checked::before {
  display: block;
  content: '';
  background: var(--bleu-mise-en-avant);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  transform: translate(4px, 4px);
}

input[type='checkbox'] + label,
input[type='radio'] + label {
  display: inline-block;

  margin: 1em 0 0;

  font-weight: normal;
}

textarea {
  resize: vertical;
  display: block;
  box-sizing: border-box;

  height: 10em;
  width: 100%;

  margin-top: 1em;
  padding: 0.8em;

  border: solid 1px var(--liseres);
  border-radius: 3px;

  background: var(--fond-pale);

  font-family: 'Marianne';
  font-size: 0.93em;
}

select {
  display: block;
  box-sizing: border-box;
  margin: 0.3em 0 1em 0;
  padding: 0.8em;
  border: solid 1px var(--liseres);
  border-radius: 5px;
  width: 100%;
  background: var(--fond-pale);
  font-family: Marianne;

  appearance: none;
}

.selecteur-options {
  position: relative;
}

.selecteur-options::after {
  content: '';
  top: 0.98em;
  right: 1.05em;
  position: absolute;
  border-bottom: 1.5px black solid;
  border-right: 1.5px black solid;
  width: 0.5em;
  height: 0.5em;
  transform: rotate(45deg);
}

.case-a-cocher {
  display: grid;
  grid-template-columns: auto 1fr;
}

.case-a-cocher > input[type='checkbox'] + label {
  margin-top: 0;
}

.case-a-cocher .message {
  grid-column-end: span 2;
}

.conseil {
  margin-bottom: 1em;

  color: var(--bleu-anssi);
  border: 1px solid var(--bleu-mise-en-avant);
  border-radius: 0.5em;
  padding: 0.6em 0.8em 0.6em 2.4em;
  background: url('../images/ampoule.svg') no-repeat 0.6em 0.6em;
}

.conteneur-nom-service {
  position: relative;
}

#liste-suggestions {
  position: absolute;
  border: 1px solid var(--bleu-survol);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  background: white;
  z-index: 2;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  list-style: none;
  padding-left: 0;
  transform: translateY(-4px);
  max-height: 10em;
  overflow-y: scroll;
  display: none;
}

.item-suggestion {
  padding: 0.3em 0;
  cursor: pointer;
}

.item-suggestion:hover {
  background: var(--fond-gris-pale);
  color: var(--bleu-mise-en-avant);
}

select ~ .icone-chargement {
  display: none;
  position: absolute;
  right: 1em;
  transform: translateY(-2.2em);
  z-index: 10;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

input[type='checkbox'] + label.label-checkbox {
  width: 80%;
  margin: 0;
}

.input-checkbox {
  vertical-align: top;
  cursor: pointer;
  transform: translateY(0) !important;
}

.fonction-poste .conteneur-checkbox:first-of-type {
  margin-top: 1em;
}

.conteneur-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

.fonction-poste .conteneur-checkbox.conteneur-autre-poste {
  margin-bottom: 0;
}

#info-complementaire-poste-autre {
  font-weight: normal;
  font-size: 0.9em;
  margin: 0 0 0 2.6em;
}

#posteAutre {
  background: none;
  border: none;
  border-bottom: 1px solid #cbd4e0;
  border-radius: 0;
  margin: 0 2.6em;
  padding: 0.5em 0;
}

.icone-voir-mot-de-passe {
  position: absolute;
  right: 1em;
  top: 2.3em;
  cursor: pointer;
  background-image: url('/statique/assets/images/icone_voir_mot_de_passe.svg');
  background-repeat: no-repeat;
  background-size: contain;
  width: 1.7em;
  height: 1.7em;
}

.icone-voir-mot-de-passe.cacher {
  background-image: url('/statique/assets/images/icone_cacher_mot_de_passe.svg');
}

.label-confirmation {
  margin-bottom: 0.2em !important;
}

.preferences-communication label {
  margin-bottom: 0;
}

.preferences-communication .conteneur-checkbox {
  width: 100%;
  position: relative;
  left: -1em;
  row-gap: 1.25em;
  background: #eff6ff;
  margin: 1em 0;
  border-radius: 10px;
  padding: 1em;
}

.preferences-communication .separateur {
  height: 1px;
  width: 100%;
  background: #1992dc30;
}

.preferences-communication input[type='checkbox'] {
  transform: translateY(0.4em) !important;
}

.preferences-communication input[type='checkbox']:not(:checked) {
  background: #eff6ff;
}

button.bouton.en-cours-chargement {
  color: transparent;
}

button.bouton.en-cours-chargement::before {
  position: absolute;
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  border: 2px solid white;
  border-color: white transparent;
  animation: rotation 1.2s linear infinite;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
}

#ajout-element-point-acces {
  margin-top: 24px;
}

.nouvel-item {
  font-weight: bold;
  border: none;
  background: transparent;
  color: var(--bleu-mise-en-avant);
  cursor: pointer;
}

.requis label p.description:first-of-type {
  margin-top: 8px;
}

.requis label p.description:last-of-type {
  margin-bottom: 16px;
}

.requis label p.description {
  font-weight: normal;
  font-size: 0.9em;
  margin: 0;
  color: var(--texte-fonce);
}

select#estimation-nombre-services {
  appearance: auto;
}

#bouton-connexion {
  width: 100%;
  padding: 8px 0;
}
