/**
 * @file
 * Positioning for a responsive layout.
 *
 * Define CSS classes to create a fluid grid layout with optional sidebars
 * depending on whether blocks are placed in the left or right sidebars.
 *
 * This layout uses the Zen Grids plugin for Compass: http://zengrids.com
 */

/**
 * Center the page.
 *
 * For screen sizes larger than 1200px, prevent excessively long lines of text
 * by setting a max-width.
 */
#page_carrefour,
.region-bottom {
  margin-left: auto;
  margin-right: auto;
}

/* Apply the shared properties of grid items in a single, efficient ruleset. */
#header,
#header_grics,
#content,
#navigation,
#recherche,
#footer,
#footer_grics {
  padding-left: 10px;
  padding-right: 10px;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  word-wrap: break-word;
  _display: inline;
  _overflow: hidden;
  _overflow-y: visible;
}

/* Containers for grid items and flow items. */
#header,
#header_grics,
#main,
#footer,
#footer_grics {
  *position: relative;
  *zoom: 1;
}

#header:before,
#header:after,
#main:before,
#main:after,
#footer:before,
#footer:after,
#footer_grics:before,
#footer_grics:after {
  content: "";
  display: table;
}

#header:after,
#header_grics, :after,
#main:after,
#footer:after,
#footer_grics:after {
  clear: both;
}

#navigation {
  /* Move the navbar up inside #main's padding. */
  position: absolute;
  top: 0;
  height: 35px;
}

/* Boite de recherche */
#header .zone {
  white-space: nowrap;
}

#header #header_zone_1 {
  float: left;
}

#header #header_zone_2_et_3 {
  float: right;
}

div.region-header {
  float: right;
}

div.block-recherche-carrefour {

}

#block-recherche-carrefour-recherche-textuelle,
#block-contexte-eleve-choix-contexte-eleve {
  margin-bottom: 5px;
}

#recherche-carrefour-recherche-textuelle-form div {
  padding: 0;
}

div.form-item-recherche-texte {
  width: auto;
  float: left;
  margin: 0;
  padding: 0;
}

div.block-recherche-carrefour #edit-recherche-texte {
  border: 1px solid #d2d2d2;
  height: 38px;
  width: 100%;
  padding-left: 8px;
}

div.block-recherche-carrefour #edit-soumettre {
  background: #ff6319 url("../../images/bouton-recherche.png") no-repeat scroll center center;
  width: 38px;
  height: 38px;
  border: 0px solid;
}

#navigation {
  width: 100%;
  max-width: 940px;
}

#main {
  position: relative;
}

/**
 * Écran avec une résolution inférieur à 420px
 */
@media all and (max-width: 420px) {
  body {
    font-size: 85%;
  }

  .onglets {
    padding-bottom: 4px;
  }

  .onglets li {
    padding: 0px;
    margin-left: 0px;
    font-size: .8em;
    line-height: 20px;
    margin-bottom: 0;
  }

  .onglets li a {
    padding: 8px 7px;
  }
}

/**
 * Écran avec une résolution supérieur à 420px
 */
@media all and (min-width: 421px) {
  body {
    font-size: 90%;
  }

  .nouvelles .titre,
  .nouvelles .sommaire {
    max-height: 66px;
    line-height: 22px;
  }

  .contenu-plateforme .field-name-field-plateforme.field-type-field-collection .field-item {
    width: auto;
    margin-right: 15px;
  }

}

/**
 * Écran avec une résolution inférieur à 480px
 */
@media all and (max-width: 480px) {

  /* Faire disparaitre les images dans les tables losque l'espace vient à manquer */
  table img {
    display: none;
  }

  .nouvelles .views-row {
    height: auto;
  }

  .nouvelles .image {
    height: auto;
    max-height: none;
  }

  #block-views-nouvelles-block .block-title,
  #block-views-nouvelles-block-1 .block-title {
    height: auto;
  }

  div.block-recherche-carrefour #edit-recherche-texte {
    width: 200px;
  }

  .pictogramme {
    margin-right: 2px;
  }

  /* Retire le « et » de « Ministères et organismes » */
  span.importance_basse {
    display: none;
  }

  /* Après avoir retiré le « et », met le « o » en majuscules */
  span.importance_basse + span {
    text-transform: capitalize;
  }
}

@media all and (min-width: 481px) {
  #block-views-nouvelles-block,
  #block-views-nouvelles-block-1 {
    width: 44.7%;
  }

  #block-views-nouvelles-block,
  #block-views-nouvelles-block-1 {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 15px;
    position: absolute;
    top: 0px;
    background-color: #fefefe;
    border-bottom: 1px solid #e3e3e3;
  }

  #block-views-nouvelles-block {
    left: 0px;
  }

  #block-views-nouvelles-block-1 {
    right: 0%;
  }

  /* Pour la page d'accueil : On veut avoir les nouvelles et les nouvelles de partenaires séparés */
  body.front #content {
    position: relative;
    background-color: transparent;
  }

  body.front #content .messages--status {
    position: relative;
    top: -32px;
    z-index: 1000;
  }
}

/**
 * Écran avec une résolution supérieur ou égal à 420px et inférieur à 768px
 */
@media all and (min-width: 420px) and (max-width: 768px) {
  div.block-recherche-carrefour #edit-recherche-texte {
    width: 100%;
  }

  .onglets li {
    margin-bottom: 6px;
  }
}

/**
 * Écran avec une résolution supérieur ou égal à 480px et inférieur à 768px
 */
@media all and (min-width: 480px) and (max-width: 768px) {
  /* Fix pour la page d'accueil, car les deux colonnes de nouvelle brise le footer. */
  body.front .footer_push {
    height: 1275px;
  }
}

/**
 * Écran avec une résolution inférieur à 768px
 */
@media all and (max-width: 768px) {

  body {
    background-image: none;
  }

  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    display: none;
    position: fixed;
    right: 0px;
    top: 55px;
    width: 100%;
    z-index: 2;
  }

  #header #header_zone_2_et_3 {
    padding: 0px;
  }

  #header #header_zone_2 {
    width: 65%;
    float: left;
  }

  #header #header_zone_3 {
    display: block;
  }

  .header__region.region.region-header {
    width: 100%;
  }

  #site-name span {
    background-image : url("../../images/hibou-seul.png");
    background-repeat: no-repeat;
    background-position-x: left;
    padding-left: 50px;
  }

  .header__site-name {
    font-size: 1.75em !important;
  }

  .liste .view-header {
    display : block;
  }

  #header.header_fixe #block-contexte-eleve-choix-contexte-eleve {
    display: none;
  }

  #block-recherche-carrefour-recherche-facette {
    border-bottom: 2px solid black;
    overflow: scroll;
    border-radius: 10px;
    box-shadow: 0 10px 15px #37424a;
  }

}

/**
 * Écran avec une résolution supérieur ou égal à 768px
 */
@media all and (min-width: 769px) {
  #header #header_zone_3 {
    display: none;
  }

  body {
    font-size: 95%;
  }

  .nouvelles .titre,
  .nouvelles .sommaire {
    max-height: 66px;
    line-height: 22px;
  }

  #page {
    margin: 0 auto -12em;
  }

  #footers,
  .footer_push {
    height: 12em;
  }

  #footer_grics {
    height: 6em;
  }

  #footer_carrefour {
    height: 6em;
  }

  #footer_carrefour li {
    display: inline;
    border-left: 2px solid #37424A;
  }

  #footer_carrefour li:first-child {
    border-left: 0px;
  }

  #footer_carrefour li a {
    margin-right: 10px;
  }

  .menu_footer {
    float: right;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  #medias_sociaux a {
    float: right;
  }

  /**
   * The layout when there is only one sidebar, the left one.
   */
  /* Span 4 columns, starting in 2nd column from left. */
  .sidebar-first #content {
    float: left;
    width: 70%;
    margin-left: 30%;
    margin-right: -100%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    float: left;
    width: 29%;
    margin-left: 0%;
    margin-right: -30%;
  }

  /**
   * The layout when there is only one sidebar, the right one.
   */
  /* Span 4 columns, starting in 1st column from left. */
  .sidebar-second #content {
    float: left;
    width: 80%;
    margin-left: 0%;
    margin-right: -80%;
  }

  /* Span 1 column, starting in 5th column from left. */
  .sidebar-second .region-sidebar-second {
    float: left;
    width: 20%;
    margin-left: 80%;
    margin-right: -100%;
  }

  /**
   * The layout when there are two sidebars.
   */
  /* Span 3 columns, starting in 2nd column from left. */
  .two-sidebars #content {
    float: left;
    width: 60%;
    margin-left: 20%;
    margin-right: -80%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .two-sidebars .region-sidebar-first {
    float: left;
    width: 20%;
    margin-left: 0%;
    margin-right: -20%;
  }

  /* Span 1 column, starting in 5th column from left. */
  .two-sidebars .region-sidebar-second {
    float: left;
    width: 20%;
    margin-left: 80%;
    margin-right: -100%;
  }

  #header #header_zone_1 {
    float: left;
    width: auto;
    padding-top: 5px
  }

  #header #header_zone_2_et_3 {
    width: auto;
    padding: 17px 0px 0px 0px;
  }

  .nouvelles .lien {
    font-size: 18px;
    margin: 0;
  }

  #block-contexte-eleve-choix-contexte-eleve {
    float: right;
  }

}
/**
 * Écran avec une résolution supérieur ou égal à 768px et inférieur à 940px
 */
@media all and (min-width: 769px) and (max-width: 940px) {
  #header #header_zone_2_et_3 {
    width: 50%;
    padding-right: 38px;
  }

  /* Pour embarquer par dessus le padding défini plus haut */
  #block-contexte-eleve-choix-contexte-eleve {
    position: relative;
    right: -38px;
  }

  .onglets li {
    margin-bottom: 7px;
  }

}

/**
 * Écran avec une résolution supérieur ou égal à 941px
 */
@media all and (min-width: 941px) {
  body {
    font-size: 100%;
  }

  .nouvelles .titre,
  .nouvelles .sommaire {
    max-height: 69px;
    line-height: 23px;
  }
}

/**
 * Écran avec une résolution supérieur ou égal à 1360px
 */
@media all and (min-width: 1360px) {
  body {
    background-image: url("../../images/hibou.png");
    background-position: -75px 0px;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  body.page-404 {
    background-image: url("../../images/hibou_404.png");
  }
}

/**
 * Écran avec une résolution supérieur ou égal à 1510px
 */
@media all and (min-width: 1510px) {
  body {
    background-position: 0px 0px;
  }
}
