/* Base Styles */
:root {
  --primary-color: #4c2aa7;
  --secondary-color: #65a1c9;
  --accent-color: #bb0d4798;
  --light-color: #ffffff;
  --dark-color: #333333;
  --gray-color: #f8f9fa;
  --gray-text: #555555;
  --shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  background-color: var(--light-color);
  color: var(--dark-color);
  position: relative;
  overflow-x: hidden;
  background-image: url('../images/pattern-bg.png');
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

a.primary {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a.secondary {
  text-decoration: none;
  color: white;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* Sections */
section {
  padding: 6rem 0;
  position: relative;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.92);
  z-index: 0;
}

section .container {
  position: relative;
  z-index: 2;
}

/* Header Navigation */
header {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: flex;
  align-items: center;
}

.logo::before {
  content: '\f0c3';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 1.2rem;
  margin-right: 0.5rem;
  /*background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));*/
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu {
  display: flex;
  list-style: none;
}

.menu li {
  margin-left: 2rem;
}

.menu a {
  color: var(--dark-color);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
}

.menu a:hover {
  color: var(--primary-color);
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s;
}

.menu a:hover::after {
  width: 100%;
}

/* Hero Section */
#hero {
  padding: 12rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

#hero::before {
  background-color: rgba(255, 255, 255, 0.85);
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  animation: fadeInLeft 1s ease-out;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-text p {
  font-size: 1.2rem;
  color: var(--gray-text);
  margin-bottom: 2rem;
}

.hero-text .icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-text .icons i {
  font-size: 2rem;
  animation: bounce 2s infinite;
}

.hero-text .icons i:nth-child(1) {
  color: var(--secondary-color);
}

.hero-text .icons i:nth-child(2) {
  color: var(--primary-color);
  animation-delay: 0.3s;
}

.hero-text .icons i:nth-child(3) {
  color: var(--accent-color);
  animation-delay: 0.6s;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s ease-out;
}

.profile-container {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid white;
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}

.profile-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(231, 76, 60, 0.3));
  opacity: 0;
  transition: var(--transition);
}

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

.profile-container:hover::before {
  opacity: 1;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section Styles */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.2rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 0.8rem auto;
}

.section-title i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* Presentation Section */
.presentation-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
}

.presentation-content p {
  margin-bottom: 1.5rem;
}

/* CV Section */
#cv {
  position: relative;
}

#cv::before {
  background-color: rgba(248, 249, 250, 0.95);
}

.cv-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.cv-section h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.cv-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

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

.cv-item h4 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--secondary-color);
}

.cv-item .institution {
  color: var(--gray-text);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.skills-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.skills-list li {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 0.8rem 1rem;
  border-radius: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.skills-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.skills-list li::before {
  content: '\f0c3';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 0.8rem;
  color: var(--secondary-color);
}

.cv-download {
  text-align: center;
  margin-top: 3rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-image-slice: 1;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.project-card:hover .project-icon {
  transform: rotate(360deg);
}

.project-icon i {
  font-size: 1.8rem;
  color: white;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--gray-text);
  margin-bottom: 1.5rem;
}

.read-more {
  font-weight: 600;
  display: inline-block;
  position: relative;
}

.read-more::after {
  content: '\f061';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: var(--transition);
}

.read-more:hover::after {
  margin-left: 0.8rem;
}

/* Contact Section */
#contact {
  position: relative;
}

#contact::before {
  background-color: rgba(248, 249, 250, 0.95);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 1rem;
  border-radius: 10px;
}

.contact-info p i {
  font-size: 1.5rem;
  margin-right: 1rem;
}
.contact-info p:hover {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow);
  transform: translateX(5px);
}

.contact-info i {
  color: var(--secondary-color);
  /* margin-right: 1rem; */
  width: 20px;
  text-align: center;
}

.social-info i {
  color: white;
  /* margin-right: 1rem; */
  width: 20px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 45px;
  height: 45px;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.social-link:nth-child(1) {
  background: linear-gradient(135deg, #333, #6e5494);
}

.social-link:nth-child(2) {
  background: linear-gradient(135deg, #333, #6e5494);
}

.social-link:nth-child(3) {
  background: linear-gradient(135deg, #333, #6e5494);
}

.social-link:nth-child(4) {
  background: linear-gradient(135deg, #333, #6e5494);
}

.social-link:nth-child(5) {
  background: linear-gradient(135deg, #333, #6e5494);
}

.social-link:nth-child(6) {
  background: linear-gradient(135deg, #333, #6e5494); /* GitHub style */
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.social-link:hover {
  transform: translateY(-5px) rotate(10deg);
  color: white;
}

.social-link:hover::before {
  opacity: 1;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Button */
.button {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  display: inline-block;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  transition: var(--transition);
  z-index: -1;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  color: white;
}

.button:hover::before {
  width: 100%;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/pattern-bg-light.png');
  opacity: 0.1;
  z-index: 0;
}

footer .container {
  position: relative;
  z-index: 1;
}

/* Animations */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animations supplémentaires */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text {
    margin-top: 2rem;
  }

  .hero-text .icons {
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .cv-content {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .menu {
    display: none;
  }
  
  /* Hamburger menu pour mobile */
  .mobile-menu-toggle {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 90%; /* Shrink everything slightly if needed */
  }

  .section-title {
    font-size: 1.5rem;
  }

  .hero-text p,
  .presentation-content p,
  .cv-item p {
    font-size: 0.95rem;
  }

  .social-link {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
  }
}

/* Suppression des anciennes décorations fixes d'erlenmeyers */
.flask-decoration {
  display: none;
}
