@import 'variables';
@import 'font';
@import 'icons';
@import 'reset';
@import 'form';
@import 'buttons';
@import 'layout';
@import 'results';
@import 'components/collection';
@import 'components/datepicker';
@import 'components/map';
@import 'components/modal';
@import 'components/pagination';
@import 'components/tab';
@import 'search';
@import 'utils';

a {
  color: $color-primary;
  text-decoration: none;
}

body {
  background: $background-primary;
  color: $color-primary;
  font: 1.3em / 1.3 'ITC Avant Garde Gothic Std', Arial, Helvetica, sans-serif;
}

img {
  border: 0;
}

label {
  [for='username'],
  [for='password'] {
    display: none;
  }
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

thead,
tfoot {
  td,
  th {
    background: #666;
    color: #fff;
    font-weight: normal;

    &[colspan] {
      text-align: center;
    }
  }
}

.attachments {
  a {
    background: url('../images/screen/paperclip.svg') no-repeat;
    background-size: auto 100%;
    display: block;
    padding-left: 2em;
  }
}

.bold {
  font-weight: bold;
}

.clear {
  clear: both;
  height: 0;
}

.disabled {
  opacity: .7;
}

.highlighted {
  td {
    background: #36b5eb;
    color: $color-secondary;

    a {
      color: $color-secondary;
    }
  }
}

.interested {
  td:last-child {
    background: $color-la-rioja;
    color: $color-secondary;

    a {
      color: $color-secondary;
    }
  }
}

.nav li.current > a,
.menuCatalogue li.current a,
.menuStat ul li.current a,
.menuSettings ul li.current a {
  color: #35b2e8;
}


// CATALOGUE
.titre,
.topList {
  font-family: 'ITC Avant Garde Std XLt';
  font-size: 25px;
}

.titre {
  p {
    display: inline;
  }

  .edit {
    float: right;
    margin: 10px 0 30px;
  }
}

.catalogueActif {
  clear: both;
  margin: 0 0 70px;
  padding: 0 0 0 73px;
}

.menuCatalogue li,
.menuStat ul li,
.menuSettings ul li {
  display: inline-block;
  padding: 0 1em 1em 0;
}

.menuCatalogue li.first,
.menuStat ul li.first,
.menuSettings ul li.first {
  padding-left: 0;
}

.menuCatalogue li.last,
.menuStat ul li.last,
.menuSettings ul li.last {
  padding-right: 0;
}

.menuCatalogue li a.seeBtn,
.menuStat ul li a,
.menuSettings ul li a {
  display: block;
}

.menuCatalogue li a.addBtn,
input[type='button'],
.exportBtn {
  background-position: 0 center;
  background-repeat: no-repeat;
  border: 0;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-weight: bold;
  padding: 10px 20px 10px 35px;
}

.seePdf,
.seeVisuel,
.seeVideo,
.seeAll {
  padding: 0 10px 0 35px !important;
}

.seePdf {
  background: url('../images/screen/picto_pdfb.png') no-repeat 0 center;
}

.seeVisuel {
  background: url('../images/screen/picto_imageb.png') no-repeat 0 center;
}

.seeVideo {
  background: url('../images/screen/picto_videob.png') no-repeat 0 center;
}

.seeAll {
  background: url('../images/screen/picto_eyeb.png') no-repeat 0 center;
}

.catalogue .topList {
  background: url('../images/screen/pictocatalogue.png') no-repeat 30px 0;
  float: left;
  font-size: 25px;
  height: 35px;
  margin-bottom: 15px;
  padding: 4px 0 0 73px;
}

.listCatalogue {
  border-left: 1px solid #c6c6c6;
  margin: 0 0 0 42px;
  padding: 0 0 0 31px;
}

.itemCatalogue {
  background: #e3e3e3;
  margin-bottom: 5px;
  padding: 10px;
  text-align: right;

  .catalogueName {
    float: left;

    p {
      margin: 0;
      padding: 0;
    }
  }
}

.itemCatalogue .edit,
.content .edit {
  float: right;
}

.element {
  background-color: #e3e3e3;
  background-position: 0 center;
  background-repeat: no-repeat;
  border-radius: 4px;
  box-sizing: border-box;
  display: table;
  margin-bottom: .5em;
  padding: 10px 12px 5px 35px;
  width: 100%;

  &.pdf {
    padding-left: 35px;
  }

  &.picture,
  &.video {
    background-image: none;
    padding-left: 12px;
  }

  > * {
    display: table-cell;
    vertical-align: middle;
  }

  img {
    margin-right: .5em;
    vertical-align: middle;;
  }

  figure > * {
    display: table-cell;
    vertical-align: middle;
  }

  .element-actions {
    text-align: right;

    li {
      display: inline-block;
      vertical-align: middle;

      & + li {
        margin-left: 1em;
      }
    }
  }
}

.ui-sortable .element,
#sortableLevel1 .element,
#sortableLevel2 .element,
#sortableLevel3 .element {
  cursor: move;
}

.content.ContentText {
  background-image: url('../images/screen/itemtext.png');
}

.content.ContentFormation {
  background-image: url('../images/screen/itemtheme.png');
}

.content.ContentImage {
  background-image: url('../images/screen/itemvisuel.png');
}

.level1 {
  margin-top: 20px;

  &.user a {
    display: block;
    word-wrap: break-word;
  }
}

.containerLevel1:first-child .level1 {
  margin-top: 0;
}

.containerLevel2,
.containerLevel3 {
  padding-left: 80px;
}

.listDomaines .content {
  margin-left: 80px;
}

.domaine,
.sousdomaine {
  p {
    float: left;
    margin: 0 10px 0 0;
    padding: 0;
  }
}

.edit,
.seeAll,
.delete-element,
.icon-delete,
.duplicate,
.search {
  background: transparent no-repeat top left / contain;
  border: 0;
  display: inline-block;
  height: 18px;
  overflow: hidden;
  vertical-align: middle;
  width: 18px;

  &[disabled] {
    opacity: .3;

    &[title] {
      &:hover {
        cursor: help;
      }
    }
  }

  > * {
    // Visually hide the content (but still accessible)
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
  }

  span {
    display: inline-block;
    margin-left: .25em;
  }
}

.seeAll {
  background-image: url('../images/screen/actions/seeAll.png');
}

.edit {
  background-image: url('../images/screen/actions/edit.png');
}

.delete-element,
.icon-delete {
  background-image: url('../images/screen/actions/delete.png');
}

.duplicate {
  background-image: url('../images/screen/actions/duplicate.svg');
}

.search {
  background-image: url('../images/screen/actions/search.png');
}

// Contenus d'une page (items, modules)
.page-content {
  margin-top: 6em;
  position: relative;

  .medias-type {
    display: inline-block;
    vertical-align: top;
    width: 48%;

    + .medias-type {
      margin-left: 4%;
    }
  }
}

.page-content-title {
  border-bottom: solid 1px #ccc;
  padding: 0 0 .5em 2em;
}

.page-content-actions {
  position: absolute;
  right: 2em;
  top: -16px;
}

.page-content-list {
  margin: 0 2em;
}

.page-content-single {
  background-color: #e3e3e3;
  border-bottom-left-radius: 1em;
  border-top-right-radius: 1em;
  margin-top: 2em;
  overflow-y: hidden;
  padding: 1em;
  position: relative;

  img {
    float: left;
    margin-right: 1em;
    max-height: 148px;
    max-width: 148px;
  }
}

.page-content-single-actions {
  border-bottom-left-radius: 1em;
  border-color: #ccc;
  border-style: solid;
  border-width: 0 0 2px 2px;
  display: table;
  float: right;
  padding: .25em 1em 0;
  position: relative;
  right: -1em;
  top: -1em;

  li {
    display: table-cell;
    padding-left: 1em;
    vertical-align: middle;

    &:first-child {
      padding-left: 0;
    }
  }
}

// EDIT
#content_bloc > div {
  margin-bottom: 10px;
}

#form {
  padding-top: 30px;
}

#catalogue,
#domain,
#content,
#subdomain {
  border-top: 1px solid #fff;
  padding-top: 30px;
}

#menu_simple,
#menu_url {
  border-top: 1px solid #fff;
  padding: 20px 0 0;
}

#cgenial_user_profile {
  padding: 20px 0;

  > div {
    overflow: hidden;
  }
}

.itemDemande {
  border-left: 1px solid #ccc;
  float: left;
  margin-bottom: 10px;
  padding: 0 15px 15px;
  width: 200px;
}

.borderBottom {
  border-bottom: 1px solid #b9b9b9;
  clear: both;
  margin-top: 30px;
}

#contentformation input[type='checkbox'] {
  margin: 0;
}

#contentformation_skill,
#contentformation_organization {
  float: right;
  width: 642px;
}

#contentformation_skill input[type='checkbox'],
#contentformation_organization input[type='checkbox'],
#contentformation_skill span.checkbox,
#contentformation_organization span.checkbox {
  clear: both;
  float: left;
}

// Operation PEE
#operation_pee,
#demande_pee,
#operation_itdlc {
  margin-top: 20px;
}

#operation_pee > div,
#demande_pee > div,
#operation_itdlc > div {
  margin-bottom: 10px;
}

.ope_inscrit,
.ope_preinscrit,
.ope_attente,
.ope_desistement,
.ope_traitement {
  float: left;
  margin: 10px 0;
  width: 170px;
}

.ope_preinscrit,
.ope_attente,
.ope_desistement,
.ope_traitement {
  border-left: 1px solid #ccc;
  padding: 0 15px;
}

.blockDispos {
  border: 1px solid #ccc;
  clear: both;
  overflow: hidden;
  padding: 15px;

  .container_item {
    border-bottom: 1px dotted #ccc;
    padding-top: 10px;

    &:first-child {
      padding-top: 0;
    }
  }

  .addModule {
    float: right;
    margin: 15px 0 0 10px;
  }
}

.blockTop {
  float: left;
  width: 50%;

  :nth-child(2n+1) {
    clear: left;
  }
}

#content_simple > div,
#media > div {
  clear: both;
}

#media > div,
#slider > div {
  clear: both;
  margin: 10px 0;
  overflow: hidden;
}

#media_menu {
  overflow: auto;
  width: 642px;

  .checkbox,
  .radio {
    clear: left;
  }
}

.Separator {
  background-image: url('../images/screen/picto_sepb.png');
}

.Fixe {
  background-image: url('../images/screen/picto_urlb.png');
}

.Simple,
.Liste ,
.Presentation {
  background-image: url('../images/screen/picto_pagesimpleb.png');
}

.ListChild,
.Media,
.Actualite {
  background-image: url('../images/screen/picto_listeb.png');
}

.flex .element-actions {
  display: flex;
  &>* {
    flex: 1;
    padding: 0 8px;
  }
}

.icon_media {
  background-position: 0 center;
    background-repeat: no-repeat;
    padding-left: 36px;
}
table td , table th {
  padding: 6px 12px;
}
th a {
  color: #fff;
}
tr.containerLevel1 {
  background: #eee;
}

.pdf {
  background-image: url('../images/screen/picto_pdfb.png');
}

.picture {
  background-image: url('../images/screen/picto_imageb.png');
  figure {
    display: flex;
    &>* {
      flex: 0 auto;
      padding: 0 12px;
      min-height: 48px;
    }
  }
  
}

.video {
  background-image: url('../images/screen/picto_videob.png');
}

.slide {
  background-image: url('../images/screen/picto_slideb.png');
}

.mce-tinymce {
  float: left !important;
  margin-bottom: 10px;
  width: 600px !important;
}

#content-pane {
  float: none !important;
  padding-left: 0 !important;
}

// Filtres utilisés dans les pages permettant le matching professeurs/ingénieurs
.filter {
  display: inline-block;
  margin-right: 4em;

  &:last-child {
    margin-right: 0;
  }
}

.container_selecteur {
  position: relative;

  span {
    width: 100px;
  }
}

.academy_actuelle {
  background: #fff;
  float: left;
  height: 26px;
  padding: 7px 5px 3px;
  width: 150px;
}

.selector {
  background: url('../js/custom-form-elements/select.png') no-repeat;
  float: left;
  height: 36px;
  width: 36px;
}

.list {
  background: #fff;
  clear: both;
  display: none;
  margin-left: 100px;
  padding: 7px 5px 3px;
  position: absolute;
  top: 26px;
  width: 150px;
}

.left {
  float: left;
}

.right {
  float: right;
}


span.countable-text {
  display: inline-block;
  max-width: 30vw;
}

#form-sms-campaign-add {
  .btn{
    padding: .65em 1em;
  }

  .form-row-field {
    position: relative;
  }

  button.btn-update-content {
    display: block;
    position: absolute;
    top: auto !important;
    left: 37vw;
    z-index: 10 !important;
  }
}

#form-moduleadd {
  #pictures_list_items, #videos_list_items {
    .form-row-field-child {
      float: left;
      position: relative;
      width: 30%;
      margin: 0 3.33% 10px 0;
      padding-left: 30px;
      box-sizing: border-box;

      &:nth-child(3n+4) {
        clear: left;
      }

      .checkbox {
        position: absolute;
        left: 0;
      }

      label {
        margin: 0;
      }
    }
  }
}

h1 {
  font-family: 'ITC Avant Garde Std XLt';

  strong {
    font-family: 'ITC Avant Garde Gothic Std';
  }

  a {
    color: $color-pelorous;
    
    &:hover, &:focus {
      color: #31708f;
    }
  }
}


p.faq-answer, div.faq-answer {
  display: block;
  padding: $base-spacing 2*$base-spacing;
  margin: $base-spacing 0;
  border-radius: 2px; 
  background: $color-white;

  > p:first-child {
      margin-top: 0;
  }

  > p:last-child {
      margin-bottom: 0;
  }
}

