/* Styles pour la page Formation */

/* Hero section améliorée */
#hero {
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(28, 17, 88, 0.9) 0%, rgba(116, 15, 214, 0.9) 100%);
  z-index: 1;
}

#hero .container-fluid {
  position: relative;
  z-index: 2;
}

#hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  animation: fadeInUp 1s ease;
}

#hero h2 {
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 30px;
  color: #f0f0f0;
  animation: fadeInUp 1.2s ease;
}

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

/* Section des formations */
.formations-section {
  padding: 80px 0;
  background-color: #f8f9fa;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #124265;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 20px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: #5846f9;
  bottom: 0;
  left: calc(50% - 25px);
}

.section-title p {
  font-size: 1.1rem;
  color: #6c757d;
  max-width: 800px;
  margin: 0 auto;
}

/* Formation Cards Container */
.formations-container {
  margin-top: 50px;
  perspective: 1000px;
}

/* Formation Categories Tabs */
.formations-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  perspective: 1000px;
}

.tab-item {
  background: #fff;
  color: #5846f9;
  padding: 12px 25px;
  margin: 5px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid transparent;
}

.tab-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.tab-item.active {
  background: #5846f9;
  color: #fff;
  border-color: #5846f9;
}

/* Formations Cards Container */
.formation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Formation Card Styles */
.formation-card {
  position: relative;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateZ(0);
}

.formation-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.formation-card .card-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.formation-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.formation-card:hover .card-image img {
  transform: scale(1.1);
}

.formation-card .card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #5846f9;
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.formation-card .card-content {
  padding: 25px;
}

.formation-card .card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #124265;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.formation-card:hover .card-title {
  color: #5846f9;
}

.formation-card .card-desc {
  font-size: 0.95rem;
  color: #6c757d;
  margin-bottom: 20px;
}

.formation-card .card-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.formation-card .detail-item {
  display: flex;
  align-items: center;
  color: #6c757d;
  margin-bottom: 8px;
}

.formation-card .detail-item i {
  margin-right: 5px;
  color: #124265;
}

.formation-card .card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #124265;
  margin-bottom: 20px;
}

.formation-card .card-actions {
  display: flex;
  justify-content: space-between;
}

.formation-card .btn-details,
.formation-card .btn-register {
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.formation-card .btn-details {
  background: transparent;
  color: #124265;
  border: 1px solid #124265;
}

.formation-card .btn-details:hover {
  background: #124265;
  color: #fff;
}

.formation-card .btn-register {
  background: #5846f9;
  color: #fff;
  border: 1px solid #5846f9;
}

.formation-card .btn-register:hover {
  background: #d6963a;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(230, 165, 74, 0.3);
}

/* Sélection de formations améliorée */
.formations-selection {
  perspective: 1000px;
  margin: 50px 0;
}

.formations-menu {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.formation-option {
  width: 280px;
  height: 250px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
}

.formation-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
  z-index: 1;
}

.formation-option:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  width: 400px;
  height: 280px;
}

.formation-option.active {
  width: 400px;
  height: 280px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.formation-option.active::before {
  background: linear-gradient(to bottom, rgba(18, 66, 101, 0.7), rgba(18, 66, 101, 0.9));
}

.formation-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.formation-option:hover img {
  transform: scale(1.1);
}

.formation-option .option-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  color: #fff;
  width: calc(100% - 40px);
}

.formation-option .option-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.formation-option:hover .option-title {
  transform: translateY(-5px);
}

.formation-option .option-desc {
  font-size: 0.9rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.formation-option:hover .option-desc,
.formation-option.active .option-desc {
  max-height: 100px;
  opacity: 1;
  margin-bottom: 15px;
}

.formation-option .option-button {
  display: inline-block;
  background: #5846f9;
  color: #fff;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.formation-option:hover .option-button,
.formation-option.active .option-button {
  opacity: 1;
  transform: translateY(0);
}

.formation-option .option-button:hover {
  background: #7b27d8;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(45deg, rgba(28, 17, 88, 0.9) 0%, rgba(116, 15, 214, 0.9) 100%);
  padding: 80px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -150px;
  right: -150px;
}

.cta-section::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  bottom: -200px;
  left: -200px;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.cta-btn {
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.cta-btn.primary {
  background: #5846f9;
  color: #fff;
}

.cta-btn.primary:hover {
  background: #7b27d8;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cta-btn.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.cta-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 992px) {
  #hero h1 {
    font-size: 2.5rem;
  }

  .formation-option {
    width: 260px;
    height: 220px;
  }

  .formation-option:hover,
  .formation-option.active {
    width: 350px;
    height: 250px;
  }
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 2rem;
  }

  #hero h2 {
    font-size: 1.2rem;
  }

  .formation-option {
    width: 100%;
    max-width: 300px;
  }

  .formation-option:hover,
  .formation-option.active {
    width: 100%;
    max-width: 300px;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .cta-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .tab-item {
    margin: 3px;
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .formation-cards {
    grid-template-columns: 1fr;
  }
}
