/* KodingKids Enrollment - Styles améliorés */

.kkids-wizard {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 50px;
  gap: 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s;
}

.step.active .step-circle {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
  transform: scale(1.1);
}

.step.completed .step-circle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.step span {
  font-size: 14px;
  font-weight: bold;
  color: #6b7280;
}

.step.active span, .step.completed span {
  color: #14b8a6;
}

.step-line {
  width: 80px;
  height: 3px;
  background: #e5e7eb;
  transition: all 0.3s;
}

.step.completed + .step-line {
  background: linear-gradient(90deg, #10b981, #14b8a6);
}

/* Headers */
.step-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.step-header h2 {
  margin: 0;
  font-size: 32px;
  color: #1e293b;
  font-weight: 700;
}

.btn-back {
  position: absolute;
  left: 0;
  background: white;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-back:hover {
  background: white !important;
  border-color: #14b8a6 !important;
  color: #14b8a6 !important;
  transform: translateX(-2px);
}

/* Price Summary Widget global */
.price-summary-global {
  margin: 20px 0 10px 0;
  display: flex;
  justify-content: flex-end;
}

/* Afficher un placeholder quand vide */
.price-placeholder {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 3px solid #e5e7eb;
  border-radius: 20px;
  padding: 25px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  width: 350px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.price-placeholder .price-main {
  color: #6b7280;
  font-size: 18px;
  font-weight: 600;
}

.price-summary-widget {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 2px solid #14b8a6;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.15);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
}

.price-summary-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #14b8a6, #0d9488, #14b8a6);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

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

.price-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.price-toggle button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600; 
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  color: #64748b;
  position: relative;
}

.price-toggle button.active {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
  transform: translateY(-1px);
}

.price-toggle button[data-pay="ann"]::after {
  content: 'Économisez jusqu\'à 1850 dh';
  position: absolute;
  top: -16px;
  right: -20px;
  background: linear-gradient(135deg, #b9404c, #BE1E2D);
  color: white;
  font-size: 9px;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(185, 64, 76, 0.286);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 120px;
  text-align: center;
}

.total-price {
  text-align: center;
  margin-bottom: 15px;
}

.price-main {
  font-size: 28px;
  font-weight: 800;
  color: #14b8a6;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(20, 184, 166, 0.1);
}

.price-per-month {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.product-details {
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  color: #0d9488;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
 
.product-name::before {
  content: '🎯';
  font-size: 18px;
}

.product-info {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.info-item .icon {
  width: 16px;
  text-align: center;
  opacity: 0.7;
}

.schedule-info {
  background: rgba(20, 184, 166, 0.1);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  border-left: 3px solid #14b8a6;
}

.schedule-info .schedule-time {
  font-weight: 600;
  color: #0d9488;
  font-size: 14px;
}

.price-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

.price-loader::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #14b8a6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Loading states */
.loading-additional {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.loading-additional .loader {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #14b8a6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loading-additional p {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.error-additional {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.error-additional p {
  color: #ef4444;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.price-widget {
  animation: slideInUp 0.5s ease-out;
}

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

.product-details {
  animation: fadeIn 0.3s ease-out 0.2s both;
}

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

/* Level Cards */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.level-card {
  background: transparent;
  border: none;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.level-card:hover {
  transform: translateY(-5px);
}

.level-card.selected {
  transform: translateY(-5px);
}

.level-image {
  width: 100%;
  height: 370px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
}

.level-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

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

/* Responsive pour les images */
@media (max-width: 768px) {
  .level-image {
    height: 600px;
  }
  
  .level-image img {
    object-fit: contain;
  }
  
  .level-card {
    padding: 20px;
  }
  
  .level-card h3 {
    font-size: 22px;
  }
  
  .level-card p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .level-image {
    height: 300px;
  }
  
  .level-image img {
    object-fit: contain;
  }
  
  .levels-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.level-card h3 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #0d9488;
}

.level-card p {
  color: #6b7280;
  font-size: 18px;
  margin-bottom: 20px;
}

/* Slots */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

/* Layout pour créneaux + carte prix */
.schedule-section {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.schedule-section > div:first-child {
  flex: 1;
}

.schedule-section .price-summary-global {
  flex: 0 0 420px;
  margin: 0;
}

/* Layout pour step 3 - formulaire à gauche, carte prix à droite */
.information-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 100%;
}

.information-layout #inscription-form {
  flex: 1;
  min-width: 0;
}

.information-layout .price-summary-global {
  flex: 0 0 380px;
  margin: 0;
}

/* Responsive pour les créneaux */
@media (max-width: 1200px) {
  .schedule-section,
  .information-layout {
    flex-direction: column;
  }
  
  .schedule-section .price-summary-global {
    flex: none;
    align-self: flex-end;
  }
  
  .information-layout .price-summary-global {
    flex: none;
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .products-grid .slots-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .additional-products .slot-card {
    padding: 10px 12px;
    min-height: 80px;
  }
  
  .additional-products .slot-info h4 {
    font-size: 11px;
    line-height: 1.3;
  }
  
  .additional-products .slot-status {
    font-size: 8px;
    padding: 3px 6px;
  }
  
  .no-additional-course {
    font-size: 10px;
    padding: 8px 10px;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .slots-grid {
    grid-template-columns: 1fr;
  }
  
  .products-grid .slots-grid {
    grid-template-columns: 1fr !important;
  }
  
  .additional-products .slot-card {
    padding: 12px 16px;
    min-height: 60px;
  }
  
  .additional-products .slot-info h4 {
    font-size: 13px;
  }
  
  .no-additional-course {
    font-size: 12px;
    padding: 12px 16px;
  }
}

.slot-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 60px;
}

.slot-card:hover:not(.unavailable):not(.full) {
  border-color: #14b8a6;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
  transform: translateY(-1px);
}

.slot-card.selected {
  border-color: #14b8a6;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
}

/* Slot content */
.slot-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.slot-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #f3f4f6;
  flex-shrink: 0;
}

.slot-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 2px 0;
  line-height: 1.2;
}

.slot-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 500;
}

.slot-time::before {
  content: '🕐';
  font-size: 11px;
}

/* Slot status */
.slot-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Available */
.slot-card.available .slot-status {
  background: #dcfce7;
  color: #166534;
}

.slot-card.available .slot-icon {
  background: #dcfce7;
  color: #166534;
}
 
/* Last places */
.slot-card.last-places {
  background: linear-gradient(135deg, #fcf5ed, #ffffff);
  border: 2px solid #fb923c;
}

.slot-card.last-places .slot-status {
  background: #fed7aa;
  color: #c2410c;
} 

.slot-card.last-places .slot-icon {
  background: #fed7aa;
  color: #c2410c;
}

.slot-card.last-places .slot-info h4 {
  color: #ea580c;
}

/* Full */
.slot-card.full {
  background: #f9fafb;
  border-color: #e5e7eb;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.slot-card.full .slot-status {
  background: #f3f4f6;
  color: #6b7280;
}

.slot-card.full .slot-icon {
  background: #f3f4f6;
  color: #6b7280;
}

.slot-card.full .slot-info h4,
.slot-card.full .slot-time {
  color: #6b7280;
}

/* Unavailable */
.slot-card.unavailable {
  background: #f9fafb;
  border-color: #e5e7eb;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.slot-card.unavailable .slot-status {
  background: #f3f4f6;
  color: #6b7280;
}

/* Masquer le texte "undefined places" */
.slot-card small,
.slot-card .places,
.slot-card *:contains("undefined"),
.slot-card *:contains("places") {
  display: none !important;
}

/* Nettoyer le contenu des slots */
.slot-card::after {
  content: none !important;
}

.slot-card * {
  line-height: 1.4;
}

/* Forcer un affichage propre */
.slot-card {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

/* Schedule sections */
.schedule-section {
  margin: 30px 0;
}

.schedule-section h3 {
  color: #0d9488;
  margin-bottom: 15px;
  font-size: 20px;
}

/* Produits additionnels - même style que section principale */
.additional-products {
  margin: 30px 0;
  display: none;
}

.additional-products.show {
  display: block !important;
}

.additional-products h3 {
  color: #0d9488;
  margin-bottom: 15px;
  font-size: 20px;
}

.additional-products p {
  color: #6b7280;
  font-size: 16px;
  margin-bottom: 20px;
} 

.products-grid { 
  display: block;
  margin: 0;
}

.products-grid h3 {
  color: #0d9488;
  margin: 0 0 15px 0;
  font-size: 20px;
}

.products-grid p {
  color: #6b7280;
  font-size: 16px;
  margin: 0 0 20px 0;
}

.products-grid .slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.product-option {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  gap: 15px;
  transition: all 0.3s;
}

.product-option:hover {
  border-color: #14b8a6;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.product-icon {
  font-size: 40px;
  width: 60px;
  text-align: center;
}

.product-info {
  flex: 1;
  text-align: left;
}

.product-info h4 {
  margin: 0 0 5px 0;
  color: #1f2937;
  font-size: 18px;
}

.product-info p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 14px;
}

.product-price {
  color: #14b8a6;
  font-weight: 600;
  font-size: 13px;
}

/* Carte "Je ne veux pas ajouter de cours supplémentaire" */
.no-additional-course {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.no-additional-course:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.2);
}

.no-additional-course.selected {
  border-color: #9ca3af;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  color: #6b7280;
}

.no-additional-course::before {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}
.additional-products .slot-card {
  padding: 12px 16px;
}

.additional-products .slot-card .slot-price {
  display: none !important;
}

.additional-products .slot-card:hover {
  border-color: #14b8a6;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
  text-decoration: none;
  color: #374151;
}

.additional-products .slot-card.selected {
  border-color: #14b8a6;
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
}

.btn-skip-additional {
  background: #e5e7eb;
  color: #6b7280;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
  margin-top: 20px;
}

.btn-skip-additional:hover {
  background: #d1d5db;
}

/* Checkout button */
.btn-checkout {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
  border: none;
  padding: 20px 40px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
  margin-top: 10px;
  margin-bottom: 80px;
}

.btn-checkout:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-checkout:not(:disabled):hover {
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
  transform: translateY(-2px);
}

/* Bouton checkout direct pour utilisateurs connectés */
.btn-direct-checkout {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  padding: 20px 40px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
  margin-top: 30px;
}

.btn-direct-checkout:hover {
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

/* Message utilisateur connecté */
.kkids-already-logged {
  background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
  border: 2px solid #14b8a6;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

.kkids-already-logged p {
  margin: 10px 0;
  color: #0d9488;
  font-size: 16px;
}

.kkids-already-logged strong {
  color: #065f46;
  font-weight: 700;
}

/* Utility classes */
.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  #price-summary, #price-summary-2 {
    position: static;
    transform: none;
    margin: 20px 0;
    display: flex;
    justify-content: center;
  }
  
  .price-summary-widget {
    width: 100%;
    max-width: 400px;
  }
  
  .price-main {
    font-size: 24px;
  }
  
  .product-info {
    font-size: 12px;
  }
  
  .levels-grid {
    grid-template-columns: 1fr;
  }
  
  .step-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  #level-selection .progress-steps {
    display: none;
  }
  
  .progress-steps {
    flex-wrap: wrap;
    padding: 15px 10px;
    gap: 8px;
  }
  
  .step-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  .step span {
    font-size: 10px;
  }
  
  .step-line {
    width: 25px;
    height: 2px;
  }
  
  /* Prix fixe mobile */
  .mobile-price-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 -4px 12px rgba(20, 184, 166, 0.4);
    font-size: 14px;
    font-weight: 700;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-price-fixed .price-label {
    font-size: 12px;
    opacity: 0.9;
  }
}
/* Loading form */
.loading-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-form .loader {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #14b8a6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-form p {
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

/* Badge Recommandé */
.recommended-badge {
  background: #f59e0b;
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 8px;
}
.wa__btn_popup {
  bottom: 70px !important;
}