.mainrubrik-instruction,
.mainrubrik-contentieux {

  #tabs-1 .adv-search-fieldset {
    legend {
      cursor: pointer;
    }

    .form-content {
      border: none;
    }
  }

  .formControls {
    &-bottom {
      padding: 1em 0;
    }
  }

  #formulaire .formEntete {
    padding: 0;

    .formEntete {
      padding: 0;
      display: grid;
      grid-template-columns: 1fr 300px;
      grid-template-rows: auto 1fr;
      grid-gap: 1vh 1vw;
      grid-column: 1/3;
      margin-bottom: 0;

      #portlet-actions {
        grid-column: 2/-1;
      }

      #form-content {
        grid-column: 1/2;
        grid-row: 1/3;
      }

      .bloc.col_12.instruction_suivi_decision {
        grid-column: 1/2;
        grid-row: 3/7;
      }

      .bloc.col_12 {
        grid-column: 1/-1;
      }

      .bloc.di-main,
      .bloc.di-main-modification {
        grid-column: 1/2;
        grid-row: 1/3;
      }

      .bloc.di-aside {
        grid-column: 2/3;
      }

      fieldset,
      .col_12,
      #liste_contrainte,
      .bloc.di-under {
        grid-column: 1/-1;
      }
    }

    .form-content {
      border-bottom: 0;
      text-wrap: wrap;
      word-wrap: break-word;
      //min-height: 1em;
    }

    .field_value,
    [class*='geoloc_label'] {
      font-size: 1.1em;
    }

    .fieldsetContent {
      border: none;

    }

    .bloc.di_instruction {
      grid-column: 1/2;
      grid-row: 3/7;

      &~.col_12 {
        grid-column: 1/2;
      }
    }
  }

  #form-container>form[name="f1"] .formEntete .formEntete {
    #form-content {
      grid-row: 1/5;
    }

    .bloc.col_12.instruction_suivi_decision {
      grid-row: 5/7;
    }
  }

  .bloc.di-main,
  .bloc.di-aside,
  .bloc.di-main-modification,
  .bloc.di-aside-modification {
    .bloc-titre {
      grid-column: 1/-1;
      font-size: 1.1em;
    }

    .bloc.block {
      display: block;

      div.form-content,
      div.field {
        display: inline;
      }
    }

    .placeholder .form-content {
      color: $gris600;
      font-style: italic;
      font-size: .85em;
      font-weight: 400;
    }

    .field-type-checkbox,
    .field-type-radio {
      text-align: left;
    }

    .bloc.no-label {
      .form-libelle {
        display: none;
      }
    }

  }

  #liste_demandeur #fieldset-form-dossier_instruction-demandeur>.fieldsetContent {
    flex-direction: column;
  }

  #fieldset-form-dossier_instruction-autres-demandeurs {

    .fieldsetContent,
    .bloc.demandeur-container {
      flex-wrap: wrap;
      gap: 1em 0;

      section div+div {
        padding-left: 0;
      }

      div[id^="btn_"] {

        button {
          white-space: nowrap;
        }

        +div[id^="btn_"] {
          padding-left: .5em;
        }
      }

      >div {
        flex: unset;
        display: flex;
      }

    }
  }

  .bloc.di-main-modification,
  .bloc.di-aside-modification {
    .bloc.no-label {
      .form-libelle {
        display: block;
      }

      &.localisation-terrain-refs-cadastrales {
        .form-libelle {
          display: none;
        }
      }
    }

  }


  /***
  ==============================

        MODE CONSULTATION

  ==============================
  ***/

  /***
  ==============================
  FIELDSET DOSSIER D'INSTRUCTION
  ==============================
  ***/

  fieldset[id*="fieldset-form-dossier_instruction"][id*="-dossier-d_instruction"] {
    .fieldsetContent {
      gap: 0;
    }

    .field {
      grid-template-columns: 1fr;
    }

    :not(.placeholder) .form-content {
      font-weight: 400;
    }

    .bloc.localite-competence {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      margin-bottom: 1em;

      .field.field-type-selectstatic {
        display: flex;
      }

      .bloc.om_collectivite {
        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: 1fr;
        }

        .form-content {
          font-weight: 500;
          background-color: $gris200;
          padding: .5em 1em;
          font-size: .9rem;
          border-radius: 1em;
        }
      }

    }

    .bloc.nature_travaux {
      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: 1fr;
      }
    }

    .bloc.nom-complet-dossier {
      display: block;

      >div {
        display: inline;
      }

      #dossier_libelle {
        font-size: 1.5em;
        font-weight: 700;
        margin-right: 1em;
      }
    }

    .bloc.dossier_petitionnaire {
      font-size: 1rem;
      margin-top: .5em;
      margin-bottom: 1em;
      padding-bottom: .5em;
      border-bottom: 1px solid $gris200;

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        display: block;
      }

      .form-libelle {
        display: none;
      }
    }

    .field.field-type-select_multiple_static {
      li {
        display: inline-block;
        background-color: $brand200;
        padding: .25em .75em;
        font-weight: 600;
        color: $brand900;
        border-radius: 1em;
        box-shadow: 0px 2px 2px 0 rgba(0, 0, 0, .1);
        margin-right: .5em;

        +li {
          margin-top: .5em
        }
      }
    }

    .field.field-type-statiq {
      gap: .5em;

      .form-libelle label {
        &::after {
          content: ":"
        }
      }

      #description_projet {
        font-size: .9em;
      }
    }
  }

  /***
  =====================
  FIELDSET LOCALISATION
  =====================
  ***/
  fieldset[id*="fieldset-form-dossier_instruction"][id*="localisation"] {
    .demat-color {
      grid-template-columns: 1fr;
    }

    .bloc.adresse-complete.localisation-terrain {
      flex-direction: row;
      align-items: flex-start;
      gap: 2vw;
      border-bottom: solid 1px $gris200;
    }

    .bloc.localisation-terrain-adresse {
      flex: 1;
      min-width: 250px;
      gap: .25em;

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: 1fr;
        margin-bottom: 0;

        .form-libelle {
          font-size: .9rem;
        }

        .form-content {
          font-weight: 400;
        }
      }

      .bloc.localisation-terrain--adresse-normalisee {
        gap: .25em;
        margin-bottom: .5em;
      }

      .bloc.localisation-terrain--num-voie,
      .bloc.localisation-terrain--cp-localite {
        >.bloc {
          display: inline-block;
        }

        >div.field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          display: flex;
          flex-direction: row;
        }
      }

      .bloc.terrain_adresse_lieu_dit_BP {
        flex-direction: row;

        >div.field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          display: flex;
          flex-direction: row;
        }
      }
    }

    .bloc.localisation-parcelle {
      flex: 3;
      display: grid;
      grid-gap: .5em;
      grid-template-columns: 2fr 1fr;

      @media screen and (max-width:1300px) {
        grid-template-columns: 1fr;
      }

      .bloc {
        gap: .5em
      }

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: minmax(50px, 1fr) 2fr;
      }
    }
  }

  /***
  ====================
  FIELDSET INSTRUCTION
  ====================
  ***/
  fieldset[id*="fieldset-form-dossier_instruction"][id*="-instruction"] {
    .fieldsetContent {
      gap: .5em
    }

    .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
      grid-template-columns: minmax(100px, 1fr) 2fr;
    }

    .bloc.instructeur.instruction-instructeur {
      flex-direction: row;
      padding-bottom: .5em;

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: auto 1fr;
        margin: 0;
        flex: 1
      }

    }

    .bloc.instructeur-secondaire {
      font-size: .85em;
      flex: 3;

    }

    .bloc.suivi.instruction-suivi {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-gap: 1em 5em;
      padding-bottom: .5em;
      border-bottom: solid 1px $gris200;

      @media screen and (max-width:1300px) {
        grid-template-columns: 1fr;
      }
    }

    .bloc.decision.instruction-decision {
      @media screen and (min-width:1300px) {
        flex-direction: row;
      }

      >div {
        flex: 1;
      }
    }

  }

  /***
  ==============
  FIELDSET ENJEU
  ==============
  ***/
  fieldset[id*="fieldset-form-dossier_instruction"][id*="enjeu"] {
    gap: .5em;

    .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
      grid-template-columns: 1fr;
      margin: 0;
    }

    .bloc.enjeux {
      .field.field-type-select_multiple_static {
        grid-template-columns: 1fr;

        ul#enjeux {
          display: flex;
          gap: .5em;
          flex-wrap: wrap;
        }

        p.enjeux-dossier {
          background: var(--enjeu-color);
          padding: .25em 1em;
          border-radius: 1em;
        }
      }
    }
  }

  /***
  ======================
  FIELDSET QUALIFICATION
  ======================
  ***/
  fieldset[id*="fieldset-form-dossier_instruction"][id*="qualification"] {
    gap: .5em;

    .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
      grid-template-columns: 1fr 1fr;
      margin: 0;
    }

    .form-content {
      text-align: right;
    }
  }

  /***
  ================
  FIELDSET ARCHIVE
  ================
  ***/
  fieldset[id*="fieldset-form-dossier_instruction"][id*="archive"] {
    gap: .5em;

    .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
      grid-template-columns: auto 1fr;
    }

    .form-content {
      text-align: right;
    }
  }

  /***
  ===================
  FIELDSETS DEMANDEUR
  ===================
  ***/
  #fieldset-form-dossier_instruction-demandeur {
    #listePetitionnaires {
      padding: 0;
    }

    >.fieldsetContent {
      gap: 0;
    }

    >div {
      width: 100%;
    }

    fieldset {
      width: 100%;
      margin-bottom: 1em;

      legend {
        margin: 0;
      }
    }
  }

  #liste_demandeur.demandeurs_consultation {
    .demandeur-container section {
      gap: 0;
      flex-direction: row;

      >div {
        width: 100%;
        padding: 0;
      }
    }
  }


  /***
  ==============================

        MODE MODIFICATION

  ==============================
  ***/

  /***
  ======================================
  FIELDSET DOSSIER D'INSTRUCTION (MODIF)
  ======================================
  ***/
  .bloc.di-main-modification,
  .bloc.di-aside-modification {
    fieldset[id*="fieldset-form-dossier_instruction"][id*="-dossier-d_instruction"] {
      .fieldsetContent {
        gap: 0;
      }

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: minmax(150px, 1fr) 4fr;
        font-size: .9rem;
        border-bottom: 1px solid $gris200;
        padding: 5px 0 10px;
      }

      .bloc.om_collectivite {
        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: 1fr auto;
          border: none;
        }
      }

      .bloc.localite-competence {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin-bottom: 1em;

        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: auto 1fr;
          border: none;
        }

        .form-libelle {
          border: 0;
        }

        .field.field-type-selectstatic {
          display: flex;
        }
      }

      #nature_travaux_chosen {
        width: calc(100% - 20px) !important;
      }

      .bloc.nom-complet-dossier {
        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          display: grid;
        }

        #dossier_libelle {
          font-size: 1.5em;
          font-weight: 700;
          margin-right: 1em;
        }
      }

      .bloc.dossier_petitionnaire {
        font-size: 1rem;
        margin: 0;
        border: 0;

        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          display: grid;
        }

        .form-libelle {
          display: unset;
        }
      }

      .field.field-type-select_multiple_static {
        li {
          display: inline-block;
          background-color: $brand200;
          padding: .25em .75em;
          font-weight: 600;
          color: $brand900;
          border-radius: 1em;
          box-shadow: 0px 2px 2px 0 rgba(0, 0, 0, .1);
          margin-right: .5em;

          +li {
            margin-top: .5em
          }
        }
      }
    }

    /***
  =============================
  FIELDSET LOCALISATION (MODIF)
  =============================
  ***/

    fieldset[id*="fieldset-form-dossier_instruction"][id*="-localisation"] {
      .bloc.adresse-complete.localisation-terrain {
        grid-gap: 2vw;
        border-bottom: solid 1px $gris200;

        @media screen and (max-width: 1400px) {
          flex-direction: column
        }

        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) .form-libelle {
          font-size: 1em;
        }
      }

      .bloc.localisation-terrain-adresse {
        flex: 3;
      }

      .bloc.localisation-terrain--num-voie {
        display: grid;
        grid-template-columns: 7ch 1fr;
      }

      .bloc.localisation-terrain--cp-localite {
        display: grid;
        align-items: center;
        grid-template-columns: 90px 1fr;
      }

      .bloc.localisation-terrain-adresse {
        .field {
          grid-template-columns: 1fr;
          grid-gap: 0;
        }

        .field .form-content {
          font-weight: 400;
        }
      }

      .bloc.localisation-terrain--adresse-normalisee {
        .form-libelle {
          display: none;
        }
      }

      .bloc.localisation-parcelle {
        flex: 7;
        display: grid;
        grid-gap: .5em;
        grid-template-columns: 1fr;

        .references_cadastrales_new_field.field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: 1fr;

        }

        @media screen and (max-width:1300px) {
          grid-template-columns: 1fr;
        }

        .bloc {
          gap: .5em
        }

        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: minmax(100px, 1fr) 3fr;
        }
      }
    }

    /***
  ============================
  FIELDSET INSTRUCTION (MODIF)
  ============================
  ***/

    fieldset[id*="fieldset-form-dossier_instruction"][id*="-instruction"] {
      gap: .5em;

      .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
        grid-template-columns: minmax(100px, 1fr) 2fr;
      }

      .bloc.instructeur.instruction-instructeur {
        flex-direction: column;

        .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
          grid-template-columns: minmax(150px, 1fr) 7fr;
          margin: 0;
        }

      }

      .bloc.instructeur-secondaire {
        font-size: 1em;

      }

      .bloc.suivi.instruction-suivi {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 1em 5em;
        border-bottom: solid 1px $gris200;

        @media screen and (max-width:1300px) {
          grid-template-columns: 1fr;
        }
      }

      .bloc.decision.instruction-decision {
        @media screen and (min-width:1300px) {
          flex-direction: row;
        }

        >div {
          flex: 1;
        }
      }

    }

    /***
  ============================
  FIELDSET EUJEU (MODIF)
  ============================
  ***/

    fieldset[id*="fieldset-form-dossier_instruction"][id*="-enjeu"] {
      .form-content #enjeux_chosen {
        text-align: left;
        color: $gris900;
      }

    }
  }




  #fieldset-form-dossier_instruction-localisation,
  #fieldset-form-dossier_instruction-instruction,
  #fieldset-form-dossier_instruction-dossier-d_instruction,
  #fieldset-form-dossier_instruction-enjeu,
  #fieldset-form-dossier_instruction-qualification,
  #fieldset-form-dossier_instruction-archive,
  #fieldset-form-dossier_instruction-suivi,
  #fieldset-form-dossier_instruction-decision,
  #fieldset-form-dossier_instruction-validite-de-l_autorisation {

    .col_1,
    .col_2,
    .col_3,
    .col_4,
    .col_5,
    .col_6,
    .col_7,
    .col_8,
    .col_9,
    .col_10,
    .col_11,
    .col_12 {
      width: 100%;
    }

    legend.ui-corner-all.ui-widget-content {
      font-size: 1.25em;
      color: $brand900;
    }
  }


  .text_capitalize legend {
    text-transform: capitalize;
  }

  // Message display
  #sousform-dossier_message {
    & #sformulaire #sousform-container .formEntete>#form-content {
      display: flex;
      flex-direction: column;
      gap: 1em;
    }

  }

  .bloc.container_instr_edition {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }


  /**
  * Modification des boutons liés à la prévisualisation du courrier d'instruciton
  */
  /* .container_instr_edition {
    display: flex;
    flex-wrap: nowrap;
  } */
  /*  .container_instr_edition .box_instr_edition {
    width: 50%;
  } */
  @media screen and (max-width: 1280px) {
    .container_instr_edition .box_instr_edition {
      width: 100%;
      display: flex;
    }

    .container_instr_edition .box_instr_edition .box_instr_edition_main {
      width: 80%;
    }

    .box_instr_edition_btn {
      width: 20%;
      padding-top: 10px;
    }
  }

  .field-type-httpclickbutton>.form-content {
    padding-bottom: 12px;
  }

  .field-type-httpclick {
    display: inline-block;

    a {
      @include buttonSecondary;
    }
  }

  .httpclickbutton {
    color: #ffffff !important;
    background-color: #59c0ed;
    border-color: #59c0ed;
    text-align: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    line-height: 1.5;
    vertical-align: middle;
    text-decoration: none !important;
    font-weight: normal !important;
  }

  .httpclickbutton:hover {
    background-color: #46aede;
    border-color: #46aede;
    text-decoration: none !important;
    font-weight: normal !important;
  }

  #btn_refresh {
    position: relative;
    top: 0;
    margin-left: 0;
  }

  #btn_refresh::after {
    content: '';
  }

  #btn_refresh.floating {
    position: fixed;
    top: 10px;
    z-index: 9999;
    right: 100%;
  }

  #btn_refresh.floating::after {
    content: ">>";
  }


  // Architecte frequent 
  .bloc[class*="architecte"] {
    margin-bottom: 1em;

    .form-libelle {
      text-transform: capitalize;
    }
  }

  [title="Sauvegarder cet architecte"] {
    overflow: hidden;
    white-space: nowrap;
  }

  .field.field-type-jsontotab {
    grid-column: 1 / -1;

    .form-content {
      grid-column: 1 / -1;
    }

    .gridjs.gridjs-container {
      width: 100%;
    }
  }

  // Sous forme consultation

  #sousform-consultation {
    .button-ser-them input {
      margin: 0 auto;
    }
  }

  .field-ser-them {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
  }

  .field-ser-them.ser-them {
    justify-content: space-between;
    gap: 2em;
    width: 100%;
    padding: 1em 0;
  }


  .list-ser-them,
  .list-sel-ser-them {
    background-color: #FFFFFF;
    border-radius: .25em;
    border: solid 1px #999;
    width: 100%;
    min-height: 125px;
    max-height: 400px;
    overflow: auto;
    cursor: pointer;
  }

  .button-ser-them {
    list-style-type: none;
    align-self: center;
  }

  .button-ser-them ul {
    text-align: center;
    list-style-type: none;
  }

  .button-ser-them li {
    margin-top: 25px;
  }

  .list-sel-ser-them {
    overflow: auto;
  }


  .liste_gauche_service {
    display: block;
    line-height: 1.3;
    padding: .25em 1em;

    +.liste_gauche_service {
      border-top: solid 1px $gris200
    }
  }

  .liste_gauche_service:hover,
  .liste_gauche_them:hover,
  .liste_droite_service:hover {
    background-color: $brandColor;
  }

  .liste_gauche_them,
  .row_title {
    background-color: #E2E2E2;
    border-top: 1px solid #CDCDCD;
    font-weight: bold;
    padding: .5em 1em;
  }

  .list-ser-them .liste_gauche_service_selected,
  .list-sel-ser-them .liste_droite_service_selected {
    background-color: $brand700;
    color: #fff;
  }

  .list-sel-ser-them-title {
    font-weight: bold;
  }

  div.row {
    width: 100%;
    display: flex;
    align-items: center;
    padding: .5em 1em;

    +.row {
      border-top: solid 1px $gris200
    }
  }

  div.cell1 {
    flex: 5
  }

  div.cell2 {
    flex: 1;
    text-align: center;
  }

}

#tab-bible {
  border-radius: .5em;
  border-collapse: collapse;

  th,
  td {
    border: solid 1px $gris200;
    padding: .5em;
  }
}

// SUIVI DES DATES 

fieldset#fieldset-sousform-instruction-dates.instruction--suivi-dates {
  .fieldsetContent {
    @media screen and (min-width:1000px) {
      flex-direction: row;
      gap: 5vw;
    }
  }

  .field:not([class$="field-type-hidden"]):not([class$="field-type-hiddendate"]):not(.field-type-previsualiser_pdf):not([class*="field-type-html"]) {
    grid-template-columns: 1fr 150px;
  }
}