@media screen and (max-width: 1400px) {
  #profile {
    height: 83vh;
    margin-bottom: 6rem;
  }
  .about-containers {
    flex-wrap: wrap;
  }
  #contact,
  #projects {
    height: fit-content;
  }
  
}

@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none;
  }
  #hamburger-nav {
    display: flex;
  }
  #experience,
  .experience-details-container {
    margin-top: 2rem;
  }
  #profile,
  .section-container {
    display: block;
  }
  .arrow {
    display: none;
  }
  section,
  .section-container {
    height: fit-content;
  }
  section {
    margin: 0 5%;
  }
  .section__pic-container {
    width: 275px;
    height: 275px;
    margin: 0 auto 2rem;
  }
  .section__pic-container img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .about-pic-wrapper {
    margin: 0 auto 2rem;
    min-width: auto;
  }
  .about-pic {
    width: 280px;
    height: 280px;
  }
  .about-containers {
    margin-top: 0;
  }
  
  /* Workflow responsive */
  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem;
    gap: 1.5rem;
  }
}
@media screen and (max-width: 900px) {
  #projects .about-containers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  #hackathon .section-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
    padding: 10px 20px;
  }

  #hackathon .timeline::before {
    left: 30px;
  }

  #hackathon .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 20px;
    left: 0 !important;
    text-align: left !important;
  }

  #hackathon .timeline-item.left {
    text-align: left;
  }

  #hackathon .timeline-icon {
    left: 0 !important;
    right: auto !important;
  }

  #hackathon .timeline-content h3 {
    font-size: 1.1rem;
  }

  #hackathon .timeline-content p {
    font-size: 0.9rem;
  }
  
  /* Workflow responsive */
  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }
}

@media screen and (max-width: 600px) {
  #contact,
  footer {
    height: auto;
    min-height: 40vh;
  }
  
   #projects .about-containers {
    grid-template-columns: 1fr;
  }
  /* Réduction de l'espace vide du profil */
  #profile {
    height: auto;
    min-height: 70vh;
    margin-bottom: 2rem;
    padding-top: 2vh;
  }
  
  article {
    font-size: 1rem;
  }
  footer nav {
    height: fit-content;
    margin-bottom: 2rem;
  }
  .about-containers,
  .contact-info-upper-container,
  .btn-container {
    flex-wrap: wrap;
  }
  .contact-info-container {
    margin: 0;
  }
  .contact-info-container p,
  .nav-links li a {
    font-size: 1rem;
  }
  .experience-sub-title {
    font-size: 1.25rem;
  }
  .logo {
    font-size: 1.5rem;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  /* Photo de profil plus compacte */
  .section__pic-container {
    width: 250px;
    height: 250px;
    margin: 1rem auto 1.5rem;
  }
  .section__pic-container img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Texte du profil */
  .section__text {
    margin-top: 0;
  }
  
  .section__text__p1 {
    margin-bottom: 0.5rem;
  }
  
  .section__text__p2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .title {
    font-size: 2rem;
    margin: 0.5rem 0;
  }
  
  .btn-container {
    margin: 1rem 0;
  }
  
  #socials-container {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* About section */
  .about-pic-wrapper {
    margin-bottom: 2rem;
  }
  .about-pic {
    width: 240px;
    height: 240px;
  }
  
  .text-container {
    text-align: justify;
  }
  
  /* Réduire l'espace entre les sections */
  section {
    padding-top: 2vh;
    margin-bottom: 2rem;
  }
  
  
  /* Workflow responsive */
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .workflow-item {
    padding: 1.2rem;
  }
}

@media screen and (max-width: 480px) {
  #hackathon {
    padding: 50px 15px;
  }

  #hackathon .section-title {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }

  #hackathon .timeline-item {
    padding-left: 70px;
    padding-right: 10px;
    margin-bottom: 40px;
  }

  #hackathon .timeline-icon {
    width: 50px;
    height: 50px;
  }

  #hackathon .timeline-icon svg {
    width: 25px;
    height: 25px;
  }

  #hackathon .timeline-content {
    padding: 20px;
  }

  #hackathon .timeline-content h3 {
    font-size: 1rem;
  }

  #hackathon .timeline-content p {
    font-size: 0.85rem;
  }
  
  /* Profil encore plus compact sur très petits écrans */
  #profile {
    height: auto;
    min-height: 65vh;
    padding-top: 1vh;
    margin-bottom: 1rem;
  }
  
  .section__pic-container {
    width: 220px;
    height: 220px;
    margin: 0.5rem auto 1rem;
  }
  
  .title {
    font-size: 1.8rem;
  }
  
  .section__text__p2 {
    font-size: 1.1rem;
  }
  
  section {
    padding-top: 1vh;
  }
  
  /* Workflow responsive */
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
  }
  
  .workflow-item {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
  
  .workflow-item h3 {
    font-size: 0.95rem;
  }
  
  .workflow-item p {
    font-size: 0.85rem;
  }
}

/* Petits smartphones (iPhone 13 mini, iPhone SE, etc.) */
@media screen and (max-width: 390px) {
  section {
    margin: 0 4%;
  }

  .title {
    font-size: 1.6rem;
  }

  .section__text__p2 {
    font-size: 1rem;
  }

  .btn {
    width: 7rem;
    padding: 0.8rem;
    font-size: 0.85rem;
  }

  .btn-container {
    gap: 0.6rem;
  }

  article {
    width: 100%;
    max-width: 220px;
  }

  .achievements-container {
    padding: 0 0.5rem;
  }

  .contact-info-container p {
    font-size: 1rem;
    word-break: break-word;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h3 {
    font-size: 1rem;
  }
}