/* ============================================
   🚀 UX ADVANCED - Améliorations supplémentaires
   ============================================ */

/* ============================================
   BARRE DE PROGRESSION DE LECTURE
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(226, 232, 240, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
}

.reading-progress.visible {
  opacity: 1;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #06B6D4 0%, #10B981 100%);
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* ============================================
   CTA MOBILE STICKY (Bottom Bar)
   ============================================ */
.mobile-cta-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.875rem 1rem;
  z-index: 999;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 2px solid #06B6D4;
}

.mobile-cta-sticky.visible {
  transform: translateY(0);
}

.mobile-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-cta-text {
  flex: 1;
}

.mobile-cta-text strong {
  display: block;
  color: #0F172A;
  font-size: 0.9375rem;
  margin-bottom: 0.125rem;
}

.mobile-cta-text small {
  color: #64748B;
  font-size: 0.75rem;
}

.mobile-cta-btn {
  background: #06B6D4;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

@media (min-width: 769px) {
  .mobile-cta-sticky {
    display: none !important;
  }
}

/* ============================================
   TAP-TO-CALL MOBILE (Floating Button)
   ============================================ */
.tap-to-call-mobile {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  background: #10B981;
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: 2rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 998;
  text-decoration: none;
  animation: slideInRight 0.5s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tap-to-call-mobile .pulse-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

@keyframes slideInRight {
  from {
    transform: translateX(200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .tap-to-call-mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .tap-to-call-mobile {
    display: flex;
  }
}

/* ============================================
   EXIT INTENT POPUP
   ============================================ */
.exit-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

.exit-popup-overlay.active {
  display: flex;
}

.exit-popup {
  background: white;
  max-width: 500px;
  width: 90%;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.exit-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  color: #64748B;
  transition: all 0.2s;
}

.exit-popup-close:hover {
  background: #EF4444;
  color: white;
  transform: rotate(90deg);
}

.exit-popup-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 1rem;
}

.exit-popup h3 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #0F172A;
}

.exit-popup p {
  text-align: center;
  color: #64748B;
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.exit-popup-form {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

.exit-popup-form input {
  padding: 0.875rem 1rem;
  border: 2px solid #E2E8F0;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.exit-popup-form input:focus {
  border-color: #06B6D4;
  outline: none;
}

.exit-popup-form button {
  background: #06B6D4;
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
}

.exit-popup-form button:hover {
  background: #0891B2;
  transform: translateY(-2px);
}

.exit-popup-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 1rem;
}

/* ============================================
   QUIZ FORMATIONS
   ============================================ */
.quiz-container {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.quiz-progress-step {
  flex: 1;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  transition: background 0.3s;
}

.quiz-progress-step.active {
  background: #06B6D4;
}

.quiz-progress-step.completed {
  background: #10B981;
}

.quiz-question {
  margin-bottom: 2rem;
}

.quiz-question h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #0F172A;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option {
  padding: 1.25rem 1.5rem;
  border: 2px solid #E2E8F0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  text-align: left;
}

.quiz-option:hover {
  border-color: #06B6D4;
  background: #EFF6FF;
  transform: translateX(4px);
}

.quiz-option.selected {
  border-color: #06B6D4;
  background: #DBEAFE;
}

.quiz-option strong {
  display: block;
  color: #0F172A;
  margin-bottom: 0.25rem;
  font-size: 1.0625rem;
}

.quiz-option span {
  color: #64748B;
  font-size: 0.9375rem;
}

.quiz-result {
  text-align: center;
  animation: slideUp 0.5s;
}

.quiz-result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.quiz-result h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0F172A;
}

.quiz-result p {
  color: #64748B;
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.quiz-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ============================================
   CALCULATEUR CPF
   ============================================ */
.cpf-calculator {
  background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%);
  border: 2px solid #06B6D4;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.cpf-calculator h3 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #0F172A;
}

.cpf-input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cpf-input-wrapper {
  flex: 1;
  position: relative;
}

.cpf-input-wrapper label {
  display: block;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.cpf-input {
  width: 100%;
  padding: 0.875rem 1rem;
  padding-left: 2.5rem;
  border: 2px solid #06B6D4;
  border-radius: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  background: white;
}

.cpf-input-icon {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 1.25rem;
}

.cpf-result {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
  border: 2px solid #10B981;
  display: none;
}

.cpf-result.visible {
  display: block;
  animation: slideUp 0.5s;
}

.cpf-result-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cpf-formations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cpf-formation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #F0FDF4;
  border-radius: 0.5rem;
}

.cpf-formation-name {
  font-weight: 500;
  color: #0F172A;
}

.cpf-formation-price {
  color: #10B981;
  font-weight: 600;
}

/* ============================================
   LOGOS CLIENTS (Trust)
   ============================================ */
.client-logos-section {
  padding: 3rem 0;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

.client-logos-title {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.client-logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.client-logo {
  opacity: 0.4;
  filter: grayscale(100%);
  transition: all 0.3s;
  max-width: 120px;
  height: 60px;
  object-fit: contain;
}

.client-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* ============================================
   VIDÉO TÉMOIGNAGES
   ============================================ */
.video-testimonial {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-testimonial video {
  width: 100%;
  display: block;
  background: #000;
}

.video-testimonial-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: white;
  padding: 1.5rem;
}

.video-testimonial-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.video-testimonial-role {
  font-size: 0.875rem;
  opacity: 0.9;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(6, 182, 212, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.video-play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #06B6D4;
}

.video-play-button::after {
  content: '▶';
  color: white;
  font-size: 1.5rem;
  margin-left: 4px;
}

/* ============================================
   GOOGLE REVIEWS WIDGET
   ============================================ */
.google-reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid #E2E8F0;
}

.google-reviews-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: #4285F4;
}

.google-reviews-icon {
  width: 48px;
  height: 48px;
}

.google-reviews-content {
  display: flex;
  flex-direction: column;
}

.google-reviews-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.google-reviews-stars {
  color: #FBBC04;
  font-size: 1.125rem;
}

.google-reviews-score {
  font-weight: 700;
  font-size: 1.25rem;
  color: #0F172A;
}

.google-reviews-count {
  font-size: 0.875rem;
  color: #64748B;
}

/* ============================================
   HOVER EFFECTS AVANCÉS
   ============================================ */
.card-enhanced {
  position: relative;
  overflow: hidden;
}

.card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(6, 182, 212, 0.1), 
    transparent
  );
  transition: left 0.6s;
}

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

.card-enhanced:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(200px);
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #10B981;
}

.toast-notification.visible {
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  font-size: 1.5rem;
}

.toast-content {
  flex: 1;
}

.toast-content strong {
  display: block;
  color: #0F172A;
  margin-bottom: 0.125rem;
}

.toast-content span {
  color: #64748B;
  font-size: 0.875rem;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #94A3B8;
  cursor: pointer;
  padding: 0.25rem;
}

/* ============================================
   FORMULAIRE VALIDATION TEMPS RÉEL
   ============================================ */
.form-field {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-field-icon {
  position: absolute;
  right: 1rem;
  top: 2.75rem;
  font-size: 1.25rem;
  display: none;
}

.form-field.valid .form-field-icon.success {
  display: block;
  color: #10B981;
  animation: scaleIn 0.3s;
}

.form-field.invalid .form-field-icon.error {
  display: block;
  color: #EF4444;
  animation: shake 0.5s;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-error-message {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-field.invalid .form-error-message {
  display: block;
  animation: slideDown 0.3s;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   CAROUSEL TÉMOIGNAGES MOBILE
   ============================================ */
.testimonials-carousel {
  display: none;
}

@media (max-width: 768px) {
  .testimonials-carousel {
    display: block;
    position: relative;
    overflow: hidden;
  }
  
  .testimonials-slides {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .testimonial-slide {
    min-width: 100%;
    padding: 0 1rem;
  }
  
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #06B6D4;
  }
}

/* ============================================
   SECTION "IMAGINEZ" (Vision)
   ============================================ */
.vision-section {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  padding: 4rem 2rem;
  border-radius: 1.5rem;
  color: white;
}

.vision-section h2 {
  color: white;
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.vision-scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.scenario {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.scenario:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.scenario-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.scenario p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
  .cpf-calculator {
    padding: 2rem 1.5rem;
  }
  
  .quiz-container {
    padding: 2rem 1.5rem;
  }
  
  .vision-scenarios {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SMOOTH SCROLL HIGHLIGHT FLASH
   ============================================ */
@keyframes highlightFlash {
  0%, 100% { 
    background: transparent; 
  }
  50% { 
    background: rgba(6, 182, 212, 0.05); 
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible amélioré */
:focus-visible {
  outline: 3px solid #06B6D4;
  outline-offset: 3px;
  border-radius: 0.25rem;
}

/* Transition réduite pour préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


