/* Projet 7 : Lancez votre propre site d'avis de restaurants */

body {
    height: 100%;
    margin: 0;
    min-height: 100%;
    padding: 0;
    background-color: #fff;
    color: #222;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 1rem;
    font-weight: 300;
}

html{
    height: 100%;
    margin: 0;
    min-height: 100%;
    padding: 0;
    background-color: #fff;
    color: #222;
    overflow: auto;
}

h1,h2,h3 {
    margin: 0;
    font-family: 'Caveat Brush', cursive;
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: #222;
    text-decoration: none;
}

a:link {
    text-decoration: none;
}
    
a:visited {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

a:active {
    text-decoration: none;
}

.link {
    font-weight: 500;
}

.link:visited {
    text-decoration: none;
}

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


/* ------------------------ Text ------------------------ */

.color-brand {
    color: #d32323;
}

.color-brand-light {
    color: #d32323;
    filter: brightness(125%);
}

.bg-grey {
    background-color: #f1f1f1;
}

.bold {
    font-weight: 500;
}

.border {
    border: 1px solid #222;
    filter: brightness(125%);
    border-radius: 1px;
}

.border--sm {
    border-width: 1px/2;
}

.border--lg {
    border-width: 1px*2;
}

.text-center {
    text-align: center;
}


/* ------------------------ Structure ------------------------ */

.site {
    height: 100%;
}

.site-body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-content: stretch;
    justify-content: space-between;
}

.site-header {
    box-sizing: border-box;
    padding: 0 1rem;
    position: absolute;
    width: 100%;
    height: 60px;
    background-color: #d32323;
    z-index: 25;
}

.site-header .a {
    color: #fff;
}

.site-header__title {
    margin: 0;
}

.site-header.is_minified {
    height: 60px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-content {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 500px;
    position: relative;
    overflow-y: scroll;
}

.site-listing {
    position: relative;
    height: 100%;
}

.site-listing.panel-open {
    height: 100vh;
}

.site-listing.panel-open .items {
    height: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
}

/* ---- ETAPE 2 ---- */
.site-listing.form_open {
    height: 100vh;
    overflow: hidden;
}

.site-listing.form-open .items {
    height: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
    display: none;
}
/* ---- ETAPE 2 ---- */

@media screen and (max-width: 768px) { /*screen-size-sm*/
    .site-body {
        flex-direction: column-reverse;
    }
    
    .site-content {
        width: 100% !important;
        margin-top: 0;
    }
    
    .site-listing {
        width: 100% !important;
        height: auto;
    }
    
    /* ---- ETAPE 2 ---- */
    .site-listing.form-open {
        height: 100vh;
    }
    /* ---- ETAPE 2 ---- */
}


/* ------------------------ Map ------------------------ */

.site-map {
    margin-top: 60px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 2;
    position: relative;
}

.site-map .map {
    width: 100%;
    height: 100%;
    opacity: 1;
}

@media screen and (max-width: 768px) { /*screen-size-sm*/
    .site-map {
        width: 100% !important;
        height: 40vh;
        flex-shrink: 0;
    }
}


/* ------------------------ Icons ------------------------ */

.fa {
    margin-right: 0.25rem;
}


/* ------------------------ Items ------------------------ */

.items {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    min-height: 70vh;
    box-sizing: border-box;
}

.item {
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 1;
    min-height: 170px;
    box-sizing: border-box;
}

.item a {
    color: #222;
}

.item-sum {
    display: flex;
    align-content: flex-start;
    justify-content: space-between;
    padding: 2rem;
    cursor: pointer;
}

.item-thumbnail {
    width: 102px;
    min-width: 100px;
    height: 102px;
    display: block;
    background-image: url("../images/thumbnail_oresto_grey.png");
    background-repeat: no-repeat;
    overflow: hidden;
    border: 1px solid #222;
}

.item-thumbnail-img {
    width: auto;
    height: 100%;
    min-width: 100%;
}

.item-infos {
    padding: 1rem*2;
    background-color: #fff;
    flex-grow: 2;
}

.item-thumbnail + .item-infos {
    margin-left: 1rem;
}

.item-title {
    margin-top: 0;
    font-size: 2rem;
}

@media screen and (max-width: 768px) { /*screen-size-sm*/
    .items {
        padding-top: 1rem;
    }
    
    .item {
        min-height: 0;
    }
    
    .item-sum {
        padding: .75rem 2rem;
    }
    
    .item-infos {
        font-size: .75rem;
    }
    
    .item-thumbnail {
        height: 75px;
        min-width: 75px;
        widows: 75px;
    }
    
    .item-title {
        width: 200px;
        font-size: 1.25rem;
    }
}

.item-details {
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

#item-details-title {
    font-size: 3.5rem;
}

.item-details .item-infos {
    padding: 2rem;
    margin-left: 0;
}

.item-image {
    width: 100%;
}

.item-image img {
    width: 100%;
    height: auto;
}

.item-infos {
    flex-grow: 2;
}

.item-reviews {
    height: auto;
    margin-bottom: 60px;
}


/* ------------------------ Review ------------------------ */

.review blockquote {
    border-radius: .5rem;
    padding: 1.5rem;
    text-align: left;
    position: relative;
    background-color: rgba(211, 35, 35, 0.9);  /*background-color: #d32323;*/
    filter: brightness(125%);
    color: white;
    margin-bottom: 1.5rem;
    
    -webkit-transition: background-color 1s ease-out;
    -moz-transition: background-color 1s ease-out;
    -o-transition: background-color 1s ease-out;
    transition: background-color 1s ease-out;
}

.review blockquote:hover {
    background-color: #d32323;
}

.review~.review {
    margin-top: 2rem;
}

.rate {
    font-weight: 500;
    font-family: 'Roboto', arial, sans-serif;
    background-color: #f1f1f1; /*background-color: rgb(241, 241, 241);*/
    color: #222;
    display: inline-block;
    border-radius: .25rem;
    padding: .25rem .5rem;
    line-height: 1;
}

/* ---- ETAPE 2 ---- */
.rating {
    width: (30px * 5) + (2px * (5 - 1));
    height: 30px;
}

.rating label {
    float: right;
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.rating label:not(:first-of-type) {
    padding-right: 2px;
}

.rating label:before {
    content: "\2605"; /*Symbol of a black star ★*/
    font-size: 30px + 2px;
    color: #CCCCCC;
    line-height: 1;
}

.rating input {
    display: none;
}

.rating input:checked ~ label:before {
    color: rgb(255, 217, 50);
}

.rating input:not(:checked) > label:hover:before {
    color: rgb(255, 217, 50);
}

.rating input:not(:checked) > label:hover ~ label:before {
    color: rgb(255, 217, 50);
}

#item-form-review {
    height: 140px;
    min-height: 100px;
}
/* ---- ETAPE 2 ---- */

.static-star {
    font-size: 16px;
    color: rgb(255, 217, 50);
    margin-left: 4px;
    line-height: 1;
    display: inline-block;
}

.review blockquote .rate {
    margin-top: 1rem;
}


/* ------------------------ Close ------------------------ */

.close {
    opacity: .15;
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    z-index: 30;
}

.close:hover {
    opacity: 1;
}


/* ------------------------ Filters ------------------------ */

.filters-header {
    padding: .5rem 0 .5rem 0;
    background-color: #f1f1f1;
    color: #d32323;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid grey;
}

#filters-form {
    background-color: #f1f1f1;
    color: #d32323;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem 0 .5rem 0;
}

.filter {
    padding: .25rem .5rem;
    margin: 0 1rem;
    width: 50px;
}


/* ------------------------ Panel ------------------------ */

#site-panel {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0; 
    height: 100%; 
    width: 100%;
    left: 0;
    box-sizing: border-box;
    background-color: white;
    color: #222;
}

.panel-content {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---- ETAPE 2 ---- */
/* ------------------------ Button ------------------------ */

.button {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
    border-radius: 1px*2;
    border: none;
    color: white;
    display: inline-block;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 1rem - .15;
    font-weight: 500;
    min-width: 100px;
    outline: none;
    padding: .5rem 1rem .5rem 1rem;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    background-color: #D32323;
    filter: brightness(125%);
}

.button:not(:hover) {
    background-color: rgba(211, 35, 35, 0.7);  /*background-color: #d32323;*/
}

.button:not(:disabled):hover {
    cursor: pointer;
}

.button:focus {
    cursor: pointer;
}

.button:not(:hover) .fa{
    opacity:.5;
}

#addButton:disabled {
    display: none;
}


/* ------------------------ Form ------------------------ */

#add-panel {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0; 
    height: 100%; 
    width: 100%;
    left: 0;
    box-sizing: border-box;
    background-color: #ffd4d4; /*color-brand-lighter*/
    color: #222;
}

.form {
    padding: 2rem;
    box-sizing: border-box;
    font-size: 1rem;
}

.form-field {
    box-sizing: border-box;
    font-size: 1rem;
}

.form-title {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group--submit {
    text-align: right;
    margin: 2rem 0 0;
}

.form-group .append-group {
    display: flex;
    align-items: stretch;
    color: #d32323;
    border-radius: 1rem;
    background-color: #ffbcbc;
    overflow: hidden;
    margin-bottom: .5rem;
}

.form-group .append-group .append {
    display: flex;
    align-items: center;
    padding: 0 .5rem 0 1rem;
}

.form-group .append-group .append + .form-field {
    background-color: #ffbcbc;
    border: none;
    padding-left: 0;
}

.form-group--file {
    border-top: 1px solid #f5c3c3;
    padding-top: 2rem;
    margin-top: 2rem;
}

.form-group--file .file-group {
    align-items: center;
    display: flex;
    margin-top: 1rem;
}

.form-group.has_error {
    color: red;
    position: relative;
}

.form-group.has_error:after {
    content: '\f071';
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: .05rem;
    font-family: 'FontAwesome';
    margin-right: .5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: .25rem;
}

.form-label .required {
    content: '*';
    color: red;
    margin-left: .25rem;
}

.form-label:after {
    content: '*';
    color: red;
    margin-left: .25rem;
}

.form-field {
    background-color: #fff;
    border: 1px solid #626262;
    border-radius: 1px;
    padding: .5rem 1rem;
    width: 100%;
}

.form-field--textarea {
    padding: 1rem;
}

.form-field--select {
    font-weight: 300;
}

.form-info {
    font-style: italic;
}

.form.form-review {
    background-color: #f1f1f1;
}
/* ---- ETAPE 2 ---- */