/* FAN 20261003 - responsive : desktop a partir de 769px (avant 768px -> chevauchement avec le max-width: 768px) */
@media (min-width: 769px) {
  body,
  #main,
  #content {
    min-height: 100%;
  }
  #sidebar {
    position: fixed;
    width: 300px;
    top: 0;
    right: 0;
    bottom: 0;
  }
  #content {
    padding: 0 300px 0 0;
  }
}
@media (max-width: 768px) {
  #sidebar img {
    display: none !important;
  }
}

/* FAN 20261003 - footer fixe uniquement en desktop (sur mobile il recouvrait le contenu) */
@media (min-width: 769px) and (min-height: 740px) {
  #sidebar .footer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 300px;
  }
}

.topheader {
  color: #6a6a6a;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  text-align: center;
  margin-top: 0;
}

#header {
  overflow: hidden;
}

#sidebar {
  background: #614385; /* fallback for old browsers */
  background: linear-gradient(
    to left,
    #614385,
    #753881
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  box-shadow: -2px 0px 10px 0px rgba(0, 0, 0, 0.4);
  z-index: 2;
  color: #fafafa;
  padding: 20px;
  box-sizing: border-box;
}

#sidebar img {
  width: 150px;
  margin: 0 auto;
  display: block;
}

#sidebar a {
  color: #fafafa;
}

#sidebar .fa {
  text-align: center;
  margin-right: 10px;
  width: 20px;
}

#sidebar .footer p {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

#menu a:hover,
#menu a:active {
  color: #614385;
}

#menu a:focus {
  background-color: transparent !important;
  color: #fafafa !important;
}

#menu li {
  margin-top: 5px;
}

#menu li.active a {
  background: #eee;
  color: #614385;
}

#login h1,
#login label {
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
}

#content {
  background: #fafafa;
}

h1#header {
  font-family: "Baloo", cursive;
  font-size: 38px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  color: #5f4689;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  padding: 0 15px;
  margin: 0;
  background: url("/img/bg_entete_clear.jpg") white no-repeat top right;
  height: 119px;
  line-height: 119px;
}

.panel-custom {
  background: #fff;
  margin: 30px 20px;
  box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);
  padding: 15px;
}

.nav-tabs a {
  color: #614385;
}

table a {
  color: #614385;
}

blockquote {
  margin: 0;
}

ul.no-bullet {
  margin: 20px 0;
  list-style-type: disc;
  padding-left: 10px;
}

ul.no-bullet li {
  margin: 2px 0;
}

.select2 {
  width: 100% !important;
}

.banner {
  margin: 10px;
  text-align: center;
}

.pagination {
  width: 100%;
  padding: 0 30px;
  margin: 0;
}

.pagination .previous {
  float: left;
}
.pagination .next {
  float: right;
}

/* FAN 20261003 - responsive mobile / tablette :
   logo en premier, puis formulaire de connexion (ou menu), puis bannieres / actualites */
@media (max-width: 768px) {
  #main {
    display: flex;
    flex-direction: column;
  }
  #content {
    display: contents;
  }
  #content > #header {
    order: 0;
  }
  #sidebar {
    order: 1;
    width: 100%;
  }
  #content > :not(#header) {
    order: 2;
  }

  h1#header {
    height: 70px;
    line-height: 70px;
    font-size: 28px;
    background-size: auto 100%;
  }
  h1#header img {
    height: 54px !important;
    margin-top: 8px !important;
    margin-right: 10px !important;
  }

  #login h1,
  #sidebar > h1 {
    font-size: 26px;
    margin-top: 0;
  }
  /* evite le zoom automatique iOS sur les champs */
  #sidebar .form-control {
    font-size: 16px;
  }

  /* blocs avec marges / largeurs en dur (flash, popups mot de passe / double authentification) */
  body > .alert,
  #css_ajout {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
  .panel-custom {
    margin: 15px 10px !important;
    padding: 15px !important;
    width: auto !important;
    max-width: none !important;
    overflow-x: auto;
  }
  .panel-custom img {
    max-width: 100%;
    height: auto;
  }

  /* bannieres : le texte saisi en base contient des marges / largeurs en dur
     (ex. div avec margin-left/right 130px) qui ecrasent le contenu sur mobile */
  .banner {
    margin: 10px;
    padding: 10px;
    overflow-wrap: break-word;
  }
  .banner * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .banner img,
  .banner table {
    width: auto !important;
    height: auto;
  }
  .banner [style*="justify"] {
    text-align: left !important;
  }

  .topheader {
    font-size: 26px;
  }
  .pagination {
    padding: 0 10px;
  }
}
