/* Variables CSS pour la cohérence */
:root {
  --primary: #0a3cff;
  --primary-dark: #0033aa;
  --primary-light: #f4f7ff;
  --secondary: #002266;
  --text-dark: #333333;
  --text-light: #ffffff;
  --text-gray: #666666;
  --background: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Reset et styles de base */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* Header et Navigation */
header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-light);
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 75px;
  width: auto;
  filter: brightness(0) invert(1);
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.lang-btn.active {
  background: white;
  color: var(--primary);
  font-weight: 600;
}

/* Hero Section */
.hero {
  padding: 80px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  background: #f0f4ff;
}

/* Sections communes */
section {
  padding: 80px 20px;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  font-weight: 700;
}

.section-title:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--primary);
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* About Section */
.about {
  background: var(--background);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-gray);
}

/* Services Section */
.services {
  background: var(--primary-light);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 35px 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  border-top: 4px solid transparent;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-top: 4px solid var(--primary);
}

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

/* Projects Section */
.projects {
  background: var(--background);
}

.project {
  display: flex;
  gap: 40px;
  align-items: center;
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.project-image {
  flex: 0 0 200px;
}

.project-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.placeholder-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #e6ecff);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.placeholder-image i {
  font-size: 3rem;
  margin-bottom: 10px;
}

.placeholder-image p {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin: 0;
}

.project-content {
  flex: 1;
}

.project h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

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

.project-tech {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Contact Section - Version Compacte */
.contact {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-light);
}

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

.contact-compact {
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item.compact {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item.compact:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 1.8rem;
  color: white;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.contact-details h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  opacity: 0.9;
}

.contact-details p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.social-links-compact {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.social-link-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link-compact:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-5px);
}

/* Carte développeur compacte */
.developer-card-compact {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.developer-avatar {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.developer-info-compact h4 {
  margin: 0 0 5px 0;
  font-size: 1.3rem;
}

.developer-info-compact p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: var(--secondary);
  color: var(--text-light);
  text-align: center;
  padding: 30px 20px;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

footer p {
  margin: 0;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 15px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-link:hover {
  background: white;
  color: var(--secondary);
  transform: translateY(-3px);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.animated {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project {
    flex-direction: column;
    gap: 25px;
    padding: 25px;
  }
  
  .project-image {
    flex: 0 0 auto;
    width: 100%;
  }
  
  .project-image img {
    height: 200px;
  }
  
  .placeholder-image {
    height: 200px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .developer-card-compact {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .nav {
    flex-direction: column;
    gap: 15px;
    padding: 10px 20px;
  }
  
  .logo-img {
    height: 45px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  section {
    padding: 60px 15px;
  }
  
  .card {
    padding: 25px 20px;
  }
  
  .contact-item.compact {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
  }
  
  .contact-icon {
    margin-bottom: 10px;
  }
}
