@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
   padding: 0;
   margin: 0;
   box-sizing: border-box;
   font-family: "Inter", sans-serif;
}

body {
   min-height: 100vh;
   display: flex;
   flex-direction: column;
   align-items: center;
}
body.nav-shown::before {
   content: "";
   position: fixed; /* Couvre toute la page */
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.3); /* Overlay léger */
   pointer-events: none; /* Empêche les interactions */
   z-index: 10; /* S'assure que l'overlay est bien visible */
}
nav {
   z-index: 100; /* Le menu reste au-dessus de l’overlay */
}
/* Header */
header {
   display: flex;
   justify-content: space-between;
   margin: 60px 0px 40px;
   align-items: center;
   width: 1000px;
}
#nav {
   display: flex;
}
header nav ul {
   display: flex;
   gap: 20px;
   list-style: none;
   color: hsl(236, 13%, 42%);
}

ul li a {
   text-decoration: none;
   color: hsl(236, 13%, 42%);
}
ul li a:hover {
   color: hsl(5, 85%, 63%);
}
#open-menu {
   display: none;
}
#close-menu {
   display: none;
}
/* Main */
main {
   display: grid;
   gap: 20px;
   grid-template-columns: repeat(3, 1fr);
   width: 1000px;
}

.one {
   max-width: 100%;
   grid-column-start: 1;
   grid-column-end: 3;
}

.one {
   background-image: url("../assets/images/image-web-3-desktop.jpg");
   height: 270px;
   background-repeat: no-repeat;
   background-size: cover;
}

.two {
   width: 100%;
}

.two h1 {
   width: 200px;
   font-weight: 800;
}

.three {
   width: 100%;
   color: hsl(236, 13%, 42%);
}

.three p:first-child {
   font-size: 15px;
   margin-bottom: 10px;
}

.three p:last-child {
   background-color: hsl(5, 85%, 63%);
   width: 150px;
   padding: 8px;
   font-size: 13px;
   text-align: center;
   letter-spacing: 2px;
}

.three p:last-child a {
   text-decoration: none;
   color: hsl(240, 100%, 5%);
   font-weight: 600;
}
.three p:last-child:hover {
   background-color: hsl(240, 100%, 5%);
   color: hsl(36, 100%, 99%);
}
.three p:last-child a:hover {
   color: hsl(36, 100%, 99%);
}
.four {
   grid-column-start: 3;
   grid-column-end: 3;
   grid-row-start: 1;
   grid-row-end: 3;
   background-color: hsl(240, 100%, 5%);
   color: #fff;
   padding: 20px;
}

.four h2 {
   color: hsl(35, 77%, 62%);
   margin-bottom: 15px;
}

.four div {
   margin-bottom: 20px;
}

.four div p {
   margin-bottom: 10px;
}
.four div p:hover {
   color: hsl(35, 77%, 62%);
   cursor: pointer;
}
.four div span {
   color: hsl(236, 13%, 42%);
   font-size: 15px;
}

.four .line {
   border: 1px solid hsl(236, 13%, 42%);
}

.five {
   display: flex;
   gap: 15px;
}

.five img {
   width: 90px;
   height: 100px;
}

.five div h3 {
   color: hsl(5, 85%, 63%);
   margin-bottom: 10px;
}

.five div p {
   color: hsl(240, 100%, 5%);
   font-weight: 700;
   margin-bottom: 10px;
}
.five div p:hover {
   cursor: pointer;
   color: hsl(5, 85%, 63%);
}
.five div span {
   color: hsl(236, 13%, 42%);
}

/* Six */
.six {
   display: flex;
   gap: 15px;
}

.six img {
   width: 90px;
   height: 100px;
}

.six div h3 {
   color: hsl(5, 85%, 63%);
   margin-bottom: 10px;
}

.six div p {
   color: hsl(240, 100%, 5%);
   font-weight: 700;
   margin-bottom: 10px;
}
.six div p:hover {
   cursor: pointer;
   color: hsl(5, 85%, 63%);
}

.six div span {
   color: hsl(236, 13%, 42%);
}

/* seven */
.seven {
   display: flex;
   gap: 15px;
}

.seven img {
   width: 90px;
   height: 100px;
}

.seven div h3 {
   color: hsl(5, 85%, 63%);
   margin-bottom: 10px;
}

.seven div p {
   color: hsl(240, 100%, 5%);
   font-weight: 700;
   margin-bottom: 10px;
}
.seven div p:hover {
   cursor: pointer;
   color: hsl(5, 85%, 63%);
}

.seven div span {
   color: hsl(236, 13%, 42%);
}
/* Footer */
.attribution {
   font-size: 11px;
   text-align: center;
   margin-top: 30px;
}
.attribution a {
   color: hsl(228, 45%, 44%);
}

@media (max-width: 900px) {
   header {
      display: flex;
      justify-content: space-between;
      margin: 60px 0px 40px;
      align-items: center;
      width: 300px;
   }
   #open-menu {
      cursor: pointer;
      display: block;
   }
   #close-menu {
      cursor: pointer;
      display: block;
      position: absolute;
      top: 20px;
      right: 20px;
   }
   header nav {
      display: none;
      position: absolute;
      z-index: 1;
      background-color: rgb(196, 192, 192);
      top: 0px;
      right: 0;
      width: 250px;
      height: 800px;
   }
   #nav {
      position: fixed;
   }
   nav img {
      position: absolute;
      right: 0;
   }
   header nav ul {
      position: absolute;
      top: 120px;
      left: 20px;
      display: block;
      gap: 20px;
      list-style: none;
      color: hsl(236, 13%, 42%);
   }
   ul li {
      margin-bottom: 10px;
   }
   ul li a {
      color: black;
   }

   main {
      position: static;
      z-index: 0;
      display: flex;
      gap: 20px;
      flex-direction: column;
      width: 300px;
   }

   .one {
      max-width: 350px;
      grid-column-start: 1;
      grid-column-end: 3;
   }

   .two {
      width: 100%;
   }

   .two h1 {
      width: 250px;
      font-weight: 800;
   }

   .three p:first-child {
      font-size: 13px;
      margin-bottom: 10px;
   }

   .four {
      height: 410px;
   }

   .five div span,
   .six div span,
   .seven div span {
      font-size: 14px;
      color: hsl(236, 13%, 42%);
   }
}
