/************* FONTS ************/
@font-face {
  font-display: swap;
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  src: url("fonts/space-grotesk-v16-latin-500.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  src: url("fonts/space-grotesk-v16-latin-700.woff2") format("woff2");
}

/************* GLOBAL ************/

:root {
  --green: #4ee1a0;
  --black: #151515;
  --dark-grey: #242424;
  --grey: #d9d9d9;
  --white: #ffffff;

  --txt: var(--grey);
  --bg: var(--black);

  --typo: "Space Grotesk", sans-serif;
}

/* règles obligatoires pour chaque project */
body {
  font-family: var(--typo);
  font-size: 1rem;
  line-height: 1.75; /*ratio par rapport à font-size*/
  font-weight: 500;
  color: var(--txt);
  background-color: var(--black);
}
@media screen and (min-width: 31em) {
  body {
    font-size: 1.125rem;
  }
}
:is(h1, h2, h3, .h1-like, .h2-like, .h3-like) {
  font-family: var(--typo);
  font-weight: 700;
}

/* on crée une classe .h1-like pour donner l'apparence d'un h1 à une élément qui n'est pas un h1. */

h1,
.h1-like {
  font-size: 2.5rem;
  line-height: 2.5rem;
  color: var(--white);
}
@media screen and (min-width: 31em) {
  h1,
  .h1-like {
    font-size: 4.5rem;
    line-height: 4.5rem;
    margin-block-end: 1.5rem;
  }
}
@media screen and (min-width: 75em) {
  .h1 {
      font-size: 5.5rem;
      line-height: 5.5rem;
  }
}

h2 {
  font-size: 2.5rem;
  color: var(--white);
}
@media screen and (min-width:
31em) {
  h2{
    font-size: 4.5rem;
  }
}
/* h2 apparaît dans le code mais est enlevé avec display none pq il est pas sur la maquette. */
.dnone {
  display: none;
}

h3 {
  font-size: 1.5rem;
}
@media screen and (min-width: 45em) { /* eq 1200px */
  h3 {
      font-size: 2rem;
  }
}
@media screen and (min-width: 75em) { /* eq 1200px */
  h3 {
      font-size: 3rem;
  }
}

.logo, .social-link {
  color: var(--white);
  text-decoration: none;
}

.underlined-green-links {
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  /* font-size: 1rem; */
  border-bottom: 0.125rem solid var(--green);
  padding-block-end: 0.62em
}
@media screen and (min-width: 75em){
  .underlined-green-links:hover{
    color: var(--green);
  }
}


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

.container {
  /* padding-inline: 1rem; */
  width: calc(100% - 1rem - 1rem);
  margin-inline: auto;
}
@media screen and (min-width: 48em) { /* eq 768px */
  .container {
      max-width: 45rem; /* eq 720px */
  }
}
@media screen and (min-width: 75em) { /* eq 1200px */
  .container {
      max-width: 71.25rem; /* eq 1140px */
  }
}
@media screen and (min-width: 62em) { /* eq 992px */
  .container {
      max-width: 60rem; /* eq 960px */
  }
}
@media screen and (min-width: 90em) { /* eq 1440px */
  .container {
      max-width: 80rem; /* eq 1280px */
  }
}




/******* HEADER *******/

.header-container, .footer-container{
  display: flex;
  flex-direction: column;
  padding-block-start: 1rem;
}
@media screen and (min-width: 31em) {
  .header-container, .footer-container{
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.logo {
  display: flex;
  justify-content: center;
  margin-block-end: 1.25rem;
  font-size: 1.5rem;
}
@media screen and (min-width: 31em) {
  .logo{
    font-size: 2rem;
  }
}

ul.menu-main-list {
  display: flex;
  justify-content: center;
  padding-block-end: 1rem;
}

.list-social-items a:hover svg {
  color: var(--green);
}

.social-link{
  display: grid;
  padding: 0.5rem;
}

/* balise svg direct dans le html avec fill changé en currentColor puis on cible bien le svg précisément, au hover puis on change la couleur.*/

/******* HERO GRID *******/

.hero .container {
  display: grid;
  gap: 2.5rem;
  justify-items: center;
  text-align: center;
  padding-block-start: 5rem
}
@media screen and (min-width: 45em) {
  .hero .container {
    gap: 1rem;
    grid-template-columns: 1fr 16rem;
  }
}
@media screen and (min-width: 45em){
  .hero-content{
    justify-items: start;
    display: grid;
  }
}

.hero picture {
  order: -1;
  width: 12rem;
}
@media screen and (min-width: 45em) {
  .hero picture{
    order: 0;
    width:16rem;
  }
}

.hero-title {
  text-align: center;
}
@media screen and (min-width: 45em){
  .hero-title{
    text-align: start;
  }
}

span{
  text-decoration-line: underline ;
  text-decoration-skip-ink: none;
  text-underline-offset: 0.16em;
  text-decoration-color: #4ee1a0;
}
.hero-txt {
  padding-block: 1.5rem;
  text-align: center;
}
@media screen and (min-width: 45em){
  .hero-txt{
    text-align: start;
    max-width: 35rem;
  }
}

.hero-cta {
  text-align: center;
}
@media screen and (min-width: 45em){
  .hero-cta:hover{
    color: var(--green);
  }
}


/******* SKILLS GRID *******/

.skill .container {
  display: grid;
  justify-content: center;
  margin-block: 3.5rem;
  border-block: 1px solid var(--white);
  padding-block: 3.5rem;
}
@media screen and (min-width: 31em){
  .skill .container{
    justify-content: start;
    border-block-end: none;
  }
}
@media screen and (min-width: 75em) {
  .skill .container {
      margin-block-start: 9rem;
  }
}

.skills-title {
  text-align: center;
}
@media screen and (min-width: 31em){
  .skills-title{
    text-align: start;
  }
}

.skill-list {
  display: grid;
  gap: 1.5rem;
}
@media screen and (min-width: 31em) {
  .skill-list{
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 5rem;
    grid-row-gap: 3.25rem
  }
}
@media screen and (min-width: 62em) { /* eq 992px */
  .skill-list {
      grid-template-columns: repeat(3, 1fr);
      grid-column-gap: 8rem;
      grid-row-gap: 4.25rem
  }
}
.skill-text{
  min-width: max-content;
}
/******* PROJECTS GRID *******/

.project .container{
  display: grid;
  gap: 2.5rem;
  padding-inline: 0;
  padding-block: 1rem;
  margin-block-end: 3rem;
} 
@media screen and (min-width: 31em) {
  .project .container{
    /* padding-inline: 1rem; */
    gap:3.75rem
  }
}
.project-header{
  display: flex;  
  align-items: center;
  justify-content: space-between;  
}
/* @media screen and (min-width: 31em) {
  .project-header{
    min-width: calc(100% - 1rem);
  }
} */

.project-list{
  display: grid;
  gap: 2.5rem;
}
@media screen and (min-width: 31em) {
  .project-list{
    grid-template-columns: repeat(2, minmax(48%, 50%));
    grid-column-gap: 1.5rem;
    ;
  }
}

.project-item{
  display: grid;
  gap: 1.25rem;
}
@media screen and (min-width: 31em) {
  .project-item{
  max-width: 100%;  }
}

.project h3{
  text-transform: uppercase;
}

.project-skill-list{
  display: flex;
  gap: 1.13rem;
}


.project-link-list{
  display: flex;
  gap: 2rem;
}
@media screen and (min-width: 62em) { 
  .project-link-list {
    grid-area: 1 / -1 / 2 / 2;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: rgba(0, 0, 0, .6);
    opacity: 0;
    transition: .3s ease;
  }
  .project-link-list:hover {
    opacity: 1;
  }
}

.project picture{
  order: -1;
}
@media screen and (min-width: 62em) { 
  .project picture {
    grid-area: 1 / -1 / 2 / 2;
  }
}

.project picture img{
  object-fit: cover;

}
@media screen and (min-width: 62em) {
  .project picture img {
    height: 23rem;
    width: 100%;
  }
}

/************* CONTACT***********/

section.contact{
  background-color: var(--dark-grey);
}

.contact-container{
  padding-inline: 0;
  padding-block: 3.75rem;
  display: grid;
}



@media screen and (min-width: 62em) {
  .contact-container {
      grid-template-columns: repeat(2, 1fr);
      gap: 5rem;
      justify-content: space-around;
  }
}

.contact-content{
  display: grid;
  justify-items: center;
  padding-block-end: 3.12rem;
  text-align: center;
  align-items: center;

}
@media screen and (min-width: 62em) {
  .contact-content {
    justify-items: start;
    padding-block-end: 3.12rem;
  }
  .contact-content p{
    text-align: start;
    max-width: 450px;
  }
}

.contact-title{
 text-transform: capitalize;
 padding-block-end: 1.25rem;
}




/*********** FORM **********/



.invalid:user-invalid{
  /* display: grid; */
  font-size: 0.75rem;
  color: #ff0000;
}

.input{
  color: var(--white);
  background-color: var(--dark-grey);
  /* display: grid; */
  padding-block: 1.06rem;
  padding-inline-start: 1.5rem;
  border: 0;
  border-block-end: 1px solid var(--white);
  text-transform: uppercase;
  width: 100%;
  
}



.input:focus{
  
}
input:user-valid,
select:user-valid{
  border-color: green;
}
input:user-invalid,
select:user-invalid{
  border-color: red;
}


.submit{
  display: grid;
  padding-block-start: 2rem;
  border-inline: none;
  border-block-start: none;
  background-color: var(--dark-grey);
  color: var(--txt);
  grid-column-start: 2;
  width: fit-content;
  margin-inline-start: auto;
}


.message-input{
  padding-block-start: 2rem;
  padding-block-end: 3rem;
}

footer{
  background-color: var(--dark-grey);
}

@media screen and (min-width: 31em) {
  footer .container{
    border-block-start: 1px solid var(--white)
  }
}

footer:before{
  background-color: var(--dark-grey);
}

/* Footer responsive: avec header. */