/*
===============================================================================
 This file contain CSS rules loaded on the YunoHost user portal.
===============================================================================
*/

/* ==========================================================================
   0 = Fonts
   1 = Global
   2 = Apps
   3 = User
   4 = Form
   5 = Footer
   6 = Colors
   7 = Internet Explorer
   ========================================================================== */

/* ==========================================================================
   0 = Fonts
   ========================================================================== */
@font-face {
  font-family: 'ynh_ssowat';
  src: url('fonts/ynh_ssowat/ynh_ssowat.eot');
}

@font-face {
  font-family: 'ynh_ssowat';
  src: url(data:application/x-font-ttf;charset=utf-8;base64,[encoded data, 7340 characters]) format('truetype'),
     url(data:application/font-woff;charset=utf-8;base64,[encoded data, 4608 characters]) format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
    font-family: 'source_sans_probold';
    src: url('sourcesanspro-bold-webfont.eot');
    }

@font-face {
    font-family: 'source_sans_probold';
    src: url(data:application/x-font-woff;charset=utf-8;base64,[encoded data, 39564 characters]) format('woff'),
         url('sourcesanspro-bold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'source_sans_proregular';
    src: url('sourcesanspro-regular-webfont.eot');
    }

@font-face {
    font-family: 'source_sans_proregular';
    src: url(data:application/x-font-woff;charset=utf-8;base64,[encoded data, 39896 characters]) format('woff'),
         url('sourcesanspro-regular-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================================================
   1 = Global
   ========================================================================== */

* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

html {
  font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100%; /* 2 */
  height: 100%;
}

body {
  background: #41444f;
  background-image: url('../img/background.jpg');
  background-size: auto;
  font-family: 'source_sans_proregular';
  font-size: 1em;
  line-height:1.5;
  margin: 0;
  padding: 0;
  height: 100%;
  top: 0;
  position: absolute;
  width: 100%;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child,
p:first-child,
ul:first-child,
ol:first-child,
dl:first-child{
  margin-top: 0;
}




/* Responsive image */
img {
  max-width: 100%;
  height :auto;
}

.element-invisible {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}


/* Layout */
.content {
  padding: 2%;
}

.logged .content {
  width: 100%;
  height: 100%;
  overflow: auto; /* scroll .content, not body for easier background customization */
}

.ynh-wrapper {
  width: 90%;
  margin: 2% 5%;
  position: relative;
  z-index: 1;
}
.ynh-wrapper:before,
.ynh-wrapper:after {content: " ";display: table;}
.ynh-wrapper:after {clear: both;}

/* Logo */
.ynh-logo {
  opacity: 0.8;
  margin-top: 6em;
  width: 100%;
  height: 9em;
  background-image: url("../img/logo.png");
  background-repeat: no-repeat;
  background-position: center 100%;
  background-size: contain;
}

.logged .ynh-logo {
  position: fixed;
  width: 5em;
  height: 5em;
  bottom: 20px;
  right: 20px;
  z-index: 0;
  opacity: 0.7;
  background-position: center center;
}

.ynh-panel-active .ynh-logo {
  display: none;
}

.in_app_overlay .ynh-logo {
  display: none;
}

/* messages */
.messages {
  color: #FFF;
  margin-bottom: 1em;
  text-align: center;
  max-width: 21em;
  margin: 2% auto 1em auto;
  padding: 1.5em;
}
.messages.danger { background: #c0392b; }
.messages.warning { background: #e67e22; }
.messages.success { background: #27ae60; }
.messages.info { background: #2980b9; }

.logged .messages {
  max-width: none;
  margin: 2% 5%;
  padding: 1.5em 15%;
}


/* Fonts & Colors */

a { text-decoration: none; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'source_sans_probold';
  font-weight: normal;
}

/* headings */
h1,
.h1 {
  font-size: 2.5em;
}

h2,
.h2 {
  font-size: 1.8em;
}

.cwhite {
  color: #fff;
}

select,
.form-text,
textarea {
  border: 0;
  font-family: 'source_sans_proregular';
}


/* Icons */

[class^="icon-"]:before, [class*=" icon-"]:before {
  font-family: 'ynh_ssowat';
  font-size: 1em;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  margin-right: 0.5em;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-user:before { content: '\e801'; }
.icon-lock:before { content: '\e800'; }
.icon-connexion:before { content: '\e802'; }
.icon-pencil:before { content: '\e804'; }
.icon-trash:before { content: '\e80c'; }
.icon-angle-left:before { content: '\e803'; }


/* ==========================================================================
   2 = Apps
   ========================================================================== */

.apps { margin: 4% 5%; }

.listing-apps {
  margin: 0;
  padding: 0;
  letter-spacing: -5px; /*fix bug ff PC*/
  font-family: 'source_sans_probold';
}

.listing-apps li {
  display: inline-block;
  vertical-align: top;
  letter-spacing: normal;
  list-style: none;
  margin: 0 0 1.5em 1.5em;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.4),
              -2px -2px 3px 0 rgba(0, 0, 0, 0.7) inset;
}

.listing-apps a {
  display: block;
  position: relative;
  padding: 0.4em;
  top: 0;
  left: 0;
  width: 4em;
  height: 4em;
  background: #666;
  color: #fff;
  font-size: 4em;
          transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
}
  .listing-apps a:hover,
  .listing-apps a:focus {
    left: -10px;
    top: -10px;
    box-shadow: none;
  }
  .listing-apps a:hover:before,
  .listing-apps a:focus:before {
    height: 10px;
  }
  .listing-apps a:hover:after,
  .listing-apps a:focus:after {
    width: 10px;
  }

  .listing-apps a:hover:after,
  .listing-apps a:focus:after,
  .listing-apps a:hover:before,
  .listing-apps a:focus:before {
    background: #333;
  }

  .listing-apps a:after,
  .listing-apps a:before {
    content: "";
    position: absolute;
            transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
  }

  .listing-apps a:before {
    width: 100%;
    height: 0;
    left: 5px;
    top: 100%;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
            transform: skew(45deg, 0deg);
    -webkit-transform: skew(45deg, 0deg);
  }

  .listing-apps a:after {
    width: 0;
    height: 100%;
    left: 100%;
    top: 5px;
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.4);
            transform: skew(0deg, 45deg);
    -webkit-transform: skew(0deg, 45deg);
  }

  .listing-apps span {
    display: block;
    margin: -1.2em 0 0 0.2em;
  }
  .listing-apps .first-letter {
    margin: 0;
    display: inline-block;
  }
  .listing-apps .name {
    font-family: 'source_sans_proregular';
    font-size: 0.2em;
  }

@media screen and (max-width: 450px) {
  .apps {margin: 10% 5%;}
  .listing-apps a {font-size: 3em;}
  .listing-apps span + span { font-size: 0.32em; }
  .listing-apps a:hover,
  .listing-apps a:focus {left: -5px;top: -5px;}
  .listing-apps a:hover:before,
  .listing-apps a:focus:before {height: 5px;}
  .listing-apps a:hover:after,
  .listing-apps a:focus:after {width: 5px;}
  .listing-apps a:before {left: 3px;box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);}
  .listing-apps a:after {top: 3px;box-shadow: 3px 0 5px rgba(0, 0, 0, 0.4);}
}
@media screen and (max-width: 350px) {
  .listing-apps a {
    width: 2.5em;
    height: 2.5em;
    font-size: 2.8em;
  }
}


/* ==========================================================================
   3 = User
   ========================================================================== */

.user-container {
  display:block;
  position: relative;
  max-width: 320px;
  padding: 0.4em 1em;
  color: #fff;
}

.user-container:before {
  display: block;
  position: relative;
  z-index: 1;
  float: left;
  margin-right: 10px;
  content: '';
  display: block;
  font-family: 'ynh_ssowat';
  font-size: 4em;
  text-align: center;
  width: 1.3em;
  height: 1.3em;
  border-radius: 90px;
  background: url('../img/logo.png');
  background-size: contain;
  color: #dedede;
  overflow: hidden;
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}
.user-container:hover:before {
  color: #fff;
}

.user-container .user-username {
  font-size: 1.5em;
  margin: 0;
}

.user-container .user-fullname {
  font-size: 1em;
  font-family: 'source_sans_proregular';
  display: block;
  margin-top: -0.6em;
}


.user-container-info .user-username:after {
  content: '\e804';
  font-family: 'ynh_ssowat';
  color: #b4b4b4;
  display: inline-block;vertical-align: text-top;
  font-size: 0.8em;
  width: 1em;
  height: 1em;
  margin-left: .5em;
  opacity: 0;
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}

.user-container .user-mail {
  color: #999;
  font-size: 0.9em;
  display: block;
  margin-top: -0.2em;
}

/* User menu */
.user-menu {
  float: right;
  margin: 0;
  padding: 0;
}
  .user-menu li {
    list-style: none;
  }
  .user-menu a {
    color: #999;
    display: block;
    padding: 1.25em 1em;
    position: relative;
    z-index: 1;
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
  }
    .user-menu a:hover,
    .user-menu a:focus {
      color: #fff;
    }

@media screen and (max-width: 480px) {
  .user-menu {
    float: none;
  }
}



/* ==========================================================================
   4 = Forms
   ========================================================================== */

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
}

input[type="search"] {
    -webkit-appearance: textfield;
}
[type="submit"],
[type="password"],
[type="email"],
[type="text"] {
  /* <3 Apple */
  -webkit-appearance: none;
  -webkit-border-radius:0;
}

input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

@media screen and (-webkit-min-device-pixel-ratio:0){
  select{
    -webkit-appearance: none;
    border-radius: 0;
  }
}

.form-text {
  padding: 0.8em;
  width: 100%;
}


.form-section {
  display: inline-block;
  vertical-align: top;
  width: 47%;
}
.form-section + .form-section {margin-left: 5%;}

@media screen and (max-width: 768px) {
  .form-section {width: 100%;}
  .form-section + .form-section {margin-left: 0;}
}

label {
  display: inline-block;
  padding: 0.3em 1em;
  background: #30333b;
  color: #fff;
  font-size: 1.2em;
  margin-top: 1em;
  font-family: 'source_sans_probold';
  font-weight: normal;
}
label {cursor: pointer;}

label + .help-link {
  display: inline-block;
  padding: 0.3em 1em;
  font-size: 1.2em;
  background: #41444f;
  color: #fff;
  font-weight: bold;
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}
label + .help-link:hover {background: #30333b;}

.form-group {
  background: none;
  margin-bottom: 2em;
}

.form-text {
  border: 0;
  background: #797b83;
  color: #fff;
  padding: 0.8em;
  margin-bottom: 0.3em;
  display: block;
  position: relative;z-index: 1; /* prevent strange label overlap */
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}
.form-test:-moz-placeholder{color:#ccc;}
.form-text::-moz-placeholder{color:#ccc;}
.form-text:-ms-input-placeholder{color:#ccc;}
.form-text::-webkit-input-placeholder{color:#ccc;}
:empty:invalid {box-shadow: none;}

.form-text:last-child {margin-bottom:0;}

.form-text:hover,
.form-text:focus {
  background-color: #5d5f68;
}

.form-text:disabled { color: #ccc; }
.form-text:disabled:hover {background-color:rgba(255, 255, 255, 0.3);}
input:disabled {
  cursor: not-allowed;
}

@media screen and (max-width: 480px) {
  label,
  label + .help-link {padding: 0.3em 0.8em;}
  .form-text {padding: 0.8em;}
  .form-group .btn {padding: 0.5em 0.8em;}
}



/* Buttons */
.btn {
  background: #999;
  display: inline-block;
  padding: 0.5em 1em;
  line-height: normal;
  text-decoration: none;
  color: #FFF;
  cursor: pointer;
          transition: all 0.1s ease;
  -webkit-transition: all 0.1s ease;
}

.large-btn {
  padding: 0.8em 1.5em;
  font-size: 1.1em;
}

button.btn,
input.btn {
  border:0;
  cursor:pointer;
}

  .btn:hover,
  .btn:focus {
    background: #AAA;
  }

.important-btn { background: #c0392b;}
  .important-btn:hover,
  .important-btn:focus {background: #e74c3c;}

.validate-btn { background: #27ae60;}
  .validate-btn:hover,
  .validate-btn:focus {background: #2ecc71;}

.warning-btn { background: #e67e22;}
  .warning-btn:hover,
  .warning-btn:focus {background: #f39c12;}

.classic-btn { background: #2980b9;}
  .classic-btn:hover,
  .classic-btn:focus {background: #3498db;}

.link-btn { background: none;}
  .link-btn:hover,
  .link-btn:focus {background: #41444f;text-decoration: underline;}


.btn-group {
  margin: 4em 0;
  text-align: right;
}

/* Login form */

.login-form {
  max-width: 21em;
  margin: 0 auto;
}

.login-form .btn {
  width: 100%;
  padding: 0.8em 1em;
}

.login-form .form-group {
  position: relative;
  margin-bottom: 1em;
  background: #fff;
}

  .login-form label {
    display: block;
    min-width: 1em;
    margin: 0;
    padding: 0;
    font-size: 1em;
  }

  .login-form label:before {
    background: #eee;
    color: #666;
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 2.5em;
    height: 100%;
    line-height: 3em;
    text-align: center;
  }

  .login-form .form-text {
    padding: 0.8em 0.8em 0.8em 3em;
    width: 100%;
    background: #fff;
    color: #41444f;
  }
  .login-form .form-test:-moz-placeholder{color:#999;}
  .login-form .form-text::-moz-placeholder{color:#999;}
  .login-form .form-text:-ms-input-placeholder{color:#999;}
  .login-form .form-text::-webkit-input-placeholder{color:#999;}


/* Edit form*/

.form-edit .form-group .btn:before {
  content:"+";
  display: inline-block;
  padding-right: 0.75em;
  font-weight: bold;
}


@media screen and (min-width: 768px) {
  .form-edit .btn-group {
    float: right;
  }
  .form-edit .btn-group + .btn-group {
    float: left;
  }
}


/* ==========================================================================
   5 = Footer
   ========================================================================== */

.footer {
  display: inline-block;
  width: auto;
}
  .footer nav {
    margin: 0 1em;
    padding: 0.25em;
    border-top: 1px solid #666;
    font-size: 0.9em;
  }

  .footer a {
    display: inline-block;
    vertical-align: top;
    color: #999;
  }
  .footer a:before {
    content: "•";
    display: inline-block;
    vertical-align: top;
    padding: 0 0.5em 0 0.25em;
    color: #666;
  }
  .footer a:first-child:before {content: none;}

  .footer a:hover,
  .footer a:active {
    color: #fff;
    text-decoration: none;
  }

@media screen and (max-width: 480px) {
  .footer a {
    display: block;
  }
  .footer a:before {
    content: none;
  }
}

/* ==========================================================================
   Internet Explorer
   ========================================================================== */

/*IE8 and IE9*/

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
    display: block;
}

