/**
 * @file
 * Visual styles for Bartik's forms.
 */

/* Password field. */
.password-field {
  margin: 0;
}

/* Form elements. */
form {
  margin: 0;
  padding: 0;
}
/**
 * Prevent regression due to explicit line-height applied to these elements in
 * normalize.css 7.0.0.
 */
button {
  line-height: 1.21875rem;
}
input {
  line-height: normal;
}
select {
  line-height: 1.5;
  cursor: pointer;
}
/**
 * 1. Prevent regression due to fieldset styling that was removed in
 *    normalize.css 6.0.0.
 */
fieldset {
  min-width: 0;
  margin: 1em 0;
  padding: 0.35em 0.625em 0.75em; /* 1 */
  border: 1px solid var(--border-color); /* 1 */
}
details,
fieldset,
.filter-wrapper {
  border-radius: 4px;
}
.filter-wrapper {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.filter-help a {
  font-size: 0.857em;
}
.filter-wrapper .form-item label {
  margin-right: 10px; /* LTR */
}
[dir="rtl"] .filter-wrapper .form-item label {
  margin-right: 0;
  margin-left: 10px;
}
summary {
  color: var(--text-color);
  background: var(--background-color-light);
  text-shadow: 0 1px 0 white;
}
details summary a {
  color: var(--text-color);
}
details summary a:hover,
details summary a:active,
details summary a:focus {
  color: black;
}
details .details-description {
  font-style: italic;
}
label {
  display: inline;
  font-weight: bold;
}
label[for] {
  cursor: pointer;
}
input,
textarea,
select {
  text-transform: none;
}
input {
  box-sizing: border-box;
  /* Keep form elements from overflowing their containers. */
  max-width: 100%;
  margin: 2px 0;
  padding: 4px;
}
input,
textarea {
  font-size: 1.4rem;
}

/**
 * Make the font slightly bigger in mobile
 * @todo: check the correct font-size
 */
@media screen and (max-width: 60em) {
  /* 920px */
  input,
  textarea {
    font-size: 16px;
  }
}
textarea {
  line-height: 1.5;
}
textarea.form-textarea {
  padding: 4px;
}
input.form-date,
input.form-text,
input.form-tel,
input.form-email,
input.form-url,
input.form-search,
input.form-file,
searc input.form-number,
input.form-color,
textarea.form-textarea {
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
input.form-search {
  border-radius: 40px;
  height: 5rem;
  max-width: 42rem;
  width: 100%;
  text-align: center;
}
.password-suggestions ul li {
  margin-left: 1.2em; /* LTR */
}
[dir="rtl"] .password-suggestions ul li {
  margin-right: 1.2em;
  margin-left: 0;
}
.form-item label,
.form-wrapper .label {
  font-size: 1em;
  /* agrandissement de la taille des input et labels */
}
.form-wrapper .field-multiple-table .label {
  font-size: inherit;
}
.form-type-radio label,
.form-type-checkbox label {
  margin-left: 4px; /* LTR */
}
[dir="rtl"] .form-type-radio label,
[dir="rtl"] .form-type-checkbox label {
  margin-right: 4px;
  margin-left: 0;
}
.form-type-radio .description,
.form-type-checkbox .description {
  margin-left: 2px; /* LTR */
}
[dir="rtl"] .form-type-radio .description,
[dir="rtl"] .form-type-checkbox .description {
  margin-right: 2px;
  margin-left: 0;
}

/* Node Form */
#edit-body {
  margin-bottom: 2em;
}

.form-item .description,
details .details-description {
  font-style: italic;
  font-size: 0.9em;
  border: 1px dashed var(--border-color);
  padding: 0.5rem;
}

.form-item .description::before,
details .details-description::before {
  background-image: url(/themes/custom/corvin/images/information-black.svg);
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  background-position: left;
  opacity: 0.6;
  content: "";
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 5px;
}

#edit-field-redacteur--description {
  display: flex;
  align-items: center;
}

#edit-field-redacteur--description > p {
  margin-bottom: 0;
}

.node-form .form-wrapper .field-multiple-table .label {
  font-family: inherit;
}

#inline-entity-form-field_redacteur-form #edit-field-redacteur .fieldset-wrapper {
  padding: 0px;
}

.node-form .entity-content-form-footer,
.node-form .field--name-status {
  margin-bottom: 0;
}
.node-form .form-actions {
  margin-top: 0;
  padding-top: 0;
}

/* Contact Form */
.contact-form #edit-name {
  width: 75%;
  border-radius: 4px;
}
.contact-form #edit-mail {
  width: 75%;
  border-radius: 4px;
}
.contact-form #edit-subject {
  width: 75%;
  border-radius: 4px;
}
.contact-form #edit-message {
  width: 76.3%;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* Disabled form elements */
.form-disabled input,
.form-disabled select,
.form-disabled textarea {
  color: var(--text-color);
  border-color: var(--grey);
  background: var(--border-color);
}
.form-disabled label {
  color: var(--text-color);
}

/* Comment form */
.comment-form label {
  float: left; /* LTR */
  width: 120px;
  font-size: 0.929em;
}
[dir="rtl"] .comment-form label {
  float: right;
}
.comment-form input,
.comment-form .form-select {
  margin: 0;
  border-radius: 4px;
}
.comment-form .form-type-textarea label {
  float: none;
}
.comment-form .form-item,
.comment-form .form-radios,
.comment-form .form-type-checkbox,
.comment-form .form-select {
  overflow: hidden;
  margin-bottom: 10px;
}
.comment-form .form-type-checkbox,
.comment-form .form-radios {
  margin-left: 120px; /* LTR */
}
[dir="rtl"] .comment-form .form-type-checkbox,
[dir="rtl"] .comment-form .form-radios,
[dir="rtl"] .comment-form .form-item .description {
  margin-right: 120px;
  margin-left: 0;
}
.comment-form .form-type-checkbox label,
.comment-form .form-radios label {
  float: none;
  margin-top: 0;
}
.comment-form input.form-file {
  width: auto;
}
.layout-no-sidebars .comment-form .form-text {
  width: 800px;
}
.layout-one-sidebar .comment-form .form-text {
  width: 500px;
}
.layout-two-sidebars .comment-form .form-text {
  width: 320px;
}
.comment-form .form-item .description {
  margin-left: 120px; /* LTR */
  font-size: 0.786em;
  line-height: 1.2;
}
.comment-form .form-textarea {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}
.comment-form details.filter-wrapper .details-wrapper,
.comment-form .text-format-wrapper .form-item {
  margin-top: 0;
  margin-bottom: 0;
}
.filter-wrapper label {
  float: none;
  width: auto;
}
.filter-wrapper .form-select {
  min-width: 120px;
}
.comment-form details.filter-wrapper .tips {
  font-size: 0.786em;
}
#comment-body-add-more-wrapper .form-type-textarea label {
  margin-bottom: 0.4em;
}
#edit-actions input {
  margin-right: 0.6em; /* LTR */
}
[dir="rtl"] #edit-actions input {
  margin-right: 0;
  margin-left: 0.6em;
}
.region-content form[class*="-form"] .form-item:not(.form-type-radio, .form-type-checkbox, .form-type-textfield, .form-type-textarea),
.region-content form[class*="-form"] .form-type-textfield,
.region-content .form-wrapper:not(.filter-wrapper),
.region-content .form-submit {
  margin-block: 0.25rem;
}
.region-content .form-wrapper.field--widget-inline-entity-form-complex-table-view-mode {
  margin-block: 1rem 2rem;
}
.region-content .form-wrapper.field--widget-inline-entity-form-complex-table-view-mode legend {
  padding-inline: 0.75rem;
}


.region-content .form-item:not(#edit-group-archives) .form-wrapper.field--widget-entity-reference-autocomplete ,
.region-content .form-wrapper.field--name-field-bnf {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.35em 0.625em 0.75em;
  margin-block: 1rem 2rem;
}
.region-content .form-item:not(#edit-group-archives) .form-wrapper.field--widget-entity-reference-autocomplete th.field-label ,
.region-content .form-wrapper.field--name-field-bnf th.field-label {
  background: none;
  border: none;
  position: absolute;
  top: -1.5rem;
}
.region-content .form-item:not(#edit-group-archives) .form-wrapper.field--widget-entity-reference-autocomplete th.field-label h4 ,
.region-content .form-wrapper.field--name-field-bnf th.field-label h4 {
  padding-inline: 0.75rem;
  font-weight: 600;
  background-color: white;
  margin: 0!important;
}
.region-content .form-wrapper#edit-field-chapeau-wrapper,
.region-content .form-wrapper#edit-group-corps,
.region-content .form-wrapper#edit-field-images-wrapper {
margin-block: 0.5rem 1.5rem;
}

/* Form error styles. */
.form-item textarea.error + .cke {
  border: 2px solid var(--accent-color);
}

/* Form error message styles. */
.form-item--error-message {
  color: var(--accent-color);
}

/* User Login form */

.user-login-form,
body:not(.path-admin) .user-register-form,
.user-pass {
  max-width: 450px;
  width: 100%;
  color: var(--background-color);
}

.user-login-form .form-item,
body:not(.path-admin) .user-register-form .form-item,
.user-pass .form-item {
  display: flex;
  flex-direction: column;
}
.user-login-form label,
body:not(.path-admin) .user-register-form label,
.user-pass label {
  font-weight: 600;
}
.user-login-form input,
body:not(.path-admin) .user-register-form input,
.user-pass input {
  padding-inline: 0.5em;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-weight: 400;
}
.user-login-form input:focus,
body:not(.path-admin) .user-register-form input:focus,
.user-pass input:focus {
  outline: 1px solid var(--accent-color);
}
.user-login-form .description {
  font-size: 0.8em;
}
.user-login-form .form-submit,
body:not(.path-admin) .user-register-form .form-submit,
body.user-form-page .form-submit,
.user-pass .form-submit {
  height: 36px;
  background: var(--accent-color);
  border: none;
  border-radius: 5px;
  font-weight: 400;
  font-size: 1.75rem;
  color: white;
  padding-inline: 1em;
  cursor: pointer;
}
.user-login-form .form-submit:hover,
body:not(.path-admin) .user-register-form .form-submit:hover,
body.user-form-page .form-submit:hover,
.user-pass .form-submit:hover {
  background: var(--accent-color-hover);
}

/**
 * Improve form element usability on narrow devices.
 */
@media all and (max-width: 600px) {
  .form-actions .button {
    display: block;
    float: none;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    margin: 10px 0 0;
    padding-bottom: 6px;
  }

  .js .dropbutton .dropbutton-action > input,
  .js .dropbutton .dropbutton-action > a,
  .js .dropbutton .dropbutton-action > button {
    padding-left: 3em;
    text-align: center;
  }
}

@media screen and (min-width: 780px), (orientation: landscape) and (min-device-height: 780px) {
  #node-article-form .layout-region-node-main,
  #node-article-form .layout-region-node-footer {
    float: none;
    width: 80%;
    padding: 0;
  }

  #node-article-form .layout-region-node-secondary {
    float: none;
    width: 80%;
  }
}

.form-required:after {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 0.3em;
  content: "";
  vertical-align: super;
  /* Use a background image to prevent screen readers from announcing the text. */
  background-image: url(/core/misc/icons/ee0000/required.svg);
  background-repeat: no-repeat;
  background-size: 6px 6px;
}
.form-required:after {
  width: 7px;
  height: 7px;
  background-size: 7px 7px;
}

.region-content form[class*="-form"] {
  color: var(--background-color);
}

.region-content form[class*="-form"] .form-item:not(.form-type-radio, .form-type-checkbox) {
  display: flex;
  flex-direction: column;
}
.region-content form[class*="-form"] label,
.region-content form[class*="-form"] legend {
  font-weight: 600;
}
.region-content form[class*="-form"] input:not(.form-radio, .form-checkbox),
.region-content form[class*="-form"] #edit-delete {
  width: 100%;
  padding-inline: 0.5em;
  height: 36px;
  border-radius: 5px;
  font-weight: 400;
}
.region-content form[class*="-form"] .form-tel {
  padding-inline-start: 3.5em !important;
}
.region-content form[class*="-form"] input:focus {
  outline: 1px solid var(--accent-color);
}
.region-content form[class*="-form"] .description {
  font-size: 0.8em;
}

.taxonomy-overview-terms .form-submit,
#revision-overview-form #edit-submit,
.region-content form[class*="-form"] .form-submit,
.region-content form[class*="-form"] #edit-delete {
  height: 36px;
  background: var(--accent-color);
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1.4rem;
  color: white;
  width: fit-content !important;
  padding-inline: 2em !important;
  cursor: pointer;
}
form[class*="-form"] #edit-submit {
  font-size: 1.75rem;
}
.region-content form[class*="-form"] #edit-delete {
  line-height: 36px;
  padding: 0;
  margin: 0.5em;
  font-weight: 600;
}
.region-content form[class*="-form"] .form-submit[id*="cancel"],
.region-content form[class*="-form"] .form-submit[id*="delete"],
.region-content form[class*="-form"] .form-submit[id*="remove"] {
  background: var(--background-color-alter);
}
.taxonomy-overview-terms .form-submit:hover,
.region-content form[class*="user-pass"] .form-submit:hover,
.region-content form[class*="-form"] .form-submit:hover {
  background: #5e101a;
}
.region-content form[class*="-form"] .form-submit[id*="cancel"]:hover,
.region-content form[class*="-form"] .form-submit[id*="remove"]:hover {
  background: var(--background-color);
}

.entity-moderation-form {
  padding: 1em;
}
.entity-moderation-form li {
  margin: 0;
}
.entity-moderation-form li:nth-child(-n + 2) {
  width: 50%;
}
.entity-moderation-form li:nth-child(n + 3) {
  width: 100%;
}
.form-select {
  background-color: white;
  border: solid 1px var(--border-color);
  border-radius: 15px;
  padding: 5px 10px;
}

.region-content form[class*="-form"] h2 {
  color: var(--accent-color);
  margin-block: 1rem 3rem;
  font-size: 3.5rem;
}
/* Formulaire Utilisateur */

#edit-account,
#profile-auteur-edit-form,
#edit-account #edit-pass {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  gap: 1em;
  width: 100%;
}
#profile-auteur-edit-form #edit-field-civilite-wrapper,
#profile-auteur-edit-form #edit-field-biographie-wrapper,
#profile-auteur-edit-form #edit-field-recherche-bnf-wrapper,
#profile-auteur-edit-form #edit-field-article-corvin-wrapper {
  flex: 100%;
}
#edit-account .form-item {
  padding-block-end: 0.75em;
}
#profile-auteur-edit-form .field--type-string,
#profile-auteur-edit-form .field--type-phone-international,
#edit-account .form-type-email,
#edit-account .form-type-textfield,
#edit-account #edit-pass .form-type-password,
#edit-account #edit-pass .form-type-password,
#edit-account #edit-status--wrapper,
#edit-account #edit-role-change-wrapper {
  width: calc(50% - 0.5em - 2px);
  margin: unset;
  padding-inline: 1px;
}

@media screen and (max-width: 600px) {
  #edit-group-categorie .fieldset-wrapper {
    flex-direction: column;
  }
}

#revision-overview-form {
  display: flex;
  flex-direction: column;
}
#revision-overview-form #edit-submit {
  padding-inline: 1.5em !important;
  height: 45px;
  order: -1;
  margin: 0;
}

@media screen and (max-width: 530px) {
  #edit-account,
  #profile-auteur-edit-form,
  #edit-account #edit-pass {
    flex-direction: column;
  }
  #profile-auteur-edit-form .field--type-string,
  #profile-auteur-edit-form .field--type-phone-international,
  #edit-account .form-type-email,
  #edit-account .form-type-textfield,
  #edit-account #edit-pass .form-type-password,
  #edit-account #edit-pass .form-type-password,
  #edit-account #edit-status--wrapper,
  #edit-account #edit-role-change-wrapper {
    width: 100%;
  }
}
