@import url("https://fonts.googleapis.com/css2?family=Inconsolata&family=Raleway:ital,wght@0,500;1,500&display=swap");

:root {
  --clr-black: #000000;
  --clr-black-90: rgba(0, 0, 0, 0.9);
  --clr-primary: #0d1e2d;
  --clr-primary-40: rgba(13, 30, 45, 0.4);
  --clr-gray: #eceff2;
  --clr-white: #ffffff;

  --ff-sans: "Raleway", sans-serif;
  --ff-mono: "Inconsolata", monospace;

  --size-h1: 1.7rem;
  --size-h2: 1.5rem;
  --size-h3: 1em;
  --size-link: 1.2rem;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
/* 
  *:focus {
    outline: purple 2px solid;
  } */

/* Images Responsives*/
img,
svg {
  max-width: 100%;
}

/* Supprime le padding des listes*/
ul {
  padding: 0;
}

/* Supprime les puces des listes-items*/
li {
  list-style: none;
}

.sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* margin pour créer un espace entre les différentes sections  */
#portfolio,
#logiciels,
#services,
#portfolio {
  margin-bottom: 12rem;
}

#header {
  margin-bottom: 3em;
}

/* classe par défaut pour texte centré sur différentes parties du document  */
.centered {
  text-align: center;
  line-height: 2rem;
  padding: 0 25%;
}

/* header  */
.header__title {
  font-size: 1.7rem;
  font-family: var(--ff-mono);
  color: var(--clr-primary);
  font-weight: bold;
  margin: 0 1em;
  text-decoration: none;
}

.header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap-reverse;
  margin: 0 -0.5em;
}

.header__list {
  background-color: var(--clr-primary);
  gap: 0.75rem;
  padding: 0 0.5em;
  flex-basis: 100%;
  max-height: 0;
  margin-bottom: 0.5em;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.header__list2 {
  transition: padding 0.3s ease-in-out;
}

.header__link {
  color: var(--clr-white);
  font-family: var(--ff-mono);
  text-decoration: none;
  font-size: 1.25rem;
  padding-left: 1.5rem;
}

.header__link:hover {
  text-decoration: underline;
  font-weight: bold;
}

.header__boutton {
  display: inline-flex;
  background-color: var(--clr-white);
  border: none;
  cursor: pointer;
  margin: 1.5em;
}

.header__list.active {
  max-height: 30rem;
  padding: 1em 0.5em;
}

/* ============= Boutton menu burger ==============  */

.header__boutton {
  display: inline-flex;
  border: none;
  background-color: transparent;
  color: white;
  cursor: pointer;
}

.burger__line1 {
  transform-origin: 16px 7px;
}

.burger__line3 {
  transform-origin: 16px 25px;
}

.header__boutton:hover .burger__line1 {
  transform: translateY(2px);
}
.header__boutton:hover .burger__line3 {
  transform: translateY(-2px);
}

.burger__line1,
.burger__line2,
.burger__line3 {
  transition: transform 0.3s 0s, stroke 0.3s 0.2s;
  transform: translateY(0) rotate(0);
  stroke: var(--clr-primary);
}

.header__boutton.active .burger__line1 {
  transform: translateY(9px) rotate(45deg);
}

.header__boutton.active .burger__line2 {
  opacity: 0;
}

.header__boutton.active .burger__line3 {
  transform: translateY(-9px) rotate(-45deg);
}

/* main list  */

.main__list {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-left: 1em;
  margin-bottom: 2em;
  flex-wrap: wrap;
}

.main__link {
  text-decoration: none;
  color: var(--clr-primary);
  font-family: var(--ff-mono);
  font-size: 1.2rem;
}

.main__link:hover {
  text-decoration: underline;
}

/* portfolio galerie */

.portfolio__title {
  font-size: 1.5rem;
  font-family: var(--ff-sans);
  color: var(--clr-primary);
  font-weight: 300;
  margin: 5em 1em 1em 0.5em;
}

.portfolio__content {
  font-size: 1em;
  font-family: var(--ff-mono);
  color: var(--clr-primary);
  margin: 1em;
}

/* .portfolio__link:focus::before  {
    margin-bottom: 0;
    padding-bottom: 0;
    content: "lien vers l'image";
    color: red;
  } */

.portfolio__list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  /* padding: 0 1em; */
  margin: 1em;
  flex: 0 0 100%;
}

.portfolio__item {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 20em;
  min-width: 300px;
  max-width: 400px;
  overflow: hidden;
  position: relative;
  /* outline: 1px red solid; */

  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s ease-in;
}

.portfolio__item:hover {
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5);
}

.portfolio__figure {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  /* max-width: 25rem; */
  margin: 0;
}

/* effet de zoom sur les images  */

.portfolio__img {

  width: 100vh;
    max-width: 100%;
    height: 100%;
    aspect-ratio: 16/9;

    display: block;   
  transform: scale(1);
  transition: transform 0.2s ease-in-out;
  object-fit: cover;
}

.portfolio__figure:hover > .portfolio__img {
  transform: scale(1.25);
}

/* caption  */

.portfolio__caption {
  background-color: var(--clr-primary-40);
  width: 100%;
  aspect-ratio: 1/1;
  position: absolute;

  top: 0;
  left: 0;

  /* préparation des transitions  */
  opacity: 0;
  transition: opacity 0.1s ease-in-out;

  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* apparition de la caption  */
.portfolio__figure:hover > .portfolio__caption {
  transform: translateY(0);
  opacity: 100%;
}

/* style de la caption  */
.portfolio__name {
  font-weight: bold;
  font-family: var(--ff-sans);
  color: var(--clr-white);
  opacity: 100%;
  font-size: 1.2rem;
}

.portfolio__info {
  font-weight: 200;
  font-family: var(--ff-sans);
  color: var(--clr-white);
}

/* logiciels section */
.logiciels__title {
  font-family: var(--ff-sans);
  font-size: 1.75em;
  width: 50%;
  margin-bottom: 1.25em;
}

.logiciels__content {
  font-size: 1rem;
  font-family: var(--ff-mono);
  color: var(--clr-primary);
  margin-bottom: 2.25em;
}

.logiciels__img {
  max-width: 5em;
  max-height: 10em;
}

/* centrage des images */

.logiciels__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-basis: 5em;
  gap: 1em;
}

/* services section  */

.services__title {
  font-family: var(--ff-sans);
  font-size: 1.75em;
  width: 50%;
  margin-bottom: 1.25em;
}

.services__icon {
  margin-left: 0.5em;
  margin-top: 2em;
}

.services__content,
.services__name {
  font-size: 1rem;
  font-family: var(--ff-mono);
  color: var(--clr-primary);
  margin: 1em;
  line-height: 1.5em;
}

.services__name {
  text-transform: capitalize;
}

.services__backendList,
.services__frontdevList,
.services__webdesignList {
  margin-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.services__item::before {
  content: "- ";
  font-weight: bold;
  font-size: 2em;
  padding: 0 0 0 0.25em;
}

.services__item {
  font-size: 1em;
  font-family: var(--ff-mono);
  color: var(--clr-primary);
  font-weight: 200;
}

/* card */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

#card {
  margin-bottom: 10rem;
}

.card__avatar {
  margin: 6em 30% 1em 30%;
  border-radius: 50%;
  width: 8.5rem;
  aspect-ratio: 1/1;
}

.card__figure {
  background-color: var(--clr-gray);
  /* padding: 10% 0 50% 0; */
  height: 50em;
  width: 25em;
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 2em;
  margin: 0;
  outline: 1px solid var(--clr-gray);
}

.card__blockquote {
  padding: 0 20%;
}

.card__quote,
.card__author {
  display: block;
  font-size: 1.2rem;
  font-family: var(--ff-mono);
  font-weight: 200;
  /* overflow-wrap: break-word; */
  text-align: center;
  line-height: 2em;
}

.card__replaced {
  overflow: hidden;
  margin: 100px auto;
  display: flex;
  position: relative;
  background-color: var(--clr-gray);
  position: relative;
}

.card__button {
  background-color: red;
  color: red;
}

#card1 {
  transform: translateX(0);
}

.animated#card1 {
  animation: card1_slide 20s ease-in-out 5s infinite;
}

@keyframes card1_slide {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(-100%);
  }
  75% {
    transform: translateX(0);
  }
}

#card2 {
  position: absolute;
  top: 0;
  /* left: -100%; */
  transform: translateX(100%);
}

.animated#card2 {
  animation: card2_slide 20s ease-in-out 5s infinite;
}

@keyframes card2_slide {
  0% {
    transform: translateX(100%);
  }
  25% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(0);
  }
  75% {
    transform: translateX(100%);
  }
}

.main#card1 {
  transform: translateX(0);
}

.main#card2 {
  transform: translateX(0);
}

.secondary#card1 {
  transform: translateX(-100%);
}

.secondary#card2 {
  transform: translateX(100%);
}

.contact__title {
  font-size: 1.2rem;
  font-family: var(--ff-mono);
  font-weight: bold;
  line-height: 2em;
}

.contact {
  font-size: 1.2rem;
  font-family: var(--ff-mono);
  font-weight: 200;
  line-height: 2em;
}

.contact__link,
.contact__link:visited {
  font-size: 1.2rem;
  font-family: var(--ff-mono);
  font-weight: 200;
  line-height: 2em;
  text-decoration: none;
  color: var(--clr-black-90);
}

.contact__link:hover {
  text-decoration: underline;
  font-weight: bold;
}

/* footer  */
.footer__copy,
.footer__content {
  font-size: 1rem;
  font-style: var(--ff-mono);
  margin-bottom: 1em;
}

.footer {
  margin-left: 1em;
}

.footer > svg {
  width: 2em;
  aspect-ratio: 1/1;
  margin: 0 2em;
  height: auto;
  /* border: red 1px solid; */
}

.footer__link > svg > path {
  fill: darkgreen;
}

.footer__back {
  text-align: center;
  margin: 1em 0;
}

.footer__link {
  text-decoration: none;
  color: var(--clr-black);
}

/* légère adaptation sur de la galerie portfolio en fonction de la taille de l'écran  */

@media only screen and (min-width: 80em) {
  .portfolio__galerie {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .portfolio__list {
    max-width: 80em;
    align-content: center;
  }

  .card__figure {
    max-height: 200em;
  }
}

@media only screen and (max-width: 24em) {
  .portfolio__galerie {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .portfolio__list {
    max-width: 60em;
    align-content: center;
    justify-content: center;
  }

  .portfolio__item {
    flex-grow: 0;
  }
}
