/* Reset simple */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  text-align: center;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: black;
}
a {
  list-style: none;
  color: inherit;
  text-decoration: none;
}
img {
  width: 100%;
  height: auto;
}

button {
  padding: 8px 12px;
  cursor: pointer;
}
:root {
  --Grey-950: hsl(212, 27%, 19%);
  --Grey-600: hsl(213, 9%, 39%);
  --Grey-550: hsl(232, 10%, 55%);
  --Grey-400: hsl(210, 4%, 67%);
  --White: hsl(0, 100%, 100%);
  --Red-400: hsl(7, 99%, 70%);
  --Yellow-500: hsl(51, 100%, 49%);
  --Green-800: hsl(167, 40%, 24%);
  --Blue-800: hsl(198, 62%, 26%);
  --Green-500: hsl(167, 52%, 57%);
}

/* style */
h1,
h2,
h3 {
  font-family: "Fraunces", serif;
}
p {
  font-family: "Barlow", sans-serif;
}
/* header */
header {
  background-image: url("../images/mobile/image-header.jpg");
  background-size: cover;
  background-position: center bottom;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
header > div:first-child {
  position: relative;
  z-index: 10;
}
header h1 {
  font-size: 2.5rem;
  letter-spacing: 0.3em;
  padding: 4rem 1rem 2rem;
  color: var(--White);
  text-transform: uppercase;
  font-weight: 900;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
header div .title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
header div .title-img {
  width: 10%;
  height: auto;
}
.top-bar {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar img:first-child {
  width: 130px;
  height: auto;
}
.top-bar img:last-child {
  width: 24px;
  height: auto;
}
/* nav mobile */
header nav {
  display: none;
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  background-color: var(--White);
  padding: 2rem;
  z-index: 100;
}
header nav::before {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-bottom: 20px solid var(--White);
}
header nav.active {
  display: block;
}
header nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
header nav ul li a {
  color: var(--Grey-550);
  font-family: "Barlow", sans-serif;
  font-size: 1.2rem;
}
header nav ul li:last-child a {
  background-color: var(--Yellow-500);
  color: var(--Grey-950);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
}
/* article conseil*/
.advens {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 2rem;
}
.advens h2 {
  font-size: 2rem;
  font-weight: 900;
}
.link-yellow {
  font-family: "Fraunces", serif;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--Yellow-500);
  text-decoration-thickness: 5px;
  text-underline-offset: 1px;
}
.link-red {
  font-family: "Fraunces", serif;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--Red-400);
  text-decoration-thickness: 5px;
  text-underline-offset: 1px;
}
/* poster */
.poster {
  position: relative;
}
.poster h3 {
  font-size: 2rem;
  padding-bottom: 1rem;
  color: var(--Green-800);
  font-weight: 900;
}
.poster img {
  display: block;
}
.poster div {
  position: absolute;
  top: 60%;
  z-index: 1;
  font-size: 1.1rem;
  padding: 2rem;
}
/* testimonials */
.testimonials {
  padding: 2rem;
}
.testimonials h2 {
  color: var(--Grey-400);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}
.testimonials .job {
  padding-top: 0.4rem;
  color: var(--Grey-400);
  font-size: 0.9rem;
}
.testimonials article p {
  color: var(--Grey-950);
  font-size: 1.1rem;
  padding-bottom: 1rem;
}
.profil-picture {
  border-radius: 50%;
  width: 20%;
  height: auto;
  padding: 1.5rem 0;
}
/* dernière section */
.four-image div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.four-image div img {
  width: 100%;
  height: auto;
  display: block;
}
/* footer */
footer {
  background-color: var(--Green-500);
  color: var(--Green-800);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 3rem 0;
}
footer div ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  font-weight: 600;
}
footer h2 {
  font-weight: 900;
  font-size: 1.8rem;
}
footer div:first-of-type ul {
  padding: 0 2.5rem;
}
footer div:last-of-type ul {
  padding: 0 6rem;
}
@media screen and (min-width: 1024px) {
  /* header */
  header {
    background-image: url("../images/desktop/image-header.jpg");
    min-height: 90vh;
    padding: 0 2rem;
  }
  header div .title-img {
    width: 3%;
    height: auto;
  }
  header h1 {
    font-size: 3.5rem;
    letter-spacing: 0.6rem;
  }
  .top-bar {
    padding: 2.5rem 3rem;
  }
  .top-bar img:last-child {
    display: none;
  }
  header nav {
    display: block;
    position: static;
    transform: none;
    width: auto;
    background-color: transparent;
    padding: 0;
  }
  header nav::before {
    display: none;
  }
  header > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  header nav ul {
    flex-direction: row;
    gap: 3rem;
  }
  header nav ul li a {
    color: var(--White);
    font-size: 1.1rem;
  }
  header nav ul li:last-child a {
    background-color: var(--White);
    color: var(--Blue-800);
    padding: 1rem 2rem;
    transition: all 0.3s ease;
  }
  header nav ul li:last-child a:hover {
    background-color: var(--Blue-800);
    color: var(--White);
  }
  /* première section */
  section:first-of-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }  
  section:first-of-type > picture:nth-child(1) {
    order: 2;
  }
  section:first-of-type > article:nth-child(2) {
    order: 1;
  }
  section:first-of-type > picture:nth-child(3) {
    order: 3;
  }
  section:first-of-type > article:nth-child(4) {
    order: 4;
  }
  section:first-of-type picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .advens {
    padding: 0 6rem;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
  }
  .advens h2 {
    font-size: 2.5rem;
  }
  .advens p {
    font-size: 1.1rem;
  }
  .link-yellow,
  .link-red {
    align-self: flex-start;
  }
  /* poster */
  section:nth-of-type(2) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .poster {
    min-height: 600px;
  }
  .poster div {
    padding: 3.5rem 10rem 4rem;
  }
  .poster h3 {
    font-size: 1.75rem;
  }
  /* testimonials */
  .testimonials div {
    display: flex;
    gap: 1rem;
    padding: 2rem 4rem;
    align-items: center;
  }
  .testimonials h2 {
    padding-top: 2rem;
  }
  .profil-picture {
    width: 15%;
  }
  /* last section */
  .four-image div {
    display: flex;
    flex-direction: row;
  }
  /* footer */
  footer div ul {
    gap: 3rem;
  }
}
