/* penser mobile first et montrer rapidement les mediaqueries ? */
/* natives et reset - parler des preset par défault - par les class et id + héritage */
/* https://developer.mozilla.org/fr/docs/Web/CSS 

Selecteur { 
  propriété: valeur;
}

selecteur natif
selecteur id, class
pseudo selecteur et selecteur d'attributs

*/

/* Base */

/* opti */
:root {
  --colorBody: #555;
}

* {
  box-sizing: border-box;
}

/*  Global */
html {
  font-size: 62.5%;
}

body {

  font-size: 1.6rem;
  color: #555;
  /* color: var(--colorBody); */
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  /*text-align: center;*/
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #000;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  line-height: 1.2;
}

h1,
.h1 {
  font-size: 3.1rem;
  font-weight: 700;
}

h2,
.h2 {
  font-size: 2.8rem;
  text-transform: uppercase;
}

h3,
.h3 {
  font-size: 2.1rem;
}

p {
  line-height: 1.6;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  padding-left: 2rem;
}

li {
  margin-bottom: 1rem;
}

/* Generic */

.list-unstyled {
  list-style: none;
  margin: 0;
  padding: 0;
}

.title {
  /*  les display et float - expliquer le span ... */
  /* background-color: chocolate;
  display: inline-block; */
  font-size: 4rem;
  margin: 1rem 0;

}

@media screen and (min-width: 750px) {
  .title {
    font-size: 5rem;
  }
}

.category {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  color: #5b6c78;
}

@media screen and (min-width: 750px) {
  .category {
    font-size: 1.4rem;
  }
}

/* Container, Grids */

.container {
  padding: 1rem 2rem;
}

.d-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid {
  display: flex;
  flex-wrap: wrap;
}

.grid__item {
  flex-grow: 1;
  flex-shrink: 0;
  width: 100%;
  padding: 1rem;
}

@media screen and (min-width: 750px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
  }

  .grid__item {
    max-width: 50%;
  }
}

/* Header */

.header {
  /*  les display */
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  z-index: 3;
  top: 0;
}

.header .logo {
  font-family: "Poppins", sans-serif;
  letter-spacing: 2px;
  font-size: 2rem;
}

.header .logo:hover {
  text-decoration: none;
}

/*  heritage et profondeur */
.header li {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  margin-bottom: 0;
}

.header a {
  color: #333;
}

.header a:hover {
  color: #000;
}

.header .right {
  display: flex;
  align-items: center;
}

.header a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.socials li {
  display: inline-flex;
  height: 30px;
  margin-bottom: 0;
  padding: 0 5px;
}

.socials a {
  color: #333;
}

.socials .icon {
  height: 18px;
}

/* Navigation Mobile */

.burger {
  background: none;
  border: none;
  position: relative;
  width: 35px;
  height: 35px;
  margin-left: 1rem;
  cursor: pointer;
}

.burger .bar {
  width: 22px;
  height: 3px;
  display: block;
  background-color: #333;
}

.burger .bar::before,
.burger .bar::after {
  content: "";
  width: 22px;
  height: 3px;
  display: block;
  position: absolute;
  background-color: #333;
}

.burger .bar::before {
  transform: translateY(-8px);
}

.burger .bar::after {
  transform: translateY(8px);
}

@media screen and (max-width: 749px) {
  nav {
    display: flex;
    overflow: hidden;
    opacity: 0;
    position: fixed;
    top: 55px;
    left: 110%;
    width: 0;
    height: calc(100vh - 55px);
    background: #f5f5f5;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: all 0.4s ease-out;
  }

  nav .menu li {
    display: flex;
    justify-content: center;
  }

  nav .menu li a {
    display: block;
    font-size: 2rem;
    padding: 2rem;
    transition: all 0.4s;
  }

  .burger .bar::before,
  .burger .bar::after {
    transition: all 0.2s ease-out;
  }

  .show-nav nav {
    opacity: 1;
    width: 100%;
    left: 0;
    z-index: 2;
  }

  .show-nav nav li a:hover {
    transform: scale(1.1);
    text-decoration: none;
  }

  .show-nav .burger .bar {
    width: 0;
    background: transparent;
  }

  .show-nav .burger .bar::before {
    transform: rotate(-45deg);
  }

  .show-nav .burger .bar::after {
    transform: rotate(45deg);
  }
}

@media screen and (min-width: 750px) {
  .burger {
    display: none;
  }
}

/* sections */

section {
  padding: 55px 0;
}

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

.section-header--left {
  text-align: left;
}

.section-title {
  font-size: 3.8rem;
  color: #000;
  margin-top: 0;
}

@media screen and (min-width: 750px) {
  .section-title {
    font-size: 4.8rem;
  }
}

.hero {
  background-color: #5b6c78;
  color: #fff;
  padding: 0;
}

.hero h1 {
  color: #fff;
}

.hero .grid {
  /*display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center; display: flex; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero p {
  color: inherit;
}

.hero__item {
  flex: 1 0 50%;
  padding: 2rem 1rem;
  text-align: center;
}

.hero__avatar {
  text-align: center;
}

.hero__item span {
  text-transform: uppercase;
}

.hero__item.left {
  animation-duration: 1s;
  animation-name: slideInLeft;
  /* background:#999; */
}

.hero__item.right {
  animation-duration: 1s;
  animation-name: slideInRigth;
  /* background:#555; */
}

@media screen and (max-width: 749px) {
  .hero__item.left {
    order: 2;
  }

  .hero__item.right {
    order: 1;
  }
}

@media screen and (min-width: 750px) {
  .hero .grid {
    flex-direction: row;
  }

  .hero__item {
    text-align: left;
  }

  .hero__avatar img {
    max-width: 400px;
    border-radius: 50%;
  }
}

.about .section-title {
  margin-top: 2rem;
}

@media screen and (min-width: 750px) {
  .about .section-title {
    margin-top: 0;
  }

  .about img {
    padding-right: 3rem;
  }
}

.services {
  background-color: #f5f5f5;
}

.service {
  text-align: center;
  margin-bottom: 1rem;
}

.service__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 90px;
  height: 90px;
  padding: 1rem;
  border: 2px solid #5b6c78;
  color: 5b6c78;
  border-radius: 50%;
}

.service__icon svg {
  height: 35px;
}

.service__content {
  flex: 1;
}

.service h3 {
  margin-bottom: 0;
}

@media screen and (min-width: 750px) {
  .service {
    display: flex;
    align-items: center;
    text-align: left;
  }

  .service__icon {
    margin: 0 2rem 0 0;
  }
}

.skills h4,
.skills p {
  margin: 0 0 0.3rem;
}

.skills svg {
  width: 15px;
  height: auto;
}

.skills li {
  background: #f5f5f5;
  border-left: 3px solid rgb(91 107 120);
  padding: 0.9rem 2rem;
}

.skills .progressbar {
  background-color: #eee;
  color: #fff;
  margin-bottom: 1rem;
}

.skills .bar {
  background-color: rgb(91 107 120);
  padding: 1rem;
  color: #fff;
  margin-bottom: 1rem;
}

.portfolio {
  background-color: #f5f5f5;
}

.portfolio-filters a {
  background: #eee;
  color: #333;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.portfolio-filters .active {
  background: #5b6c78;
  color: #fff;
}

.portfolio .card {
  display: block;
  position: relative;
  overflow: hidden;
  color: #333;
  cursor: pointer;
  border: 1px solid #eee;
  background: rgb(255, 255, 255);
  text-transform: uppercase;
  text-align: left;
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.1);
}

.portfolio .card__inner {
  padding: 2rem;
}

.portfolio .card__title {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

.portfolio .card__overlay {
  color: #fff;
  font-size: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  position: absolute;
  top: 110%;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
  height: 100%;
  width: 100%;
  transition: all 0.3s;
}

.portfolio .card:hover .card__overlay {
  top: 0;
}

.portfolio .card__overlay a {
  color: #fff;
  font-size: 45px;
  justify-content: center;
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  text-align: center;
}

.portfolio .grid__item {
  max-width: 50%;
  margin-bottom: 0;
  opacity: 1;
  transition: all 1s ease;
}

.portfolio .grid__item.hide {
  max-width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.modal {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 4;
  transform: scale(0);
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  transition: all 0.5s;
}

.show.modal {
  transform: scale(1);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background-color: #fefefe;
  height: 100vh;
  padding: 5rem 1rem;
  overflow: auto;
  text-align: left;
}

.modal img {
  margin-bottom: 2rem;
}

.modal__title {
  margin: 0 0 2rem;
}

.modal__close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: none;
  border: 1px solid #eee;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 3.1rem;
  color: #666;
  cursor: pointer;
}

.modal .grid__item {
  max-width: 100%;
  margin-bottom: 0;
  opacity: 1;
  transition: all 1s ease;
}

@media screen and (min-width: 750px) {
  .modal .grid__item {
    max-width: 50%;
  }

  .modal__content {
    padding: 3rem;
  }
}

@media screen and (max-width: 749px) {
  .portfolio-filters a {
    font-size: 14px;
  }
}

@media screen and (min-width: 750px) {
  .portfolio .grid__item {
    max-width: 33.333%;
  }

  .portfolio-filters .grid__item {
    max-width: 25%;
  }

  .modal .grid__item {
    max-width: 50%;
  }
}

/* Form */

.form {
  max-width: 600px;
  margin: 4rem auto 0;
}

.form input,
.form textarea {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-bottom: 2rem;
  font-family: inherit;
}

.form textarea {
  min-height: 300px;
}

.form .btn {
  width: auto;
  background: #333;
  color: #fff;
  font-size: 2rem;
  padding: 1.2rem 3rem;
  border: none;
  box-shadow: none;
  text-transform: uppercase;
}

.form .btn:hover {
  cursor: pointer;
  background: #000;
}

footer {
  background-color: #000;
  color: #eee;
  font-size: 14px;
  text-align: center;
}

footer p {
  margin: 0;
}

footer .grid {
  align-items: center;
}

footer .socials {
  text-align: center;
}

footer .socials li {
  height: auto;
}

footer .socials a {
  color: #fff;
  border: 1px solid #fff;
  border-radius: 50%;
  height: 42px;
  width: 42px;
  padding: 1rem;
}

footer .socials a:hover {
  background: #fff;
  color: #333;
}

@media screen and (min-width: 750px) {
  footer {
    text-align: left;
  }

  footer .grid__item {
    max-width: 33.333%;
  }
}

/*
.is-black {
  background: #000;
}

varaibles
*/

@keyframes slideInLeft {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideInRigth {
  from {
    transform: translateX(110%);
  }

  to {
    transform: translateX(0);
  }
}

/* Blog */

.blog {
  padding-bottom: 2rem;
}

.blog__text {
  margin-bottom: 3rem;
}

.article__card {
  position: relative;
  padding-bottom: 2rem;
}

.article__card img {
  opacity: 0.9;
  margin-bottom: 1rem;
}

.article__card:hover img {
  opacity: 1;
}

.article__title {
  color: #333;
  margin: 1rem 0;
}

.article__meta {
  color: #666;
  font-style: italic;
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

.sidebar {
  padding: 2rem;
  background: #F5F5F5;
}

@media screen and (min-width: 750px) {
  .d-grid {
    display: grid;
    grid-column-gap: 2rem;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .grid-container {
    display: grid;
    justify-content: space-between;
    grid-template-columns: 2fr 2fr 2fr;
    grid-template-rows: auto;
    grid-template-areas:
      "header header header"
      "main main sidebar"
      "footer footer footer";
  }

  .header {
    grid-area: header;
  }

  .main {
    grid-area: main;
  }

  .sidebar {
    grid-area: sidebar;
  }

  .footer {
    grid-area: footer;
  }

}

@media screen and (min-width: 1024px) {
  .grid-container {

    grid-template-columns: 2fr 2fr 1fr;

  }
}