html{
    scroll-behavior: smooth;
    font-family: 'Cooper Black', serif;
    color: #f5f5d4;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 97%;
    text-align: center;
    background: linear-gradient(#373737, transparent);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    padding: 25px; 
}

header nav {
    width: 35%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
}

header nav a {
    position: relative;
    font-size: 1.5rem;
    text-decoration: none;
    color: #f5f5d4;
    padding-bottom: 5px;
}

header nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #f5f5d4;
    transition: width 0.3s ease;
}

header nav a:hover::after,
header nav a:focus::after,
header nav a:active::after {
    width: 100%;
}

body{
      margin: 0;
      background-color: #373737;
    }
.portfolio{
    padding: 20px;
    width: 50%;
    height: auto;

}
h1{
  font-size: 2.5rem;
}
h2{
  font-size: 2rem;
}
.port1{
    padding-top: 200px;
    padding-bottom: 150px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
.moi{
    width:17%;
    height: 17%;
}
.moi1{
    padding-top: 50px;
    display: flex;
    justify-content: space-around;
    padding-bottom: 100px;
    align-items: center
}
.txt{
    font-family: 'Cooper Black', serif;
    font-size: 2rem;
    color: #f5f5d4;
    width: 50%;
}
.txt p{
    font-size: 1.3rem;
}
.carousel {
    width: 100%;
    overflow: hidden;
    padding-bottom: 100px;
  }
  
  .scroll {
    display: flex;
    gap: 3vw;
    animation: scroll 30s linear infinite;
    width: max-content;
  }
  
  .scroll:hover {
    animation-play-state: paused;
  }
  
  .scroll img {
    height: clamp(40px, 6vw, 80px); /* s’adapte selon la largeur de l’écran */
    flex-shrink: 0;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
  }
  
  @keyframes scroll {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }
  .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
  }
  
  .grid-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* garde le ratio 1920x1080 */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  .grid-item img:hover,
  .grid-item img:focus,
  .grid-item img:active {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}
  .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .contact-section {
    width: 50%;
    margin: 0 auto 100px;
    padding: 40px 20px;
    
    border-radius: 10px;
    font-family: 'Cooper Black', serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    color: #f5f5d4;
  }
  
  .contact-section h4 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
  }
  
  .contact-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .contact-section input,
  .contact-section textarea {
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #444;
    color: #f5f5d4;
    font-family: 'Cooper Black', serif;
  }
  
  .contact-section textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  .contact-section button {
    padding: 12px;
    background-color: #f5f5d4;
    color: #2e2e2e;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .contact-section button:hover {
    background-color: #d1d1a3;
  }
  @media (max-width: 980px) {
    header{
      display: flex;
      justify-content: center;
      padding-right: 0px;
    }
    .moi{
    width:30%;
    height: 30%;
}
    .grid-container {
      grid-template-columns: repeat(2, 1fr);
    }
    .txt{
        font-size: 1rem;
        width: 90%;
    }
    .txt p{
      font-size: 1rem;
      max-width: 100%;
  }
    .moi1{
        display: flex;
        align-items: center;
        flex-direction: column-reverse;
    }
    header nav a{
      font-size: 1rem;
  }
  h1{
    font-size: 1.5rem;
  }
  h2{
    font-size: 1rem;
  }
  .port1{
    padding-bottom: 100px;
  }
  }
  
  @media (max-width: 600px) {
    .grid-container {
      grid-template-columns: 1fr;
    }
  header nav{
    display: flex;
    flex-direction: column;
  }
  header nav a {
    padding: 3px;
  }
      .moi{
    width:40%;
    height: 40%;
}
  .port1{
    padding-top:100px ;
    padding-bottom: 70px;
}
  }
