/* ======================
   Variables et Reset
   ====================== */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --white: #ffffff;
  --black: #000000;
  --transition: all 0.3s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --container-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  position: relative;
  display: inline-block;
}

.underline {
  height: 4px;
  width: 80px;
  background: var(--primary-color);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}

.underline::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 4px;
  background: var(--accent-color);
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  border-radius: 2px;
}

/* ======================
   Navigation
   ====================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

.btn-contact {
  background: var(--primary-color);
  color: white !important;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-contact:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-contact::after {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.hero::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48cGF0aCBkPSJNMjUgMjVIMzVWMzVIMjVWMjVaIiBmaWxsPSIjZTVlN2ViIiBmaWxsLW9wYWNpdHk9IjAuMSIvPjwvc3ZnPg==');
  opacity: 0.5;
  z-index: 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 600px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: rgba(37, 99, 235, 0.2);
  z-index: -1;
  transform: skew(-15deg);
}

.hero h2 {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-image {
  position: relative;
  z-index: 1;
}

.image-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.profile-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.decorative-shape {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  top: 20px;
  left: 20px;
  z-index: 1;
  transition: var(--transition);
}

.image-container:hover .profile-image {
  transform: translate(-10px, -10px);
}

.image-container:hover .decorative-shape {
  transform: translate(10px, 10px);
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 10;
}

.scroll-down i {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: var(--primary-color);
}

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

/* Projects Section */
.projects {
  padding: 6rem 0;
  background-color: var(--white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.project-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-links {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-links {
  opacity: 1;
}

.project-link,
.project-github {
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.project-link:hover,
.project-github:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.project-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
}

.project-info p {
  color: var(--text-light);
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tags span {
  background: #e0e7ff;
  color: var(--primary-color);
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-weight: 500;
}

.view-more {
  text-align: center;
  margin-top: 3rem;
}

/* Skills Section */
.skills {
  padding: 6rem 0;
  background-color: var(--bg-light);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3 i {
  color: var(--primary-color);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-info span:first-child {
  font-weight: 500;
  color: var(--text-color);
}

.skill-info span:last-child {
  color: var(--primary-color);
  font-weight: 600;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  position: relative;
  transition: width 1.5s ease-in-out;
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background-color: var(--white);
}

.contact-intro {
  max-width: 700px;
  margin: 0 auto 3rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  margin-top: 3rem;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--text-color);
}

.contact-details a {
  color: var(--text-light);
  transition: var(--transition);
}

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

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

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

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

/* Footer */
.footer {
  background: var(--bg-dark);
  color: #9ca3af;
  padding: 5rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-logo p {
  margin-top: 1rem;
  line-height: 1.7;
}

.footer-links h3,
.footer-newsletter h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-links h3::after,
.footer-newsletter h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background: var(--primary-color);
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #9ca3af;
  transition: var(--transition);
  display: inline-block;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background: var(--primary-color);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(5px);
}

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

.newsletter-form {
  display: flex;
  margin-top: 1.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 1px solid #374151;
  background: #1f2937;
  color: white;
  border-radius: 50px 0 0 50px;
  font-family: 'Poppins', sans-serif;
}

.newsletter-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-text {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    margin: 0 auto;
  }
  
  .hero p {
    margin: 0 auto 2.5rem;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation for typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color); }
}

.typing-text {
  display: inline-block;
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 1px;
  animation: 
    typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

.contact h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact p {
  font-size: 1.2rem;
}

.contact a {
  color: #3498db;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* Pied de page */
footer {
  background: #1a1a1a;
  padding: 20px;
  color: white;
  font-size: 1rem;
}

footer p {
  margin: 0;
}
#visiter {
  font-style: italic;
  font-size: 25px;
  transition: all 0.3s ease-in-out; /* Transition plus fluide pour toutes les propriétés */
  padding: 9px;
  border: 2px solid transparent; /* Bordure transparente par défaut */
}

#visiter:hover {
  border: 2px solid white;
  border-radius: 15px;
  background: rgba(149, 182, 180, 0.8); /* Utilisation de rgba pour plus de transparence */
  padding: 9px;
  font-size: 20px;
  transform: scale(1.05); /* Léger effet de zoom au survol */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ombre portée */
}

.carousel {
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 50%;
  margin: 0 auto; /* Centrer */
  position: relative;
  display: inline-block;
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-images img {
  max-width: 200px;
  height: 200px;
/* ======================
   Section Portfolio
   ====================== */
.portfolio {
  padding: 4rem 0;
  background-color: var(--bg-light);
  text-align: center;
}

.portfolio-image-container {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.portfolio-image-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image-container:hover .portfolio-image {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .portfolio {
    padding: 3rem 0;
  }
  
  .portfolio-image-container {
    margin: 1.5rem;
    border-radius: 10px;
  }
}

@keyframes fadeIn {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* Styles responsifs */
@media (max-width: 992px) {
  .carousel {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .carousel {
    height: 400px;
  }
  
  .carousel-nav button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .carousel {
    height: 300px;
  }
  
  .carousel-dots {
    bottom: 10px;
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
  }
}
