/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

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

html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3 ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-width: 90vw;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3 ease-in-out;
   z-index: 1000;
   box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3 ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  max-width: 100%;
}
.section__pic-container img {
  border-radius: 50%; /* Pour un cercle parfait */
  width: 100%;
  height: 100%;
  object-fit: cover; /* Pour bien cadrer l'image dans le cercle */
  object-position: center 30%;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
  width: auto;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
  flex: 1;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
}

.about-pic {
  border-radius: 2rem;
  width: 320px;
  height: 320px;
  object-fit: cover;
  max-width: 100%;
}

.achievements-container {
  max-width: 600px;
  margin: 0 auto;
}

.achievements-list {
  text-align: left;
  line-height: 1.8;
  margin-top: 1rem;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  max-width: 100%;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}
#projects .about-containers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}

.project-title {
  margin: 1rem;
  color: black;
}

.project-btn {
  color: black;
  border-color: rgb(163, 163, 163);
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

/* Hackathon Section Styles */
#hackathon {
  padding: 80px 20px;
  background-color: white;
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #2c3e50;
  margin-bottom: 60px;
  background-color: white;
  padding: 12px 30px;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  max-width: 100%;
}

/* Timeline Container */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* Vertical Line */
.timeline::before {
  content: '';
  position: absolute;
  width: 3px;
  background-color: black;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Timeline Item */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
  margin-bottom: 50px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
}

/* Timeline Content */
.timeline-content {
  background: white;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
}

.timeline-content .date {
  display: inline-block;
  color: #95a5a6;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-style: italic;
}

.timeline-content p {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 15px 0 0 0;
}

/* Timeline Icons */
.timeline-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: black;
  border-radius: 50%;
  top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
  z-index: 1;
}

.timeline-item.left .timeline-icon {
  right: -30px;
}

.timeline-item.right .timeline-icon {
  left: -30px;
}

.timeline-icon svg {
  width: 30px;
  height: 30px;
  color: white;
}

#workflow {
  position: relative;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
}

.workflow-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  border: rgb(163, 163, 163) 0.1rem solid;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.workflow-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.workflow-item .icon {
  cursor: default;
  flex-shrink: 0;
}

.workflow-item h3 {
  font-size: 1rem;
  color: rgb(53, 53, 53);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.workflow-item p {
  font-size: 0.9rem;
  color: rgb(85, 85, 85);
}







@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animation Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Slide In Left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Slide In Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Rotate In */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Classe pour les éléments animés */
.animate {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Smooth Body Opacity */
body {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Navigation avec effet de scroll */
nav {
  transition: all 0.3s ease;
}

/* Images de profil avec transition */
.section__pic-container img,
.about-pic {
  transition: transform 0.3s ease;
}

.section__pic-container:hover img {
  transform: scale(1.05);
}

.about-pic:hover {
  transform: rotate(5deg) scale(1.05);
}

/* Boutons avec effets */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Liens de navigation avec underline animé */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: black;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Cards avec effet hover */
.details-container,
.color-container,
.workflow-item {
  transition: all 0.3s ease;
}

.details-container:hover,
.color-container:hover,
.workflow-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Articles de compétences */
article {
  transition: transform 0.3s ease;
}

article:hover {
  transform: scale(1.1);
}

/* Icônes sociales */
#socials-container .icon {
  transition: all 0.3s ease;
}

#socials-container .icon:hover {
  transform: scale(1.2) rotate(5deg);
}

/* Timeline items */
.timeline-item {
  transition: all 0.8s ease;
}

.timeline-content {
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-icon {
  transition: all 0.3s ease;
}

.timeline-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Images de projet */
.project-img {
  transition: transform 0.3s ease;
}

.color-container:hover .project-img {
  transform: scale(1.05);
}

/* Titres avec animation */
.title {
  transition: all 0.8s ease;
}

/* Section text */
.section__text__p1,
.section__text__p2 {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

.section__text__p1 {
  animation-delay: 0.2s;
}

.section__text__p2 {
  animation-delay: 0.4s;
}

/* Loader (optionnel) */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Contact icons */
.contact-icon {
  transition: all 0.3s ease;
}

.contact-info-container:hover .contact-icon {
  transform: scale(1.2);
}

/* Arrow animation */
.arrow {
  animation: bounce 2s infinite;
  transition: all 0.3s ease;
  cursor: pointer;
}

.arrow:hover {
  animation: none;
  transform: scale(1.2);
}

/* Responsive animations - désactiver sur mobile */
@media screen and (max-width: 768px) {
  .details-container:hover,
  .color-container:hover,
  .workflow-item:hover {
    transform: none;
  }
  
  article:hover {
    transform: none;
  }
  
  .timeline-content:hover {
    transform: none;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Optimisation des performances */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* GPU Acceleration pour les animations */
.section__pic-container img,
.about-pic,
.details-container,
.color-container,
.workflow-item,
article,
.btn {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Transition douce pour tous les liens */
a {
  transition: all 0.3s ease;
}

/* Focus states pour l'accessibilité */
a:focus,
button:focus {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* Amélioration du contraste au hover */
.btn:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Gradient animé (optionnel) */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Text shimmer effect (optionnel) */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}