/* *** LAYOUT ********************/

.mod {
  overflow: hidden;
}

/* blocks that needs to be placed under floats */
.clear,
.line,
.row { clear: both; }

/* blocks that must contain floats */
.clearfix:after,
.line:after,
.mod:after { content: ""; display: table; clear: both; }

/* table layout */
.row { display: table; table-layout: fixed; width: 100%; }
.row > *,
.col { display: table-cell; vertical-align: top; }

/* inline-block */
.inbl { display: inline-block; vertical-align: top; }

/* *** ALIGN ********************/
.left { float: left; }
.right { float: right; }

img.left { margin-right: 1em; }
img.right { margin-left: 1em; }
img.left,
img.right { margin-bottom: 5px; }

.center { margin-left: auto; margin-right: auto; }
.txtleft { text-align: left; }
.txtright { text-align: right; }
.txtcenter { text-align: center; }

/* *** WIDTH ********************/
.w10 { width: 10%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w33 { width: 33.3333%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w66 { width: 66.6666%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w90 { width: 90%; }
.w100 { width: 100%; }

.w50p { width: 50px; }
.w100p { width: 100px; }
.w150p { width: 150px; }
.w200p { width: 200px; }
.w300p { width: 300px; }
.w400p { width: 400px; }
.w500p { width: 500px; }
.w600p { width: 600px; }
.w700p { width: 700px; }
.w800p { width: 800px; }
.w960p { width: 960px; }
.mw960p { max-width: 960px; }
.w1140p { width: 1140px; }
.mw1140p { max-width: 1140px; }

.wauto { width: auto; }

/* *** SPACING ******************/

/* spacing helpers
p,m = padding,margin
a,t,r,b,l = all,top,right,bottom,left
10,20,30,0 = small(10px),medium(20px),large(30px),none(0)
*/

.m-reset,
.ma0 { margin: 0 !important; }

.p-reset,
.pa0 { padding: 0 !important; }

.ma10 { margin: 10px; }
.ma20 { margin: 20px; }
.ma30 { margin: 30px; }

.pa10 { padding: 10px; }
.pa20 { padding: 20px; }
.pa30 { padding: 30px; }

.mt0 { margin-top: 0; }
.mt10 { margin-top: 10px; }
.mt20 { margin-top: 20px; }
.mt30 { margin-top: 30px; }

.mr0 { margin-right: 0; }
.mr10 { margin-right: 10px; }
.mr20 { margin-right: 20px; }
.mr30 { margin-right: 30px; }

.mb0 { margin-bottom: 0; }
.mb10 { margin-bottom: 10px; }
.mb20 { margin-bottom: 20px; }

.mb30 { margin-bottom: 30px; }

.ml0 { margin-left: 0; }
.ml10 { margin-left: 10px; }
.ml20 { margin-left: 20px; }
.ml30 { margin-left: 30px; }

.pt0 { padding-top: 0; }
.pt10 { padding-top: 10px; }
.pt20 { padding-top: 20px; }
.pt30 { padding-top: 30px; }

.pr0 {  padding-right: 0; }
.pr10 { padding-right: 10px; }
.pr20 { padding-right: 20px; }
.pr30 { padding-right: 30px; }

.pb0 { padding-bottom: 0; }
.pb10 { padding-bottom: 10px; }
.pb20 { padding-bottom: 20px; }
.pb30 { padding-bottom: 30px; }

.pl0 { padding-left: 0; }
.pl10 { padding-left: 10px; }
.pl20 { padding-left: 20px; }
.pl30 { padding-left: 30px; }


/* *** FORMS ******************/

/* buttons */

.btn {
  display: inline-block;
}

/* forms items */

form,
fieldset {
  border: none;
}

input,
button,
select,
label,
.btn {
  vertical-align: middle;
  font-family: inherit;
  font-size: inherit;
}

label {
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
}

legend {
  border: 0;
  white-space: normal;
}

textarea {
  overflow: auto;
  /* Removes default vertical scrollbar on empty textarea in IE6/7/8/9 */
  min-height: 5em;
  vertical-align: top;
  font-family: inherit;
  font-size: inherit;
  resize: vertical;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  cursor: pointer;
  -webkit-appearance: button;
  /* clickable input types in iOS */
}

input[type="checkbox"],
input[type="radio"] {
  padding: 0;
  /* Corrects excess space around these inputs in IE8/9 */
}

input[type="search"] {
  -webkit-appearance: textfield;
}

/* if select styling bugs on WebKit */

/* 'x' appears on right of search input when text is entered. This removes it */

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

::-webkit-input-placeholder {
  color: #777;
}

input:-moz-placeholder,
textarea:-moz-placeholder {
  color: #777;
}

/* Removes inner padding and border in FF3+ */

button::-moz-focus-inner,
input[type='button']::-moz-focus-inner,
input[type='reset']::-moz-focus-inner,
input[type='submit']::-moz-focus-inner {
  border: 0;
  padding: 0;
}



/* *** GRIDS ******************/

/* grids inspired from SUIT https://github.com/suitcss/suit */
/* font-family hack explained here : https://github.com/raphaelgoetter/KNACSS/issues/37 */

.grid {
  /* overall container of grids */
  overflow: hidden;
}

.grid > * {
  /* global styles for direct child ex. .grid3 */
  display: block;
  padding: 0;
  margin-left: -20px;
  /* gutter value */
  text-align: left;
}

.grid > * > * {
  /* global styles for each "cell" */
  display: inline-block;
  padding-left: 20px;
  /* gutter value */
  margin-left: 0;
  vertical-align: top;
}

/* whitespace fixing for modern browsers including IE9+ */

:root .grid {
  font-size: 0;
}

:root .grid > * > * {
  font-size: 14px;
  /* fallback for Opera Mini */
  font-size: 1.4rem;
}

/* Opera hack */

.opera:-o-prefocus,
.grid > * {
  word-spacing: -0.43em;
}

.grid2 > * {
  width: 50%;
}

.grid3 > * {
  width: 33.333%;
}

.grid4 > * {
  width: 25%;
}

.grid5 > * {
  width: 20%;
}

.grid6 > * {
  width: 16.667%;
}

.grid8 > * {
  width: 12.5%;
}

.grid10 > * {
  width: 10%;
}

.grid12 > * {
  width: 8.333%;
}

/* unequal grids (1-2, 2-1, 1-3 and 3-1) for 2 blocks */

.grid2-1 > *:first-child,
.grid1-2 > * + * {
  width: 66.666%;
}

.grid1-2 > *:first-child,
.grid2-1 > * + * {
  width: 33.333%;
}

.grid1-3 > *:first-child,
.grid3-1 > * + * {
  width: 25%;
}

.grid3-1 > *:first-child,
.grid1-3 > * + * {
  width: 75%;
}

.grid1-4 > *:first-child,
.grid4-1 > * + * {
  width: 20%;
}

.grid4-1 > *:first-child,
.grid1-4 > * + * {
  width: 80%;
}

/* Responsiv-o-matic */

@media (max-width: 1280px) {
  .grid5 > *,
  .grid6 > *,
  .grid8 > *,
  .grid10 > *,
  .grid12 > * {
    width: 33.333%;
  }
}

@media (max-width: 768px) {
  .grid3 > *,
  .grid4 > *,
  .grid5 > *,
  .grid6 > *,
  .grid8 > *,
  .grid10 > *,
  .grid12 > * {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .grid > * > * {
    width: 100% !important;
  }
}


/* *** AUTOGRID ******************/

/* Demo : http://codepen.io/raphaelgoetter/pen/Kqehf */

[class*="autogrid"] {
  /* container of autogrids */
  text-align: justify;
}

[class*="autogrid"]:after {
  content: "";
  display: inline-block;
  width: 100%;
}

[class*="autogrid"] > * {
  display: inline-block;
  vertical-align: top;
  text-align: left;
}

/* whitespace fixing for modern browsers including IE9+ */

:root [class*="autogrid"] {
  font-size: 0;
}

:root [class*="autogrid"] > * {
  font-size: 14px;
  /* fallback for Opera Mini */
  font-size: 1.4rem;
}

/* Opera hack */

[class*="autogrid"]:-o-prefocus {
  word-spacing: -0.43em;
}

.autogrid2 > * {
  width: 49%;
}

.autogrid3 > * {
  width: 32%;
}

.autogrid4 > * {
  width: 23.6%;
}

.autogrid5 > * {
  width: 19%;
}

.autogrid6 > * {
  width: 15%;
}

.autogrid8 > * {
  width: 10.8%;
}

.autogrid10 > * {
  width: 9%;
}

.autogrid12 > * {
  width: 6.4%;
}

@media (max-width: 1024px) {
  .autogrid5 > *,
  .autogrid6 > *,
  .autogrid8 > *,
  .autogrid10 > *,
  .autogrid12 > * {
    width: 32%;
  }
}

@media (max-width: 480px) {
  .autogrid5 > *,
  .autogrid6 > *,
  .autogrid8 > *,
  .autogrid10 > *,
  .autogrid12 > * {
    width: 49%;
  }
}

@media (max-width: 320px) {
  [class*="autogrid"] > * {
    width: 100%;
  }
}

/* *** TABLES ******************/

table,
.table {
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  vertical-align: top;
}

table {
  width: 100%;
}


/* *** RESPONSIVE ******************/

@media (min-width: 1280px) {
  /* layouts for large screens */

  .large-hidden {
    display: none !important;
  }

  .large-visible {
    display: block !important;
  }

  .large-no-float {
    float: none;
  }

  .large-inbl {
    display: inline-block;
    float: none;
    vertical-align: top;
  }

  .large-row {
    display: table;
    table-layout: fixed;
    width: 100% !important;
  }

  .large-col {
    display: table-cell;
    vertical-align: top;
  }

  /* widths for large screens */

  .large-w25 {
    width: 25% !important;
  }

  .large-w33 {
    width: 33.3333% !important;
  }

  .large-w50 {
    width: 50% !important;
  }

  .large-w66 {
    width: 66.6666% !important;
  }

  .large-w75 {
    width: 75% !important;
  }

  .large-w100,
  .large-wauto {
    display: block !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: 0;
  }

  /* margins for large screens */

  .large-ma0 {
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  /* quick reset in small resolution and less */

  .w600p,
  .w700p,
  .w800p,
  .w960p,
  .mw960p {
    width: auto;
    float: none;
  }

  /* layouts for small screens */

  .small-hidden {
    display: none !important;
  }

  .small-visible {
    display: block !important;
  }

  .small-no-float {
    float: none;
  }

  .small-inbl {
    display: inline-block;
    float: none;
    vertical-align: top;
  }

  .small-row {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  .small-col {
    display: table-cell !important;
    vertical-align: top !important;
  }

  /* you shall not pass */

  div,
  textarea,
  table,
  td,
  th,
  code,
  pre,
  samp {
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
  }

  /* widths for small screens */

  .small-w25 {
    width: 25% !important;
  }

  .small-w33 {
    width: 33.3333% !important;
  }

  .small-w50 {
    width: 50% !important;
  }

  .small-w66 {
    width: 66.6666% !important;
  }

  .small-w75 {
    width: 75% !important;
  }

  .small-w100,
  .small-wauto {
    display: block !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: 0;
  }

  /* margins for small screens */

  .small-ma0 {
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  /* quick tiny resolution reset */

  .mod,
  .col,
  fieldset {
    display: block !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: 0;
  }

  .w300p,
  .w400p,
  .w500p {
    width: auto;
    float: none;
  }

  .row {
    display: block !important;
    width: 100% !important;
  }

  /* layouts for tiny screens */

  .tiny-hidden {
    display: none !important;
  }

  .tiny-visible {
    display: block !important;
  }

  .tiny-no-float {
    float: none;
  }

  .tiny-inbl {
    display: inline-block;
    float: none;
    vertical-align: top;
  }

  .tiny-row {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  .tiny-col {
    display: table-cell !important;
    vertical-align: top !important;
  }

  th,
  td {
    display: block !important;
    width: auto !important;
    text-align: left !important;
  }

  thead {
    display: none;
  }

  /* widths for tiny screens */

  .tiny-w25 {
    width: 25% !important;
  }

  .tiny-w33 {
    width: 33.3333% !important;
  }

  .tiny-w50 {
    width: 50% !important;
  }

  .tiny-w66 {
    width: 66.6666% !important;
  }

  .tiny-w75 {
    width: 75% !important;
  }

  .tiny-w100,
  .tiny-wauto {
    display: block !important;
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: 0;
  }

  /* margins for tiny screens */

  .tiny-ma0 {
    margin: 0 !important;
  }
}