﻿
* {
  box-sizing: border-box;
}

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

body {

  font-size: 1.6rem;
  color: #398AB9;
  font-family: 'Nunito', sans-serif;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #1C658C;
  font-family: 'Nunito', 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;
  transition: 1s;
}

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 {
  font-size: 4rem;
  margin: 1rem 0;

}

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

.categorie {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  color: #398AB9;
}

@media screen and (min-width: 750px) {
  .categorie {
    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 {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  z-index: 3;
  top: 0;
}

.header .logo {
  font-family: 'Nunito', 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: #398AB9;
}

.header a:hover {
  color: #104967;
  text-decoration: none;
  text-underline-offset: 3px;
}

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


/* 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: #398AB9;
}

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

.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: #1C658C;
  margin-top: 0;
}

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

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

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

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

.portfolio {
  background-color: #fff;
}

.portfolio-filters a {
  background: #e4e2e0;
  color: #398AB9;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1rem;

  border-radius: 10px;
}

.portfolio-filters .active {
  background: #398AB9;
  color: #fff;

  border-radius: 10px;
}

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

  border-radius: 5px;
}

.portfolio .card__inner {
  padding: 2rem;
}

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

.portfolio .card__overlay {
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  position: absolute;
  top: 110%;
  left: 0;
  background: rgba(28, 101, 140, 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: 18px;
  justify-content: center;
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  text-align: center;
  margin: 5%;
}

.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;
}

.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%;
  }
}

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

  margin-top: 1%;
}

footer p {
  margin: 0;
}

footer .grid {
  align-items: center;
  justify-content: center;
  
}

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

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

  to {
    transform: translateX(0);
  }
}

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

  to {
    transform: translateX(0);
  }
}

@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;

  }
}

#h1-reseaux {
  text-align: center;
}

#pictos-reseaux  {
  width: 75%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  
}

#picto-reseaux img {
  color: #3889b7;
}

#picto-reseaux img:hover {
  color: #1C658C;
}

/* Bouton haut de page */

#myBtn {
  display: none; 
  position: fixed; 
  bottom: 20px; 
  right: 30px; 
  z-index: 99; 
  border: none;
  outline: none; 
  background-color: #398AB9; 
  color: white;
  cursor: pointer; 
  padding: 15px; 
  border-radius: 10px; 
  font-size: 18px; 
}

#myBtn:hover {
  background-color: #104967;
}