/* ============================================
   HOMEPAGE.CSS - Styles spécifiques à la page d'accueil
   ============================================ */

/* Cercles flottants globaux sur toute la page */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    /* Cercles de 300px avec dégradés */
    radial-gradient(circle 300px at 10% 20%,
      rgba(255, 122, 90, 0.15) 0%,
      rgba(255, 165, 0, 0.1) 30%,
      transparent 70%),
    radial-gradient(circle 300px at 85% 15%,
      rgba(99, 102, 241, 0.12) 0%,
      rgba(139, 92, 246, 0.08) 30%,
      transparent 70%),
    radial-gradient(circle 300px at 25% 80%,
      rgba(255, 122, 90, 0.1) 0%,
      rgba(255, 105, 180, 0.06) 30%,
      transparent 70%),
    radial-gradient(circle 300px at 75% 70%,
      rgba(16, 185, 129, 0.1) 0%,
      rgba(52, 211, 153, 0.06) 30%,
      transparent 70%),
    radial-gradient(circle 300px at 50% 50%,
      rgba(99, 102, 241, 0.08) 0%,
      rgba(124, 58, 237, 0.05) 30%,
      transparent 70%),
    radial-gradient(circle 300px at 90% 90%,
      rgba(255, 122, 90, 0.12) 0%,
      rgba(251, 146, 60, 0.08) 30%,
      transparent 70%);
  animation: globalFloatCircles 40s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Animation pour les cercles globaux */
@keyframes globalFloatCircles {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  25% {
    transform: translate(30px, -50px) rotate(90deg) scale(1.1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-20px, -80px) rotate(180deg) scale(0.9);
    opacity: 1;
  }
  75% {
    transform: translate(-40px, -30px) rotate(270deg) scale(1.05);
    opacity: 0.9;
  }
}
.hero {
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  min-height: 90vh; /* Réduit de 100vh à 90vh */
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 122, 90, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Cercles flottants en arrière-plan */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    /* Cercles de différentes tailles et positions */
    radial-gradient(circle 60px at 15% 20%, rgba(255, 122, 90, 0.15) 0%, transparent 50%),
    radial-gradient(circle 40px at 85% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle 80px at 25% 70%, rgba(255, 122, 90, 0.08) 0%, transparent 50%),
    radial-gradient(circle 35px at 75% 75%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(circle 50px at 10% 85%, rgba(255, 122, 90, 0.1) 0%, transparent 50%),
    radial-gradient(circle 70px at 90% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle 45px at 50% 10%, rgba(255, 122, 90, 0.12) 0%, transparent 50%),
    radial-gradient(circle 30px at 35% 90%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  animation: floatCircles 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Barre orange à la fin du Hero */
.hero-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px; /* Réduit de 80px à 60px */
  background: var(--gradient-primary);
  z-index: 10;
}

.hero-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 3; /* Au-dessus des cercles */
}

.hero-content {
  max-width: 600px;
  position: relative;
}

.hero-navigation {
  position: absolute;
  top: -60px;
  right: 0;
  display: flex;
  gap: var(--space-4);
}

.nav-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--gray-600);
}

.nav-arrow:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

.nav-arrow.nav-next {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: var(--white);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  font-weight: var(--font-normal);
  text-align: justify;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-person {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.person-bg-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FF7A5A 0%, #6366F1 100%);
  border-radius: 50%;
  z-index: 1;
}

.person-img {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  z-index: 2;
}



.card-icon.creation-web {
  background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.card-icon.communication {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.card-icon.expertises {
  background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
}

.card-icon.consulting {
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
}

/* About Section */
.about-section {
  padding: var(--space-16) 0;
  background: transparent; /* Suppression du background gris */
  position: relative;
  z-index: 1;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-text h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
}

.about-text p {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  text-align: justify;
}

.about-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Desktop : cacher l'image mobile, montrer l'image desktop */
.mobile-order {
  display: none;
}

.desktop-order {
  display: flex;
}

.tech-illustration {
  width: 500px;
  height: 350px;
  background: transparent; /* Suppression du gradient violet */
  border-radius: var(--border-radius-xl);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  min-height: 350px;
  /* Suppression de tous les effets de flottement */
}

/* Suppression de l'animation techPulse */
.tech-illustration::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  /* Animation supprimée */
  z-index: 5;
}

.tech-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  position: relative;
  z-index: 2;
  /* Suppression de la transition de transform */
  background: transparent;
}

/* Contenu de fallback pour la tech illustration */
.tech-content {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  z-index: 3;
  position: relative;
}

.tech-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
}

.tech-content h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-2);
  color: white;
}

.tech-content p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.tech-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.3) 0%, rgba(124, 58, 237, 0.2) 50%, rgba(255, 122, 90, 0.3) 100%);
  z-index: 3;
}

.tech-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: var(--text-lg);
  box-shadow: var(--shadow-lg);
  /* Animation supprimée */
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.floating-icon:hover {
  transform: translateY(-10px) scale(1.2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.floating-icon:hover {
  transform: translateY(-10px) scale(1.2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.floating-icon.icon-1 {
  top: 20%;
  left: 18%;
  animation-delay: 0s;
}

.floating-icon.icon-2 {
  top: 25%;
  right: 12%;
  animation-delay: 0.5s;
}

.floating-icon.icon-3 {
  bottom: -10%;
  left: 15%;
  animation-delay: 1s;
}

.floating-icon.icon-4 {
  bottom: -25%;
  right: 15%;
  animation-delay: 1.5s;
}

/* Hover effect for tech illustration */
.tech-illustration:hover .floating-icon {
  animation-play-state: paused;
}

.tech-illustration:hover .tech-img {
  transform: scale(1.05);
  transition: 0.5s ease;
}

/* Formations Section */
.formations-section {
  padding: var(--space-16) 0;
  background: transparent; /* Suppression du gradient orange */
  position: relative;
}

/* Overlay pour la section formations sur toute la page */
.formations-section::before {
  content: '';
  position: fixed; /* Sur toute la page */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.3) 0%, rgba(254, 215, 170, 0.2) 100%);
  opacity: 0.5; /* Diminution de l'opacité */
  pointer-events: none;
  z-index: -2; /* Derrière les cercles globaux */
}

.formations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5); /* Réduit de var(--space-6) */
  margin-top: var(--space-10); /* Réduit de var(--space-12) */
}

.formation-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.formation-card:hover {
  /* Suppression du transform qui fait grandir */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.formation-card.featured {
  border: 2px solid transparent;
  box-shadow: 0 10px 15px -3px rgba(255, 122, 90, 0.2), 0 4px 6px -2px rgba(255, 122, 90, 0.1);
}

.formation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.formation-card:hover::before {
  left: 100%;
}

.formation-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.formation-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Suppression de la transition transform */
}

.formation-card:hover .formation-image img {
  /* Suppression de l'effet scale */
}

.formation-content {
  padding: var(--space-5);
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.formation-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.formation-content p {
  color: var(--gray-600);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.formation-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--primary-color);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--border-radius);
  margin-top: auto;
}

.formation-link:hover {
  color: var(--primary-dark);
  gap: var(--space-3);
  background: rgba(255, 122, 90, 0.1);
  border-radius: var(--border-radius-lg);
  padding: var(--space-3) var(--space-4);
}

.formation-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 122, 90, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.formation-link:hover::before {
  width: 100px;
  height: 100px;
}

/* Formation card featured avec le même hover que service-card */
.formation-card.featured:hover {
  border: 2px solid transparent;
  box-shadow: none;
}

/* Newsletter Section */
.newsletter-section {
  background: transparent; /* Suppression du gradient violet */
  padding: var(--space-12) 0;
  position: relative;
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  animation: slideInFromBottom 0.8s ease-out;
}

.newsletter-content h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--gray-900); /* Texte sombre au lieu de blanc */
  margin-bottom: var(--space-8);
}

.newsletter-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--border-radius-full);
  font-size: var(--text-base);
}

.newsletter-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
  width: 40px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.newsletter-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

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

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

/* Loading states */
.formation-card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

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

@keyframes floatCircles {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  25% {
    transform: translate(10px, -15px) scale(1.1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-5px, -25px) scale(0.9);
    opacity: 1;
  }
  75% {
    transform: translate(-15px, -10px) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes techPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

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

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Initial states for animations */
.hero-content {
  animation: heroFadeIn 0.8s ease-out;
}

.hero-image {
  animation: heroFadeIn 0.8s ease-out 0.3s both;
}

.person-bg-circle {
  animation: heroImageFloat 3s ease-in-out infinite;
}

/* Service cards stagger animation */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Micro-interactions for buttons */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgb(225, 225, 225, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }

  .about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-8);
  }

  .about-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
    width: 100%;
    max-width: 600px;
  }

  .about-text h2 {
    margin-bottom: 0;
  }

  .about-text p {
    margin-bottom: 0;
    max-width: 100%;
  }

  .about-image {
    width: 100%;
    max-width: 400px;
  }

  /* Mobile : cacher l'image desktop, montrer l'image mobile */
  .mobile-order {
    display: flex;
  }

  .desktop-order {
    display: none;
  }

  .hero-person {
    max-width: 300px;
    width: 100%;
  }

  .person-img {
    max-height: 350px;
  }

  .tech-illustration {
    width: 400px;
    height: 280px;
  }

  .floating-icon {
    width: 35px;
    height: 35px;
    font-size: var(--text-base);
  }

  .hero-navigation {
    position: static;
    justify-content: center;
    margin-bottom: var(--space-6);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: var(--space-20) 0;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-buttons {
    justify-content: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .formations-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .tech-illustration {
    width: 300px;
    height: 200px;
  }

  .floating-icon {
    width: 30px;
    height: 30px;
    font-size: var(--text-sm);
  }

  .newsletter-section {
    text-align: center;
    padding: var(--space-16) 0;
  }

  .newsletter-content {
    text-align: center;
    margin: 0 auto;
    padding: 0 var(--space-4);
  }

  .newsletter-content h2 {
    text-align: center;
    margin-bottom: var(--space-6);
  }

  .newsletter-form {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
    align-items: center;
  }

  .newsletter-btn {
    position: static;
    width: auto;
    border-radius: var(--border-radius-lg);
    padding: var(--space-3) var(--space-6);
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .formations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-person {
    max-width: 250px;
    width: 100%;
  }

  .person-img {
    max-height: 280px;
  }

  .tech-illustration {
    width: 280px;
    height: 180px;
  }

  .floating-icon {
    width: 25px;
    height: 25px;
    font-size: var(--text-xs);
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
  }

  .formation-card {
    margin: 0 var(--space-4);
  }
}

/* Accessibility and modern features */
.parallax-section {
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Focus states for accessibility */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .hero-navigation,
  .newsletter-section,
  .social-links,
  .floating-icon {
    display: none;
  }

  .hero-container,
  .about-content {
    gap: var(--space-6);
  }

  .formation-card {
    break-inside: avoid;
  }
}